Downcity
Configuration

Console Config Storage (downcity.db)

Console-global config is now unified in ~/.downcity/downcity.db with encrypted sensitive fields

Console Config Storage (downcity.db)

From current versions, Console no longer uses:

  1. ~/.downcity/downcity.json
  2. ~/.downcity/.env

Console-global config is unified in:

  • ~/.downcity/downcity.db

What is stored

downcity.db contains these major groups:

  1. Model pool (providers/models)
  2. Console-global env (global_env)
  3. Agent-private env (agent_env)
  4. Bot account vault (channel_accounts)
  5. Chat user authorization (chat_auth_roles, chat_auth_role_permissions, chat_auth_channel_defaults, chat_auth_user_roles)

Sensitive fields (such as API keys) are stored encrypted.

Boundary with Agent project config

These files remain agent-project-level config (unchanged):

  1. <agent>/downcity.json
  2. <agent>/.env

So the split is:

  • Console: ~/.downcity/downcity.db
  • Agent: project-local downcity.json/.env

Environment Variable Scope (Important)

Current versions use explicit layers:

  1. Console-global shared env: global_env
  2. Agent-private env in DB: agent_env
  3. Agent-local env overlay: <agent>/.env (user-managed)
  4. Chat channel credentials: channel_accounts (bound by downcity.json channelAccountId)
  5. Chat user authorization: chat_auth_* structured tables (city-global)

Key behavior:

  1. Agent env map is agent_env + <agent>/.env (.env wins).
  2. .env remains agent-local and does not mutate global process.env.
  3. downcity.json stores channel binding (channelAccountId) instead of plaintext secrets.
  4. Bot credentials are resolved from channel_accounts.
  5. Chat user permissions are resolved from chat_auth_* tables, not from an agent project.
  6. Plugin parameters are read from project downcity.json, while plugin enable/disable belongs to Console global state.

Common operations

Initialize Console (writes into downcity.db):

city init

Read/update project plugin parameters:

city config get plugins.asr
city config set plugins.asr.modelId '\"SenseVoiceSmall\"'

Toggle city-level plugin lifecycle:

city asr on
city asr off

Manage model pool:

city model list
city model create

Process files

These process-state files stay in filesystem (not config):

  1. ~/.downcity/main/city.pid
  2. ~/.downcity/main/city.log
  3. ~/.downcity/main/console.pid
  4. ~/.downcity/main/console.log
  5. ~/.downcity/main/console.json
  6. ~/.downcity/main/agents.json