Developer ToolsCLI

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 login

Press 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 deploy

The 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 ls

Set project context

npx zeabur@latest context set project

In 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 ls

Set service context

npx zeabur@latest context set service

Restart a service

npx zeabur@latest service restart

Deployment info and logs

View deployment status

npx zeabur@latest deployment get

View runtime logs

npx zeabur@latest deployment log -t=runtime

View build logs

npx zeabur@latest deployment log -t=build

Switch environments

npx zeabur@latest context set env

Switch 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