Environments
zkao runs two public environments:
| Environment | App | API base | Docs |
|---|---|---|---|
| Production | zkao.io |
https://zkao.io/api/v1 |
docs.zkao.io |
| Staging | staging.zkao.io |
https://staging.zkao.io/api/v1 |
docs.staging.zkao.io |
The CLI and SDK target production by default. Staging runs ahead of production and gets new features first. Its data and tokens are separate: a production token does not work on staging.
ZKAO_URL
Section titled “ZKAO_URL”One environment variable, ZKAO_URL, points the CLI and SDK at an environment.
It accepts any of these forms:
ZKAO_URL=staging.zkao.ioZKAO_URL=https://staging.zkao.ioZKAO_URL=https://staging.zkao.io/api/v1All three resolve to https://staging.zkao.io/api/v1.
A bare host gets https://.
A value that already ends in /api/v1 is used as is.
The CLI’s --base-url flag and the SDK’s baseUrl option are used verbatim, with no normalization.
They win over ZKAO_URL.
The next release channel
Section titled “The next release channel”The CLI and SDK ship on two npm dist-tags:
latestmatches production.nextmatches staging. Its versions look likeX.Y.Z-next.N.
Install the staging channel when you work against staging:
npm install -g @zksecurity/zkao-cli@nextOr pass --next to the install script:
curl -fsSL https://raw.githubusercontent.com/zksecurity/zkao-sdk/main/install.sh | bash -s -- --nextA CLI from the next channel checks the next tag for updates, and a latest CLI checks latest.
Logging in to staging
Section titled “Logging in to staging”Set ZKAO_URL when you log in:
ZKAO_URL=staging.zkao.io zkao login --project <projectId>Each saved project remembers the base URL it was approved on.
After that, you no longer need ZKAO_URL for that project.
Switching between projects and environments
Section titled “Switching between projects and environments”zkao config show # every saved project, with its base URLzkao config use <projectId> # make another saved project activeSwitching to a staging project points the CLI at staging. Switching back to a production project points it at production.
To log in to the other environment, pass ZKAO_URL again.
Without it, zkao login targets the active project’s environment.

