Docs

CLI reference

Every command of the zitadel CLI, with its flags and examples, generated from the commands the CLI defines. Run a command with npx @zitadel/cli@latest <command>; --help after it prints the same for the version you run.

In a script or as a coding agent, pass --non-interactive --json: every command then prints one JSON envelope, which Agent setup describes.

Global flags

Every command takes these.

FlagDescription
--jsonFormat output as json.
-c, --cwd <value>Project directory to operate on.
-s, --server <value>Override the resolved server URL.
-n, --non-interactiveDisable prompts. Required when scripting or running as an agent.
--dry-runPreview without mutating files or the platform.
-v, --verboseVerbose logging.
--debugDebug logging.
--[no-]colorColorize human output. Disable with --no-color; NO_COLOR and FORCE_COLOR are honored too. On by default.
--[no-]telemetrySend anonymous usage analytics. Disable with --no-telemetry. On by default.

Environment variables

These set what a global flag sets, for every command.

VariableFlagDescriptionPrecedence
ZITADEL_API_BASE--serverThe server URL, or local, as --server takes it.--server wins over it, and it wins over server in zitadel.json.
NO_COLOR--colorA non-empty value turns color off, as --no-color does (https://no-color.org).Turns color off even with --color or FORCE_COLOR.
FORCE_COLOR--colorTurns color on where it would be off, such as in a pipe, as --color does.--no-color and NO_COLOR win over it.
DO_NOT_TRACK--telemetryAny value but 0 or an empty one turns telemetry off (https://consoledonottrack.com).Turns telemetry off even with --telemetry.
ZITADEL_TELEMETRY--telemetryAn empty value or one of 0, false, off, no turns telemetry off.Turns telemetry off even with --telemetry.

Exit codes

A command that succeeds, or skips because there is nothing to do, exits 0. One that fails exits with the code of the error its envelope names in code.

Exit codeError codes
0E_ALREADY_INIT
1E_AUTH
2E_NOT_IMPLEMENTED
3E_FRAMEWORK_NOT_DETECTED, E_UNSUPPORTED_PROJECT_SHAPE, E_VALIDATION, E_CREDENTIAL_MISSING
4E_NETWORK, E_LOCAL_SERVER_NOT_RUNNING, E_NOT_FOUND
5E_CONFLICT, E_PORT_IN_USE
130E_CANCELLED

Getting started

CommandDescription
setupCreate a Zitadel project and scaffold local auth. An interactive setup ends with a note about the Zitadel agent skills, shown once per machine; set NO_SKILLS_PROMPT=1 to hide it.
startStart a local Zitadel server.
statusSummarize the local Zitadel server and project state.
claimClaim this project to make it permanent. Opens a browser to create an account or sign in.
skills addAdd the Zitadel agent skills to this project.

Local development

CommandDescription
consoleOpen the local console, signed in as the local admin.
logsShow local Zitadel server logs.
stopStop the local Zitadel server.
resetDelete the local Zitadel server runtime and data.
ejectRemove managed files and local Zitadel state.

Users and teams

CommandDescription
users createCreate a user.
users deleteDelete a user by id.
users getGet one user by id.
users listList users.
users updateUpdate a user by id.
teams createCreate a team.
teams deactivateDeactivate a team by id.
teams getGet one team by id.
teams listList teams.
teams updateUpdate a team by id.
grants createCreate a grant.
grants deleteDelete a grant by id.
grants getGet one grant by id.
grants listList grants.

Authentication

CommandDescription
auth-method passkey disableDisable passkey sign-in for a user schema.
auth-method passkey enableEnable passkey sign-in for a user schema.
auth-method password disableDisable password sign-in for a user schema.
auth-method password enableEnable password sign-in for a user schema.
auth-method sso disableRemove an identity provider from a user schema.
auth-method sso enableAdd an identity provider to a user schema.
idps createCreate an identity provider connection.
idps getGet one identity provider connection by id.
idps listList idps.
sessions getGet one session by id.
sessions listList sessions.
sessions revokeRevoke a session by id.

Configuration and releases

CommandDescription
deployApply your local configuration to Zitadel.
previewDeploy a release from .zitadel/ to a pull-request build's preview URLs.
pullRebuild your .zitadel/ files from a release.
branding ejectTake ownership of the login template: scaffold .zitadel/branding/ from a shipped design.
branding getGet one branding revision by id.
branding listList branding.
deployment createDeploy an existing release to the project's origins.
deployment getRead one deployment by id.
deployment listList the project's deployments, newest first.
deployment rollbackRoll back to an earlier deployment.
envShow which server and project resolve, and where each value came from.
env addBind an environment to a project, creating the project if needed.
env listList the environments bound in this directory's .env files.
flow-definitions getGet one flow definition by flow name (newest revision) or revision id.
flow-definitions listList flow-definitions.
origin addAdd an origin pattern to the project.
origin listList the origin patterns on the project.
origin rmRemove an origin pattern from the project.
policies getGet one policy by policy id or operation.
policies listList policies.
policies testRun the test cases in .zitadel/policies/ against the policies
preview listList the project's live previews, newest first.
preview rmRemove a live preview from the project.
projects getGet one project by id.
projects listList projects.
projects updateUpdate a project by id.
release createBuild a release from .zitadel/ without deploying it.
release getGet one release by id.
release listList release.
release revokeRevoke a release so its content is never served again.
schemas getGet one schema by object type (current revision) or revision id.
schemas listList schemas.
variable getGet one variable from the project.
variable listList the variables entered on the project.
variable resolveShow the variables the live deployment froze for a target.
variable rmRemove one variable from the project.
variable setSet one variable on the project.

Diagnostics and utilities

CommandDescription
doctorVerify local runtime and project state.
apiCall any operation of the Zitadel API, with this project's server and project secret.
api lsList the operations of the Zitadel API that zitadel api calls.
events getGet one event by id.
events listList events.
resourcesList the resources this CLI manages.

npx @zitadel/cli@latest --help also lists oclif's own commands, such as help and version, under Diagnostics and utilities.

Was this helpful?