Loading...
Loading...
Execute mcloud variables commands to list and get environment variables for a Cloud environment. Use when inspecting, reading, or exporting environment variables. Never pass --reveal unless the user explicitly requests secret values.
npx skill4agent add medusajs/medusa-agent-skills mcloud-variablesmcloud variables--reveal--project--environmentvar_...mcloud variables list \
--organization <org-id> \
--project <project-id-or-handle> \
--environment <environment-handle> \
--json-o/--organization <id>-p/--project <id-or-handle>-e/--environment <handle>--reveal--limit <1-500>200--offset <number>0--jsonvar_...# By key (requires project + environment context)
mcloud variables get ADMIN_CORS \
--organization <org-id> \
--project <project-id-or-handle> \
--environment <environment-handle> \
--json
# By ID (works without project/environment context)
mcloud variables get var_01XYZ --jsonvariablevar_...-o/--organization <id>-p/--project <id-or-handle>-e/--environment <handle>--reveal--json| Field | Description |
|---|---|
| Variable ID ( |
| Variable name (e.g. |
| Variable value (masked if |
| Whether the variable is treated as a secret |
| Available at build time |
| Available at runtime |
| The environment ID this variable belongs to |
# List all variables for the active environment
mcloud variables list --json
# Get a variable by key (with active context)
mcloud variables get DATABASE_URL --json
# Get a variable by ID (no env context needed)
mcloud variables get var_01XYZ --json
# Only reveal secrets when user explicitly asks
mcloud variables get STRIPE_SECRET_KEY --reveal --json | jq -r '.value'
# Export all variables to a .env file (user must explicitly request --reveal)
mcloud variables list --reveal --json \
| jq -r '.[] | "\(.key)=\(.value)"' \
> .env
# List only runtime variables
mcloud variables list --json | jq '[.[] | select(.is_runtime == true)]'
# Check if a specific variable exists
mcloud variables list --json | jq '.[] | select(.key == "REDIS_URL")'