Downcity
Commands

Command Environment Requirements

Explain required command environment, files, and env-variable priority for current city command groups

Command Environment Requirements

This page answers one question: what environment each studio command group needs to run correctly.

0) Top-level command boundary

Top-level command groups are:

  • studio console
  • studio agent
  • studio plugin

Commands like studio chat, studio task, studio memory, studio shell, studio skill, studio asr, and studio tts are plugin commands, not top-level roots.

1) Environment by command group

Command GroupRequired EnvironmentOptional EnvironmentNotes
studio initWritable ~/.downcity/NoneWrites ~/.downcity/downcity.db
studio start/stop/restart/statusWritable ~/.downcity/console/NoneManages global console process and registry
studio consoleConsole is running; browser can reach UI port--host, --portSingle UI instance can switch across multiple running agents
studio agent createWritable target directoryNoneGenerates downcity.json, PROFILE.md, .downcity/
studio agent startConsole is running; project has downcity.json + PROFILE.md--hostAgent port is allocated by console and registered into console registry
studio agent restart/status/doctorTarget agent is registered in console registryNoneOperates through registry resolution
studio config ...Valid downcity.json exists under target path--pathReads/writes project config; does not call agent API
studio plugin list/statusNone--jsonStatic plugin catalog; does not resolve any agent
studio plugin start/stop/restart/commandTarget agent is running--agent, --path, --host, --portUsed for managed plugins
studio plugin action ...Project has downcity.json--pathAdvanced local execution form
studio <managed-plugin> <action>Target agent is running--path, --host, --portExamples: studio chat, studio task, studio memory, studio shell
studio <local-plugin> <action>Project has downcity.json--pathExamples: studio skill, studio web, studio asr, studio tts

2) Runtime transport

Default rule:

  1. no --host / --port: use the local agent daemon HTTP endpoint resolved from the target project
  2. --host or --port provided: override the endpoint and use HTTP with the given host/port

Bearer-token resolution matters only when the target HTTP endpoint currently requires auth.

3) DC_AUTH_TOKEN

For most local usage, you do not need to care about auth env vars.

Managed-runtime calls default to the local daemon HTTP endpoint. DC_AUTH_TOKEN matters only when that HTTP endpoint requires auth.

Priority order:

  1. explicit --token
  2. DC_AUTH_TOKEN

4) Context env requirements for common commands

studio chat ...

  • If --chat-key is omitted, it tries DC_CTX_CHAT_KEY
  • If --session-id is omitted, it first tries DC_SESSION_ID

studio task ...

  • Task creation and run need sessionId
  • Pass --session-id explicitly, or rely on DC_SESSION_ID

Use plugin roots for day-to-day work:

studio chat send --chat-key ctx_xxx --text "hi"
studio task list
studio memory search "release decision"
studio plugin list