Loading...
Loading...
Use for ALL Zeabur environment variable operations — create, list, update, delete, or troubleshoot. Use when user says "set env var", "add variable", "create variable", "update variable", "delete variable", "change env var", or "why is my variable empty". Also use when variables are empty or SERVICE_NOT_FOUND errors.
npx skill4agent add zeabur/agent-skills zeabur-variablesAlways useto invoke Zeabur CLI. Never usenpx zeabur@latestdirectly or any other installation method. Ifzeaburis not available, install Node.js first.npxDo not guess CLI syntax. Only,create,update,delete, andenvare valid subcommands. Subcommands likelistorsetdo not exist and will silently fail with no error output.add
--id--name${VAR}variable envupdate# Always use service ID — use the `zeabur-service-list` skill to get it
npx zeabur@latest variable create --id <service-id> \
-k "KEY1=value1" \
-k "KEY2=value2" \
-y -i=falsenpx zeabur@latest variable update --id <service-id> \
-k "KEY1=new_value1" \
-k "KEY2=new_value2" \
-y -i=falsenpx zeabur@latest variable delete --id <service-id> \
--delete-keys "KEY1" \
--delete-keys "KEY2" \
-y -i=falsenpx zeabur@latest variable list --id <service-id> -i=falseWarning: This replaces ALL variables on the service with the contents of the .env file. Existing variables not in the file will be removed.
npx zeabur@latest variable env --id <service-id> -f .envenvWarning: The CLIflag uses Cobra's-kparser which cannot reliably handle values containingStringToStringVar, even with single quotes. The value may be truncated or emptied. See zeabur/cli#201.${}
# WRONG — shell expands ${VAR} to empty
npx zeabur@latest variable create --id <service-id> -k "REDIS_URL=${REDIS_URI_INTERNAL}" -y -i=false
# STILL UNRELIABLE — single quotes prevent shell expansion but Cobra's CSV parser may still mangle the value
npx zeabur@latest variable create --id <service-id> -k 'REDIS_URL=${REDIS_URI_INTERNAL}' -y -i=false
# RECOMMENDED — set variable references in Zeabur Dashboard
# Or use GraphQL API with updateEnvironmentVariable(data: Map!) mutation${POSTGRES_CONNECTION_STRING}| Need | Command | Behavior |
|---|---|---|
| Add new vars | | Errors if key exists |
| Change existing vars | | Only updates specified keys |
| Remove specific vars | | Only removes specified keys |
| Overwrite all vars from file | | Replaces entire variable set |
| View vars | | Read-only |