Zeabur Variables Management
Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
Known Issues
- Use
--idnot--name- name lookup unreliable ${VAR}gets empty - shell expands before CLI receivesvariable updatemay clear all vars - bug in CLI
Create Variables
# Always use service ID (name lookup is unreliable)
npx zeabur@latest variable create --id <service-id> \
--key "KEY1=value1" \
--key "KEY2=value2" \
-y -i=false
Variable References
# WRONG - shell expands ${VAR} to empty
--key "REDIS_URL=${REDIS_URI_INTERNAL}"
# Use single quotes to prevent shell expansion
--key 'REDIS_URL=${REDIS_URI_INTERNAL}'
# Or set references in Zeabur Dashboard instead
List Variables
npx zeabur@latest variable list --id <service-id> -i=false
For ${VAR} references → use single quotes or set via Zeabur Dashboard.
Delete Variables
npx zeabur@latest variable delete --id <service-id> --delete-keys "KEY_NAME" -y -i=false
See Also
zeabur-service-list— get service IDs needed for variable commandszeabur-update-service— update variables and restart in one workflow