Zeabur CLI
Zeabur CLI lets you manage all Zeabur resources from your terminal — deploy services, view logs, manage projects, without opening the Dashboard.
Login
Browser login
npx zeabur@latest auth loginPress Enter to open the login page in your browser, then click Confirm. You will be redirected back to the terminal with a login success message.
Token login
For CI/CD or headless environments:
npx zeabur@latest auth login --token <your-token>Deploy a service
Run the following command in your project directory:
npx zeabur@latest deployThe CLI automatically detects your framework and guides you to select or create a project. Once deployed, the service URL will be displayed in the terminal.
Workspaces (Teams)
A workspace is the account the CLI acts under: your personal account, or one of the teams you belong to. The workspace is the outer scope of your context — switching it clears the persisted project, environment, and service, because resource IDs are not shared between a personal account and a team.
By default the CLI acts on your personal account. Before working with team resources, switch into that team’s workspace (or pass --workspace), otherwise commands run against your personal account.
List workspaces
Shows your personal workspace and every team you belong to, with your role in each. The current workspace is marked.
npx zeabur@latest workspace listShow the current workspace
npx zeabur@latest workspace currentSwitch to a team
The argument is the team’s name or its 24-character ID. If a name matches more than one team, the CLI lists the candidates so you can pick by ID.
npx zeabur@latest workspace switch <team-name-or-id>Return to your personal workspace
npx zeabur@latest workspace clearOne-shot override
Use the global --workspace flag to run a single command in another workspace without changing your persisted one. This is convenient for CI and scripts:
npx zeabur@latest --workspace <team-name-or-id> project lsProject management
List projects
npx zeabur@latest project lsSet project context
npx zeabur@latest context set projectIn interactive mode, this lists all your projects for selection. Subsequent commands will automatically apply to the selected project.
Service management
List services
npx zeabur@latest service lsSet service context
npx zeabur@latest context set serviceRestart a service
npx zeabur@latest service restartDeployment info and logs
View deployment status
npx zeabur@latest deployment getView runtime logs
npx zeabur@latest deployment log -t=runtimeView build logs
npx zeabur@latest deployment log -t=buildSwitch environments
npx zeabur@latest context set envSwitch between deployment environments (e.g., production, staging).
Non-interactive mode
For CI/CD pipelines or automation scripts, add -i=false to disable interactive prompts and pass parameters directly:
Specify project and service by name
npx zeabur@latest context set project --name <project-name>
npx zeabur@latest context set service --name <service-name>
npx zeabur@latest context set env --id <env-id>Specify by ID
npx zeabur@latest context set project --id <project-id>
npx zeabur@latest context set service --id <service-id>One-liner operations
Skip context setup and pass all parameters inline:
npx zeabur@latest service restart --env-id <env-id> --service-name <service-name>
npx zeabur@latest deployment get --env-id <env-id> --service-name <service-name>
npx zeabur@latest deployment log -t=runtime --env-id <env-id> --service-name <service-name>Get help
Add --help to any command to view its usage:
npx zeabur@latest --help
npx zeabur@latest deployment --help