CLI
Install cluz, choose the team and project a command acts on, and set its API and token.
cluz deploys and manages apps on the platform from a terminal. It talks to the API at https://api.clusterz.eu unless told otherwise.
Install
Pick your system, then run cluz version to check.
Mac
brew install clusterz-eu/tap/cluzDebian and Ubuntu
sudo install -d -m 0755 /etc/apt/keyrings && curl -fsSL https://packages.clusterz.eu/clusterz.gpg | sudo tee /etc/apt/keyrings/clusterz.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/clusterz.gpg] https://packages.clusterz.eu/apt stable main" | sudo tee /etc/apt/sources.list.d/clusterz.list
sudo apt update && sudo apt install cluzFedora and RHEL
sudo tee /etc/yum.repos.d/clusterz.repo <<'EOF'
[clusterz]
name=Clusterz
baseurl=https://packages.clusterz.eu/rpm
gpgcheck=0
repo_gpgcheck=1
gpgkey=https://packages.clusterz.eu/clusterz.asc
EOF
sudo dnf install cluzAnything else
curl -fsSL https://clusterz.eu/install.sh | shThis installs into /usr/local/bin, or ~/.local/bin when you cannot write there. It checks the download against the release's signed list of checksums and stops if anything does not match. Set CLUZ_VERSION to install a version other than the latest.
Shell completion is on its own page.
Choosing the team and project
Most commands act on one project. The CLI takes it from, in order:
--teamand--projector-p.clusterz.jsonin the current directory, written bycluz init- for the team only, the active team (
cluz teams switch)
.clusterz.json holds no secrets. Commit it so everyone in the repository targets the same project.
These flags work on every command:
| Flag | What it does |
|---|---|
--api-url | The API's base URL. Environment: CLUSTERZ_API_URL. Default https://api.clusterz.eu. |
--token | An access token for this command. Environment: CLUSTERZ_TOKEN. |
--team | The team's slug. |
-p, --project | The project's slug. |
Configuration
| Setting | Flag | Environment | File |
|---|---|---|---|
| API URL | --api-url | CLUSTERZ_API_URL | .clusterz.json api_url, then ~/.clusterz/config.json |
| Token | --token | CLUSTERZ_TOKEN | ~/.clusterz/config.json |
| Team | --team | .clusterz.json, then the active team | |
| Project | --project, -p | .clusterz.json | |
| Config file path | CLUSTERZ_CONFIG | default ~/.clusterz/config.json |
NO_COLOR turns off colored output.
Builds and deployments by name
Builds and deployments can be named by full ID, ID prefix (as shown in lists), or number: cluz logs 12, cluz rollback 4.
Errors
| You see | Meaning |
|---|---|
your session has expired ...; run 'cluz login' | 401: token rejected and could not be renewed |
permission denied: ... | 403: your role in the team does not allow it |
not found: ... | 404: wrong team or project slug, or no access |
cannot reach the Clusterz API at ... | network or DNS failure, or wrong --api-url |
the Clusterz API failed (status 5xx) | server-side failure; retry |
In the dashboard
These are done in the dashboard, not the CLI:
- Runtime (application) logs.
cluz logsshows build logs. - The team audit log.
- Git repository browsing, framework detection and webhook re-registration.
A team is created at your first sign-in, so no command makes one.
The commands
- Sign in:
login,logout,whoami,terms. - init and up: make an app from
clusterz.yaml. - Projects:
projectsandstatus. - Deployments:
deploy,rollback,redeploy,restart,logs,builds,deployments. - Services, Variables, Volumes, Database, Domains, Ready-made apps, Registry, Teams, Version and completion.
- Every command: each command's own help, with all its flags.