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.
Project 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