CLI

CLI

The Downcity CLI suite — downcity for local agents and downfed for Federation

CLI

Downcity provides two CLI binaries:

  • downcity (alias city) — manages local agents, global config, and City state.
  • downfed — manages Federation deployment, City entities, and service resources.

Both share the same global flags (--verbose, --quiet, --lang) and help system.

Local storage

  • downcity stores local City state, encrypted credentials, environment variables, channel accounts, and registered Agent project paths in ~/.downcity/downcity.db.
  • downfed stores Federation admin profiles, admin keys, Cloudflare account selection, and CLI preferences in ~/.downcity/federation.db.
  • Agent runtime status is resolved from each project daemon's local meta/pid files under <project>/.downcity/.debug/.

downcity

downcity is the local management CLI. It handles agent lifecycle, plugins, environment variables, tokens, and Federation connections.

Global commands

CommandDescription
downcity initInitialize City global state (~/.downcity/downcity.db)
downcity updateUpdate the downcity CLI to the latest version
downcity envManage platform environment variables
downcity configManage City configuration
downcity tokenManage API tokens
downcity federationManage Federation connections

Agent commands

CommandDescription
downcity agent create [path]Create and initialize an Agent project
downcity agent listList registered Agent projects
downcity agent start [path]Start an Agent (background or foreground)
downcity agent stop [path]Stop the background Agent daemon
downcity agent restart [path]Restart the background Agent daemon
downcity agent status [path]Show background Agent daemon status
downcity agent doctor [path]Diagnose daemon state files
downcity agent chatChat with an Agent in the terminal
downcity agent historyManage Agent conversation history

Plugin commands

CommandDescription
downcity pluginsManage plugins (interactive or list actions)
downcity plugins scheduleManage plugin scheduling

Chat commands

CommandDescription
downcity chatManage chat plugin resources (interactive)
downcity chat authManage chat authorization

downfed

downfed is the Federation management CLI. It handles deployment, project scaffolding, and admin operations.

CommandDescription
downfedOpen the interactive Federation management interface
downfed manageOpen the admin management interface
downfed server manageEnter the admin workspace for a Federation
downfed server addAdd a deployed Federation URL
downfed query <method> <path>Query the active Federation HTTP API
downfed create [dir]Scaffold a new Federation project
downfed deploy [source]Deploy a Federation project

Global flags

  • --verbose — print detailed progress output
  • --quiet — only print error output
  • --lang <locale> — set CLI language (zh/en)
  • --help — show help for any command

Continue with: