AgentSkillsCN

zeabur-variables

当您通过 CLI 管理 Zeabur 环境变量时,可选用此功能。当变量为空,或出现 SERVICE_NOT_FOUND 错误时,亦可选用此功能。

SKILL.md
--- frontmatter
name: zeabur-variables
description: Use when managing Zeabur environment variables via CLI. Use when variables are empty or SERVICE_NOT_FOUND errors.

Zeabur Variables Management

Known Issues

  1. Use --id not --name - name lookup unreliable
  2. ${VAR} gets empty - shell expands before CLI receives
  3. variable update may clear all vars - bug in CLI

Create Variables

bash
# ✅ Use service ID
npx zeabur@latest variable create --id <service-id> \
  --key "KEY1=value1" \
  --key "KEY2=value2" \
  -y -i=false

Variable References

bash
# ❌ FAILS - shell expands ${VAR} to empty
--key "REDIS_URL=${REDIS_URI_INTERNAL}"

# ✅ Set references in Dashboard instead

List Variables

bash
npx zeabur@latest variable list --id <service-id> -i=false

For ${VAR} references → Use Zeabur Dashboard, not CLI.