Downcity
CommandsAgent

city agent start

Start agent runtime (background or foreground)

city agent start

Start runtime for a target agent.

Usage

city agent start [path] [options]

Key options

  • -h, --host <host>: service host (default 0.0.0.0)
  • --foreground [enabled]: run in foreground

Behavior

  • Checks console runtime before start.
  • path defaults to current directory .
  • Agent port is always auto-assigned by console.
  • Project ship.json.start.host/port is not required for daemon startup.
  • With --foreground, runs in current terminal; otherwise runs in background mode.
  • --foreground is a temporary terminal session; once terminal exits, the process exits too.

Example Output (Based on Current Implementation)

The examples below are aligned with current command implementations in package/src (including default output mode and field structure). Placeholder values are used for environment-specific fields.

$ city agent start .
city version: 1.0.0
✅ Downcity daemon started
   pid: <pid>
   log: <daemonLogPath>
$ city agent start .
city version: 1.0.0
❌ console is not running. Please run `city console start` first.

Table of Contents