CommandsService
city service list
List all service runtime states for a target agent
city service list
List states of all services under a target agent.
Usage
city service list [--agent <name> | --path <path>] [--host <host>] [--port <port>]Key options
--agent <name>: resolve target by agent name (highest priority)--path <path>: resolve target by project path (default.)--host <host>/--port <port>: override API endpoint resolution
Behavior
- Target path must be registered in console registry.
- When both are passed,
--agenttakes precedence over--path.
Related commands
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 service list --agent <agentName>
{
"success": true,
"services": [
{"name": "chat", "state": "running"},
{"name": "task", "state": "running"}
]
}$ city service list --agent missing-agent
{
"success": false,
"error": "Agent not found in console registry: missing-agent. Run \"city console agents\" to inspect names."
}