Downcity
Commands

city env

Manage Console Env entries with list, set, copy, and delete operations

city env

city env manages Console Env entries.

Usage

city env list [--scope global|agent|all] [--agent <agentId>] [--json]
city env set <key> <value> [--scope global|agent] [--agent <agentId>] [--description <text>] [--json]
city env copy [--scope global|agent|all] [--agent <agentId>]
city env delete <key> [--scope global|agent] [--agent <agentId>] [--json]

Behavior

  • list shows configured key names and metadata.
  • set creates or updates a key.
  • copy prints plaintext values in .env file format, so you can redirect the output into .env.
  • delete removes a key.
  • Values are stored encrypted in the Console store.
  • list never returns secret values.
  • copy explicitly prints plaintext values. Use it only when you need to export a .env file.
  • copy can only run from the local CLI. It is blocked inside an agent shell.
  • If --agent <agentId> is provided, scope becomes agent automatically.

Export .env

city env copy > .env
city env copy --agent /Users/you/Documents/bots/lucas_whitman > .env
city env copy --scope all > .env

Example output:

OPENAI_API_KEY=sk-example
PROMPT_PREFIX="value with spaces"

Example Output

$ city env list --scope all
Env                                                2 configured
  OPENAI_API_KEY
    scope         global
    description   Shared OpenAI key
  TELEGRAM_BOT_TOKEN
    scope         agent
    agent         /Users/you/Documents/bots/lucas_whitman