Docs
CLI

Every command

Each cluz command's own help, with its usage, flags and examples.

This is each command's own help, as cluz <command> --help prints it.

The flags every command takes:

      --api-url string   API base URL (env CLUSTERZ_API_URL, default https://api.clusterz.eu)
  -p, --project string   project slug (default: the project linked in .clusterz.json)
      --team string      team slug (default: the linked or active team)
      --token string     API access token for this command (env CLUSTERZ_TOKEN)

cluz builds

List, inspect and cancel builds

Usage: cluz builds
Aliases: build

cluz builds cancel

Cancel a queued or running build (default: the latest)

Usage: cluz builds cancel [build]

cluz builds info

Show a build (default: the latest); accepts an ID, ID prefix or build number

Usage: cluz builds info [build]

cluz builds list

List the project's recent builds

Usage: cluz builds list
Aliases: ls

cluz catalog

Browse and deploy one-click apps

Usage: cluz catalog

cluz catalog deploy

Create a project from a catalog app and deploy it

Usage: cluz catalog deploy <app-id> [flags]

Flags:
      --name string       project name (required)
      --set stringArray   app input as key=value; repeat for each input
      --slug string       project slug (default: derived from the name)

Examples:
  cluz catalog deploy metabase --name analytics
  cluz catalog deploy mattermost --name chat --set admin_email=ops@example.com

cluz catalog info

Show a catalog app and the inputs it takes

Usage: cluz catalog info <app-id>

cluz catalog list

List catalog apps

Usage: cluz catalog list
Aliases: ls

cluz completion

Generate the autocompletion script for cluz for the specified shell.
See each sub-command's help for details on how to use the generated script.

Usage: cluz completion

cluz completion bash

Generate the autocompletion script for the bash shell.

This script depends on the 'bash-completion' package.
If it is not installed already, you can install it via your OS's package manager.

To load completions in your current shell session:

	source <(cluz completion bash)

To load completions for every new session, execute once:

#### Linux:

	cluz completion bash > /etc/bash_completion.d/cluz

#### macOS:

	cluz completion bash > $(brew --prefix)/etc/bash_completion.d/cluz

You will need to start a new shell for this setup to take effect.

Usage: cluz completion bash

Flags:
      --no-descriptions   disable completion descriptions

cluz completion fish

Generate the autocompletion script for the fish shell.

To load completions in your current shell session:

	cluz completion fish | source

To load completions for every new session, execute once:

	cluz completion fish > ~/.config/fish/completions/cluz.fish

You will need to start a new shell for this setup to take effect.

Usage: cluz completion fish [flags]

Flags:
      --no-descriptions   disable completion descriptions

cluz completion powershell

Generate the autocompletion script for powershell.

To load completions in your current shell session:

	cluz completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command
to your powershell profile.

Usage: cluz completion powershell [flags]

Flags:
      --no-descriptions   disable completion descriptions

cluz completion zsh

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need
to enable it.  You can execute the following once:

	echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

	source <(cluz completion zsh)

To load completions for every new session, execute once:

#### Linux:

	cluz completion zsh > "${fpath[1]}/_cluz"

#### macOS:

	cluz completion zsh > $(brew --prefix)/share/zsh/site-functions/_cluz

You will need to start a new shell for this setup to take effect.

Usage: cluz completion zsh [flags]

Flags:
      --no-descriptions   disable completion descriptions

cluz db

Show the app's databases. An app has as many as it needs, each with a name of
its own: Postgres 17 with pgvector, Postgres 16 or 18 with PostGIS, or Supabase,
which is Postgres with user sign-in, file storage and live updates and answers
at the app's address. Each is part of the app's own project: it is backed up
to the minute, restored on its own, billed by its size on the app's project,
and deleted with the app. A database gives each service it is for
DATABASE_URL, and a Supabase also SUPABASE_URL, SUPABASE_ANON_KEY and each name
your repository reads them under for browser code. Each deploy starts the
databases first, then the app with them.

Usage: cluz db
Aliases: database

cluz db add

Add a database called <name> to the app, for every service of it. --kind is
postgres or supabase. A Postgres is version 17 with pgvector unless --version
and --extension postgis ask for PostGIS on Postgres 16 or 18. A file that names
the app's databases says which services each one is for; name this one there
too, or the next push refuses the file.

Usage: cluz db add <name> [flags]

Flags:
      --extension stringArray   a Postgres extension the platform creates, such as postgis (repeatable)
      --kind string             postgres or supabase
      --version int             a Postgres database's major version: 17, or 16 or 18 with PostGIS
  -y, --yes                     replace the variables of the same names your app sets, without asking

Examples:
  cluz db add main --kind postgres
  cluz db add geo --kind postgres --version 18 --extension postgis
  cluz db add data --kind supabase

cluz db url

Print the connection string of the app's database called [name], of its only
database when no name is given, or of a database that runs on its own, such
as one added with 'cluz catalog deploy block-postgres'. Any of the team's apps
reaches it at this address. The password is masked unless --show is given,
which only the team's owners may, and which is recorded.

Usage: cluz db url [name] [flags]

Flags:
      --show   print the password too (owners only)

Examples:
  cluz db url -p shop reports
  cluz db url -p shop main --show | cluz env set -p worker DATABASE_URL --secret

cluz deploy

Build the latest commit of the project's configured branch and deploy it.

Without flags it starts the build and returns. --wait waits for the build and
its deployment and exits non-zero with the reason if either fails. --follow
also streams the build log. To deploy another branch, change it first with
'cluz projects update --branch <name>'.

Usage: cluz deploy [flags]

Flags:
  -f, --follow             stream the build log and wait for the deployment
      --timeout duration   how long --wait or --follow waits (default 30m0s)
  -w, --wait               wait for the build and deployment to finish

Examples:
  cluz deploy
  cluz deploy --wait
  cluz deploy -f --team acme --project api

cluz deployments

List and inspect deployments

Usage: cluz deployments
Aliases: deployment, deploys

cluz deployments info

Show a deployment (default: the latest); accepts an ID, ID prefix or deploy number

Usage: cluz deployments info [deployment]

cluz deployments list

List the project's recent deployments

Usage: cluz deployments list
Aliases: ls

cluz domains

Manage custom domains. Adding a domain prints the CNAME record to create; a
bare domain (example.com) is added as its www, which you forward the bare domain
to at your registrar. 'cluz domains verify' then checks that the domain
reaches the app; only then is it routed with a TLS certificate, and a catalog
app takes it as its address. Until then the app keeps its own address.

Usage: cluz domains
Aliases: domain

cluz domains add

Add a custom domain and print the DNS record it needs

Usage: cluz domains add <domain>

cluz domains list

List custom domains

Usage: cluz domains list
Aliases: ls

cluz domains rm

Remove a custom domain

Usage: cluz domains rm <domain|id>
Aliases: remove

cluz domains verify

Check that a domain reaches the app and activate it

Usage: cluz domains verify <domain|id>

cluz env

Manage the project's environment variables. Values are encrypted at rest;
variables set with --secret are never shown again, by the CLI or the dashboard.
A variable set with --build also reaches the app's build: buildpacks read it as
an environment variable, a Dockerfile as a build argument (declare it with ARG),
and the build log masks each value of four characters or more. Changes reach
the running app on the next deploy.

Usage: cluz env

Flags:
  -e, --environment string   environment: production, staging or preview (default "production")

cluz env list

List variables (secret values are hidden)

Usage: cluz env list
Aliases: ls

cluz env rm

Remove variables

Usage: cluz env rm KEY...
Aliases: remove, unset

cluz env set

Create or update one or more variables. Pass KEY alone to read the value
from stdin, which keeps secrets out of your shell history. --build makes them
available at build; a variable updated without --build keeps what it had.

Usage: cluz env set KEY=VALUE... | KEY [flags]

Flags:
      --build    make it available at build too; --build=false makes it the app's alone
  -s, --secret   store as a secret: the value is never shown again

Examples:
  cluz env set PORT=8080 LOG_LEVEL=info
  cluz env set DATABASE_URL --secret < db-url.txt
  cluz env set STRIPE_KEY --secret      (prompts for the value)
  cluz env set NEXT_PUBLIC_SITE_URL=https://shop.example.com --build
  cluz env set NPM_TOKEN --secret --build

cluz images

List the project's images in the registry

Usage: cluz images [project]

cluz init

Write clusterz.yaml from what Clusterz finds by reading the repository (the
'origin' remote unless --repo is set): every service of the app, each from its
folder or its own repository, and the database it needs. Check it and commit
it; 'cluz up' and every push then read that file.

With --project it links the current directory to an app that exists instead,
by writing .clusterz.json, so the commands that act on an app target it. Commit
.clusterz.json so everyone working in the repository targets the same app; it
holds no secrets. 'cluz up' links the directory to the app it makes.

Usage: cluz init [flags]

Flags:
      --branch string   the branch to read
      --force           replace an existing clusterz.yaml, or with --project an existing .clusterz.json
      --repo string     the Git repository URL (default: the 'origin' remote)

Examples:
  cluz init
  cluz init --repo https://github.com/acme/shop --branch develop
  cluz init --team acme --project api

cluz login

Sign in to the Clusterz platform.

By default this opens your browser to sign in with GitHub (or --provider
gitlab, bitbucket, google). The browser hands a one-time code back to the CLI
on 127.0.0.1, which trades it for a session. The session is saved to
~/.clusterz/config.json (mode 0600) and renews itself until you log out.

For CI and scripts, pass an access token instead:
  echo "$TOKEN" | cluz login --with-token
  CLUSTERZ_TOKEN=... cluz deploy        (no login needed)

Usage: cluz login [flags]

Flags:
      --no-browser        print the sign-in URL instead of opening a browser
      --provider string   OAuth provider: github, gitlab, bitbucket or google (default "github")
      --with-token        read an access token from stdin instead of using the browser

Examples:
  cluz login
  cluz login --provider gitlab
  cluz login --no-browser
  cluz login --api-url http://localhost:8080

cluz logout

Remove the saved session from this machine

Usage: cluz logout

cluz logs

Show the log of a build: the latest one, or one given by ID, ID prefix or
build number. --follow streams a running build live until it finishes.

These are build logs. The API has no endpoint for the running app's own
output yet, so runtime logs are not available from the CLI.

Usage: cluz logs [build] [flags]

Flags:
  -f, --follow   stream a running build's log until it finishes

Examples:
  cluz logs
  cluz logs 12
  cluz logs -f

cluz members

Manage team members and invitations

Usage: cluz members
Aliases: member

cluz members accept

Accept an invitation to join a team

Usage: cluz members accept <invitation-token>

cluz members decline

Decline an invitation

Usage: cluz members decline <invitation-token>

cluz members invite

Invite someone to the team

Usage: cluz members invite <email> [flags]

Flags:
      --role string   role: admin, developer or viewer (default "developer")

cluz members list

List the team's members

Usage: cluz members list
Aliases: ls

cluz members remove

Remove a member from the team

Usage: cluz members remove <email|user-id>
Aliases: rm

cluz members role

Change a member's role

Usage: cluz members role <email|user-id> <admin|developer|viewer>

cluz projects

List, create, update and delete projects

Usage: cluz projects
Aliases: project, proj

cluz projects create

Create a project from a Git repository. Without --name and --repo it asks
for them. The provider is taken from the repository URL unless --provider is set.
With --database the project has its database from the start: each deploy starts
it first, then the app with DATABASE_URL, SUPABASE_URL and SUPABASE_ANON_KEY.

Usage: cluz projects create [flags]

Flags:
      --branch string         branch to build (default main)
      --build-method string   buildpack or dockerfile (default buildpack)
      --context string        build context directory (default .)
      --cpu string            CPU per instance, e.g. 0.5
      --database              give the project its database: Postgres with sign-in, file storage and live updates
      --description string    description
      --dockerfile string     Dockerfile path (default Dockerfile)
      --health-check string   health check path (default /health)
      --instances int         number of instances (default 1)
      --link                  link the current directory to the new project
      --memory string         memory per instance, e.g. 512m
      --name string           project name
      --port int              port the app listens on (default 8080)
      --provider string       git provider: github, gitlab or bitbucket (default: from --repo)
      --repo string           Git repository URL
      --slug string           URL slug (default: derived from the name)

Examples:
  cluz projects create --name api --repo https://github.com/acme/api --link
  cluz projects create --name web --repo https://gitlab.com/acme/web --build-method dockerfile --port 3000
  cluz projects create --name shop --repo https://github.com/acme/shop --database

cluz projects delete

Delete a project. Its running service, environment variables and domains
are torn down now; the project record is kept for 7 days and then purged.

Usage: cluz projects delete <slug> [flags]
Aliases: rm

Flags:
  -y, --yes   skip the confirmation prompt

cluz projects info

Show a project's settings

Usage: cluz projects info [slug]
Aliases: get, show

cluz projects list

List the team's projects

Usage: cluz projects list
Aliases: ls

cluz projects update

Change a project's settings. Only the flags you pass change. Changes to
instances, memory, CPU, port or health check apply on the next deploy.

Usage: cluz projects update [slug] [flags]

Flags:
      --auto-deploy              deploy on each push to the branch; --auto-deploy=false turns it off (default true)
      --branch string            branch to build
      --build-command string     build command (an empty value clears it)
      --build-method string      buildpack or dockerfile
      --cpu string               CPU per instance, e.g. 0.5
      --description string       description
      --dockerfile string        Dockerfile path
      --health-check string      health check path
      --instances int            number of instances
      --memory string            memory per instance, e.g. 512m
      --name string              project name
      --port int                 port the app listens on
      --release-command string   command run after the build, before traffic moves (an empty value clears it)
      --root string              folder of the repository the app is built from
      --start-command string     start command (an empty value clears it)

Examples:
  cluz projects update --instances 2 --memory 1g
  cluz projects update api --branch release

cluz redeploy

Install the latest published version of a catalog app and restart it. The app
keeps running until the new version is healthy.

Usage: cluz redeploy [-p project] [flags]

Flags:
      --timeout duration   how long --wait waits (default 15m0s)
  -w, --wait               wait for the deployment to finish

Examples:
  cluz redeploy -p files --wait

cluz registry

Pull images from the Clusterz registry

Usage: cluz registry

cluz registry login

Installs docker-credential-cluz next to the cluz binary and names it in
your Docker config (~/.docker/config.json, or $DOCKER_CONFIG) as the
credential helper for the Clusterz registry. Docker then asks it for a short-lived
pull login on every pull; nothing is stored. Other registries are untouched.

Usage: cluz registry login

cluz registry tokens

Long-lived pull-only tokens for CI, one project each

Usage: cluz registry tokens

cluz registry tokens create

Creates a token that can pull the project's images, and nothing else, until
it expires or is revoked. The secret is shown once; store it in your CI's
secrets and log in with: docker login <registry> -u <username> --password-stdin

Usage: cluz registry tokens create [flags]

Flags:
      --expires string   when the token expires: a lifetime such as 30d or 720h, a date (2027-01-31), or never; at most a year (default "90d")
      --name string      the token's name in the team (default: the project and the time)

cluz registry tokens list

List the team's CI pull tokens

Usage: cluz registry tokens list
Aliases: ls

cluz registry tokens revoke

Revoke a CI pull token

Usage: cluz registry tokens revoke <name>

cluz restart

Restart every service of a catalog app. It is briefly unavailable while it
comes back.

Usage: cluz restart [-p project] [flags]

Flags:
      --timeout duration   how long --wait waits (default 15m0s)
  -w, --wait               wait for the deployment to finish

Examples:
  cluz restart -p files --wait

cluz rollback

Redeploy the image of an earlier deployment. With no argument it returns to
the deployment before the active one. The argument may be an ID, ID prefix or
deploy number.

Usage: cluz rollback [deployment] [flags]

Flags:
      --timeout duration   how long --wait waits (default 15m0s)
  -w, --wait               wait for the rollback deployment to finish

Examples:
  cluz rollback
  cluz rollback 14 --wait

cluz services

Show the services of the app: a monorepo's folders, the repositories of
microservices, an API and its web app, each one service of the one project.
The web has the app's address; an api with public: true has its own under
it; workers and private apis have none, and every service
reaches the others by name on the app's network. Each is built, run, checked
and sized on its own.

Usage: cluz services
Aliases: service, svc

Examples:
  cluz services
  cluz services scale web --instances 3

cluz services scale

Set one service's size: how many instances run, and the memory and CPU of
each. What you leave out stays as it is. The app redeploys at the images it
runs, so the service runs at its new size, and the bill follows each service's
own size.

Usage: cluz services scale <service> [flags]

Flags:
      --cpu string      vCPU of each instance, like 0.5
      --instances int   how many instances run
      --memory string   memory of each instance, like 512m or 1g

Examples:
  cluz services scale web --instances 3
  cluz services scale worker --memory 1g --cpu 1

cluz status

Show the project, its latest build and its deployments

Usage: cluz status

cluz teams

List teams and switch the active team

Usage: cluz teams
Aliases: team

cluz teams list

List the teams you belong to

Usage: cluz teams list
Aliases: ls

cluz teams switch

Set the team used when no --team or .clusterz.json says otherwise

Usage: cluz teams switch [slug]

cluz terms

Clusterz changes nothing on a team for someone who has not accepted the terms
in force. Read them at https://clusterz.eu/terms, then accept them with
'cluz terms accept', for the business or organisation you act for.

Usage: cluz terms

cluz terms accept

Accept the terms, for the business or organisation you act for

Usage: cluz terms accept [flags]

Flags:
  -y, --yes   accept them without asking, having read them

cluz up

Create or update the app and deploy it, in one step. The settings come from
clusterz.yaml in the current directory; without one, from what Clusterz finds by
reading the repository. The repository is the 'origin' remote unless --repo is
set. The app, its database and its variables are made in the order they need,
the release command runs after the build and before traffic moves, and a step
that fails leaves nothing half made.

An app of several services, from one repository or several, is one project:
each service is built from its own folder and repository, and they deploy
together, the database first. A variable the file marks required needs a value
the first time: --set KEY=VALUE for the web, --set service.KEY=VALUE
for another. --dry-run shows what would be made and changes nothing.

Usage: cluz up [flags]

Flags:
      --branch string      branch to build (default: the file's, else main)
      --dry-run            show what would be made and change nothing
      --repo string        Git repository URL (default: the 'origin' remote)
      --set stringArray    value of a required variable, KEY=VALUE or service.KEY=VALUE (repeatable)
      --timeout duration   how long --wait waits (default 30m0s)
  -w, --wait               wait for the build and deployment to finish

Examples:
  cluz up
  cluz up --wait
  cluz up --set API_KEY=k-123 --dry-run

cluz version

Print the CLI version

Usage: cluz version

cluz volumes

Manage the project's volumes. A volume is a folder the app keeps across
deploys and restarts, mounted at a path and billed per GB a month for what it
holds. Its size is a mark the dashboard warns near and past; nothing stops a
write beyond it. The app runs on the server that holds its volumes, and they
are copied every 15 minutes, so a restore brings them back to one moment.
Adding or removing a volume redeploys the app's running image; removing one
erases its files and their copies.

Usage: cluz volumes
Aliases: volume

cluz volumes add

Add a volume at a path in the app

Usage: cluz volumes add <path> --size <GB> [flags]

Flags:
      --size int   size in GB, a mark the dashboard warns near and past

Examples:
  cluz volumes add /data --size 10

cluz volumes list

List volumes

Usage: cluz volumes list
Aliases: ls

cluz volumes rm

Remove a volume and erase its files and their copies

Usage: cluz volumes rm <path|id> [flags]
Aliases: remove

Flags:
  -y, --yes   remove it without asking

cluz whoami

Show the signed-in user, their teams and the API in use

Usage: cluz whoami