CLI
A single binary with no dependencies, for macOS, Linux and Windows.
Installing
Download it from zero.nnumbers.com.br/downloads, check the checksum and put it on your PATH:
curl -fsSLO https://zero.nnumbers.com.br/downloads/zero-darwin-arm64.tar.gz
curl -fsSLO https://zero.nnumbers.com.br/downloads/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing
tar -xzf zero-darwin-arm64.tar.gz
sudo mv zero /usr/local/bin/
zero version
On Linux, use sha256sum -c. On Windows, extract the .zip and put zero.exe in a folder on your PATH.
Authenticating
zero auth login
The CLI asks for your email and opens the approval in the browser: the terminal shows a link and a short code, you check the code on your company's sign-in page and approve — with its MFA and policies. The email only finds out where to send the sign-in; the provider is who authenticates. The session is stored encrypted, with the key in the system keychain (where there is no keychain, in a file readable only by your user), and it renews on its own.
For machines (CI, containers), the credential does not go in an argument, which ends up in shell history and in the process list. The paths, from strongest to weakest — the first one present wins:
--token-file PATH,--token-fd Nor--token-stdin— an explicit source, never stored; if it fails, the command fails, without falling back to the stored session;ZERO_TOKEN_FILE— a file re-read on every request;ZERO_TOKEN— in the environment, not stored; this is the CI mode;- the token pasted with
zero auth login --token, read from standard input; - the
zero auth loginsession.
echo "$TOKEN" | zero auth login --token
In a pipeline, use an application credential (zcred_…) in ZERO_TOKEN: it belongs to the organization, has its own reach and operations and an explicit expiry, and it is created and rotated in the console, under Credentials. It does not renew and cannot be created from the CLI. See API and automation.
zero auth status # who am I, and where
zero auth logout # discards the credential
If your account belongs to more than one organization:
zero orgs list
zero orgs use <organization>
The journey
PROJ=$(zero projects create shop) # the production environment is created with it
zero projects get "$PROJ" # shows the environment's identifier
zero source set "$PROJ" --provider github --repo you/shop --ref main
zero flavors list # the instance sizes, with the reference price
SVC=$(zero services create web --env <environment> --flavor small --subdir apps/web)
zero deploy "$SVC"
projects create and services create print only the identifier on stdout — deliberately, so it can be chained in scripts. Explanations go to stderr.
Commands take the identifier, not the name. zero deploy, zero services …, zero promote, zero releases, zero artifacts, zero security, zero projects get|delete, zero source and zero logs --project take the ID (svc_…, prj_…). A name there answers "not found" (exit code 6). The ID is what create prints and what appears in the ID column of zero services list and zero projects list.
The repository belongs to the project. zero source set configures the source; the service only declares the folder it builds (--subdir). --repo accepts owner/repo, the full URL, or the SSH address; --provider (github, gitlab, or bitbucket) is required when the address does not name the host. For a private repository, add --token: the token is read from standard input, never from an argument. --repo on services create or on deploy is refused, with a sentence pointing to zero source set. To use Zero Git instead of an external provider, see Zero Git and pull requests.
The size is required. services create requires --flavor, an identifier from zero flavors list; without it, the command exits with code 2 and says which sizes the API accepts right now. See Instance size.
Creating a service does not deploy it, and the CLI says so.
Deploying
zero deploy "$SVC"
zero deploy "$SVC" --ref release/2026-09 # another branch or tag, just this once
zero deploy follows the deployment live and exits with code 0 when it becomes ready and 1 when it fails — showing the reason, such as HEALTH_CHECK_FAILED when the application started but did not answer. The reasons are in Deployment states.
Operating
zero status "$PROJ" # environments, services and what is live
zero logs --project "$PROJ" --follow # the application's output, live
zero logs <deployment> --build # the build output
zero releases "$SVC" # the immutable history of activations
zero artifacts "$SVC" # the built versions, with each one's digest
zero rollback "$SVC" --to rel_… # goes back to a previous version
zero security "$SVC" # the vulnerability analysis of what is live
Application log
zero logs --project "$PROJ" # the LATEST lines of the last hour
zero logs --project "$PROJ" --follow # then each new line, until Ctrl-C
zero logs --project "$PROJ" --level error --from 24h --follow
zero logs --project "$PROJ" --all --from 7d > app.log # the whole period, to a file
zero logs --project "$PROJ" --all --json | jq -r .message
| Option | What it does |
|---|---|
--follow | Shows the latest lines, then each new line, until Ctrl-C (exit code 0) |
--all | The whole period, from the oldest line to the most recent |
--from 30m|24h|7d|<instant> | The start of the period; the default is one hour ago |
--to <instant> | The end of the period; without it, until now |
--service, --level, --search | Narrow by service, level (debug, info, warning, error), and text |
--limit | How many lines the first page brings, from 1 to 1000 |
--json | With --follow and --all, one object per line |
--follow does not lose lines when the application has more than one instance, nor when the network hiccups: it continues from where it stopped. The log is kept for 7 days — see Logs.
Image security
zero security "$SVC" # the summary of the analysis of the live digest
zero security "$SVC" --findings --severity high # the findings, by severity
The analysis is always of the deployed digest, never of a tag. The command exits with code 3 when the analysis did not finish — so "no vulnerabilities" is not mistaken for "no analysis". See Vulnerability analysis.
Instance size
zero flavors list # ID, NAME, CPU, MEMORY, PRICE/MONTH
zero flavors get medium # one size, by identifier
zero services resize "$SVC" --flavor large # changes the size; redeploys if the service has deployed
The size (flavor) is the only way to declare resources: CPU and memory come from the catalog, per replica. The listing's price is a reference, per replica, for 730 h of operation in the month — it is not an invoice or measured consumption. Resizing a service that has already deployed redeploys it (same image, new configuration), and the CLI follows it to the end; a service that has never deployed only records the size, and the first deployment carries it. See Instance size.
Promoting
zero artifacts svc_staging # what can be promoted, with the digest
zero promote svc_prod --from svc_staging # the source's ACTIVE version
See Promoting between environments.
Deleting a project
zero projects delete "$PROJ" --reason "pilot ended" --yes
Without --yes, the CLI asks for the project's name, typed — and refuses when the input is not a terminal: in a script, --yes is the explicit confirmation. The deletion is followed to the end: code 0 when it finishes, 1 when it fails, and repeating the command tries again. What changes and what stays is in Deleting the project.
People's access
Creating accounts and granting access are not CLI tasks: since October 19, 2026, accounts and roles are managed in the platform Console, under IAM. The CLI does what Zero's API answers for people who already have access:
zero access get <id> # the person's role and Spaces
zero access update <id> --role member --project <space> # changes role or Spaces; --project repeats
zero access resend-notification <id> # resends the email that announces the access
--role accepts admin, operator or member; member requires at least one --project. The <id> is the person's identifier in Zero, not the email. The zero users and zero access grant commands no longer exist. zero access revoke remains in the binary, but the API refuses the revocation (409 ACCESS_MANAGED_BY_IAM or 501 IDENTITY_ADMIN_API_REMOVED): removing access happens in IAM. Details in Users and access.
Networking Between Projects
zero networks create payments
zero networks attach <environment> --network payments # one environment of each project
zero networks get payments # who is in the network
zero services internal-name <svc_…> api # prints api.zero.internal
zero networks grant payments --from <project> --to <service> --wait
zero networks grants payments # the permissions, for services and internal entries
zero networks revoke payments <permission>
zero projects network <project> # who comes in, where it goes out, the internal addresses
zero environments network <environment> # the environment's network and the state of its rules
The network and the internal entry go by name or by identifier. The permission uses the service's port; --port is accepted only if it is that one.
A project with no internet address:
zero projects create billing --internal
zero projects exposure <project> internal # or public, to go back
Gateway internal entries, with paths to services in the network:
zero entries create api --network payments # api.zero.internal
zero entries add-route api --service <service> --path /v1 --strip-prefix
zero entries add-route api --service <other-service> --path /health --exact
zero entries routes api
zero entries grant api --from <project>
zero entries grants api
zero entries remove-route api <route>
zero entries revoke api <permission>
zero entries delete api
With a single Gateway in the organization, the CLI uses it; with more than one, say which with --gateway.
Revoking, detaching from the network, removing a path, changing the exposure, removing the name and deleting ask for the target's name, typed — and refuse when the input is not a terminal: in a script, --yes is the explicit confirmation. --wait waits for the rule to be applied and exits with code 1 if the deadline passes (--timeout, 5m by default). See Networking between projects.
Organization IAM
In the console, this capability appears as Organization sign-in (Login da organização), in the service's Login and data card (Login e dados) and under the project's Settings → Login and data.
zero services capabilities "$SVC" # the capabilities and the state of each one
zero services enable organization-iam "$SVC" # "IAM da Organização: habilitado"; takes effect with the next deployment
zero deploy "$SVC" # the edge starts requiring sign-in
zero services doctor organization-iam "$SVC" # checks step by step, and says who fixes it
zero services disable organization-iam "$SVC" # "IAM da Organização: desligado"; leaves with the next deployment
The argument is the service ID (svc_…), not the name. doctor exits with code 3 while something is missing. A wrong capability name (iam, login) teaches the right one. See Turn On Organization IAM.
The Organization's QueryMesh
In the console, the application's capability appears as Infinite Data access (Dados do Infinite Data), in the same Login and data card.
zero orgs integrations # the organization's integrations and the state of each
zero orgs integrations get querymesh # the address and the state
zero orgs integrations set querymesh --url https://… # configures it (organization administrator); --disabled
zero orgs integrations remove querymesh # applications stop querying; sign-in continues
zero services enable querymesh "$SVC" # "QueryMesh: habilitado"; requires Organization IAM; takes effect immediately, without deploying
zero services doctor querymesh "$SVC" # checks sign-in, the deployment, the integration and the capability
zero services disable querymesh "$SVC" # "QueryMesh: desligado"; the next query is refused
The organization administrator configures the address once; each application that will query turns on the querymesh capability, on top of Organization IAM. With QueryMesh on, zero services disable organization-iam is refused: turn QueryMesh off first. See Query the Organization's QueryMesh.
Domains
zero domains list --project "$PROJ" # the addresses, with state, TLS and routing
zero domains canonical --project "$PROJ" app.example.com # chooses the canonical address
domains list shows what the deployment proved about each address, not a probe made now. Changing the canonical address deploys: the new address starts answering when the deployment the choice triggers finishes, and the previous one stops answering at the same instant, retained for your organization. Custom domain zones live in the console and in the API. See Project address.
Zero Git and pull requests
Instead of GitHub, GitLab or Bitbucket, the project can deploy from Zero Git: a private repository, derived from the project (<organization>/<project>) and created by the platform — there is no address, account or token to provide.
zero source set "$PROJ" --zero --ref main # creates the repository and follows the provisioning
zero source get "$PROJ" # the state and the clone_url
zero git setup # the CLI becomes git's credential helper (global)
git clone <clone_url>
Provisioning is asynchronous: the API answers 202 with an operation, the source stays in provisioning and moves to connected, with the clone_url, when it finishes. --detach does not follow and prints the operation. --repo together with --zero is refused. On an installation without Zero Git, the refusal is INTERNAL_GIT_NOT_ENABLED.
zero git setup records the CLI as the credential helper for this installation's Git host: git push and git clone use the same credential as your session, without copying a token to a file. --local configures only the current repository; --host points at another installation. See The project source.
With the source on Zero Git, change requests also go through the CLI:
zero pr list "$PROJ" # open ones; --estado aberto|mesclado|fechado|todos
zero pr show "$PROJ" 7 # the request, with the preview when there is one
zero pr create "$PROJ" --titulo "Add shipping" --de feat/shipping --para main
zero pr merge "$PROJ" 7 --metodo squash # merge (default), squash or rebase
zero pr close "$PROJ" 7
The flags keep their Portuguese names (--estado for state, --titulo for title, --de/--para for from/to, --metodo for method). Writing is asynchronous and the CLI follows the operation: the exit code is 0 only when it finishes and the request ends up in the requested state. On a project that deploys from an external provider, the refusal is PULL_REQUESTS_REQUIRE_INTERNAL_GIT, and the request is opened on the provider's screen. The console shows pull requests and previews — what each pull request deployed — under the project's Settings → Pull requests and Settings → Previews.
Machine contract
For scripts and agents, the CLI has a stable contract:
--jsonon nearly every command, in any position. With it,stdoutcarries only the result andstderronly an error object, such as{"error":{"exit_code":7,"kind":"conflict","code":"CONCURRENT_MODIFICATION","http_status":409}}.- Exit codes:
0success,1failed,2wrong usage,3undetermined,4not authenticated,5no permission,6not found,7conflict,8invalid request,9rate limited,10deadline,11unavailable,12contract,130interrupted. zero capabilities --jsonreturns the contract of the installed version, command by command.--idempotency-keysets the idempotency key on commands that create; on those that do not honor it, the flag is refused with code 2.--detachondeploy,promoteand long operations returns control immediately; without it the CLI follows live to the outcome.Ctrl-Cwhile following cancels the following, not the deployment — and closes the connection cleanly.- The exit code is non-zero when the operation fails, so
zero deploy && zero promoteis safe.
Starting with the next CLI release:
zero operations get op_…reads the outcome of an operation after the command that created it has exited. The exit code says whether the read succeeded: afailedoperation, read successfully, exits 0.CONFIRMATION_REQUIRED: a destructive operation that requires confirmation, in a run that cannot ask (no terminal,--no-interactive, or input taken by--token-stdin), exits with code 2 and thatcodein the error envelope. Repeat with--yes.
Was this page helpful?
Report a problem on this pageDo not send passwords, keys, tokens, or customer data.