Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
Workflow
# 1. Get service ID (use the `zeabur-service-list` skill)
npx zeabur@latest service list --project-id <project-id> -i=false
# 2. Check current variables
npx zeabur@latest variable list --id <service-id> -i=false
# 3a. Add new variables (errors if key already exists)
npx zeabur@latest variable create --id <service-id> \
--key "KEY1=value1" \
--key "KEY2=value2" \
-i=false -y
3b. Update existing variables (only updates specified keys)
npx zeabur@latest variable update --id
--key "KEY1=new_value1"
-i=false -y
zeabur-restart skill for details)
npx zeabur@latest service restart --id -y -i=false
## Caveats
| Issue | Solution |
|-------|----------|
| `${VAR}` references | Set in Dashboard, not CLI (shell expands to empty) |
## Update Image Tag (Upgrade / Downgrade Service Version)
For prebuilt/marketplace services, update the image tag to switch versions.
> **This is the ONLY correct path for version upgrades or downgrades.** Do NOT use `zeabur-deploy` (or any redeploy / delete-and-recreate flow) as a substitute — those flows can orphan or wipe the service's mounted disk. A tag update triggers a clean redeploy with the new image while the volume stays attached.
### Workflow
```bash
# 1. Get service ID (use the `zeabur-service-list` skill)
npx zeabur@latest service list --project-id <project-id> -i=false
# 2. Update tag (triggers redeploy automatically)
npx zeabur@latest service update tag --id <service-id> -t <new-tag> -y -i=false
Flags
| Flag | Description |
|---|---|
--id |
Service ID (required, do not use --name) |
-t, --tag |
New image tag to deploy |
--env-id |
Environment ID (optional, resolved automatically) |
-y, --yes |
Skip confirmation |
Note: Updating the tag triggers a new deployment. The service will restart with the updated image.
When to Use
- Fix environment variable typos
- Add missing config
- Change ports, URLs, credentials
- Upgrade a prebuilt service to a newer version
- No need to redeploy entire template