Docs
CLI

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/cluz

Debian 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 cluz

Fedora 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 cluz

Anything else

curl -fsSL https://clusterz.eu/install.sh | sh

This 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:

  1. --team and --project or -p
  2. .clusterz.json in the current directory, written by cluz init
  3. 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:

FlagWhat it does
--api-urlThe API's base URL. Environment: CLUSTERZ_API_URL. Default https://api.clusterz.eu.
--tokenAn access token for this command. Environment: CLUSTERZ_TOKEN.
--teamThe team's slug.
-p, --projectThe project's slug.

Configuration

SettingFlagEnvironmentFile
API URL--api-urlCLUSTERZ_API_URL.clusterz.json api_url, then ~/.clusterz/config.json
Token--tokenCLUSTERZ_TOKEN~/.clusterz/config.json
Team--team.clusterz.json, then the active team
Project--project, -p.clusterz.json
Config file pathCLUSTERZ_CONFIGdefault ~/.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 seeMeaning
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 logs shows 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