CLI Reference

SwarmClaw ships with a built-in CLI for local lifecycle commands and API-backed workspace management.

Usage

swarmclaw
swarmclaw help [command]
swarmclaw run|start|stop|status|doctor|update|version
swarmclaw <group> <command> [args] [options]

Running swarmclaw with no arguments starts the server.

Global Options

FlagDescription
--base-url <url>API base URL (default: http://localhost:3456)
--access-key <key>Access key override
--data <json|@file|->Request JSON body
--query key=valueQuery parameter (repeatable)
--header key=valueExtra HTTP header (repeatable)
--jsonCompact JSON output
--waitWait for run or task completion when IDs are returned
--timeout-ms <ms>Request or wait timeout
--interval-ms <ms>Poll interval for --wait
--out <file>Write binary response to file

Local Lifecycle Commands

swarmclaw run
swarmclaw start
swarmclaw stop
swarmclaw status
swarmclaw doctor
swarmclaw update
swarmclaw version

For advanced local lifecycle control, use:

swarmclaw server --help

Common Workspace Groups

Use swarmclaw <group> --help for the full command list.

agents

swarmclaw agents list
swarmclaw agents get <agentId>

chats

swarmclaw chats list
swarmclaw chats get <chatId>
swarmclaw chats create --name "Main Ops" --agent-id <agentId>
swarmclaw chats messages <chatId>
swarmclaw chats chat <chatId> --data '{"text":"Status update?"}'
swarmclaw chats stop <chatId>

tasks

swarmclaw tasks list
swarmclaw tasks get <taskId>
swarmclaw tasks create --title "Fix flaky test" --agent-id <agentId>
swarmclaw tasks update <taskId> --data '{"status":"running"}'
swarmclaw tasks approve <taskId> --data '{"approved":true}'
swarmclaw tasks import-github --data '{"repo":"owner/repo","state":"open","limit":25}'
swarmclaw tasks metrics --query range=7d

projects and goals

swarmclaw projects list
swarmclaw projects create --data '{"name":"Release Ops","color":"#818CF8"}'
swarmclaw goals list
swarmclaw goals create --data '{"title":"Ship v1.3.5","level":"project"}'

workspaces

swarmclaw workspaces list
swarmclaw workspaces active
swarmclaw workspaces create --json '{"name":"Client A","color":"#10b981"}'
swarmclaw workspaces set-active --json '{"id":"<workspace-id>"}'

workflow-states

swarmclaw workflow-states list
swarmclaw workflow-states create --json '{"label":"Needs PM Sign-off","category":"started","color":"#ec4899"}'
swarmclaw workflow-states delete --query reset=true

config-versions

swarmclaw config-versions list --query entityKind=agent,entityId=<agentId>
swarmclaw config-versions restore --json '{"versionId":"<version-id>"}'

cost-attribution

swarmclaw cost-attribution by-code --query codes=client-a,range=30d
swarmclaw cost-attribution by-code   # all observed codes, all-time

chatroom-policy

swarmclaw chatroom-policy set --json '{"chatroomId":"...","policy":"escalate","escalationTargetAgentId":"..."}'
swarmclaw chatroom-policy simulate --json '{"chatroomId":"...","refusingAgentId":"...","reason":"out of scope"}'

schedules

swarmclaw schedules list
swarmclaw schedules get <scheduleId>
swarmclaw schedules create --name "Daily report" --agent-id <agentId> --task-prompt "Generate report" --schedule-type cron --cron "0 9 * * *"

protocols

swarmclaw protocols list
swarmclaw protocols get <runId>
swarmclaw protocols create --data '{"title":"Review Round","templateId":"review_panel"}'
swarmclaw protocols templates
swarmclaw protocols template-get <templateId>

chatrooms

swarmclaw chatrooms list
swarmclaw chatrooms create --data '{"name":"Ops Room","agentIds":["agent-1","agent-2"]}'
swarmclaw chatrooms chat <chatroomId> --data '{"text":"@all status update?"}'
swarmclaw chatrooms add-member <chatroomId> --data '{"agentId":"agent-3"}'

connectors

swarmclaw connectors list
swarmclaw connectors create --data '{"platform":"slack","agentId":"<agentId>"}'
swarmclaw connectors start <connectorId>
swarmclaw connectors repair <connectorId>

webhooks

swarmclaw webhooks list
swarmclaw webhooks create --data '{"name":"GitHub Push","source":"github","events":["push"],"agentId":"<agentId>","secret":"my-secret"}'
swarmclaw webhooks trigger <webhookId> --payload '{"ref":"refs/heads/main"}'
swarmclaw webhooks history <webhookId>

knowledge

swarmclaw knowledge list
swarmclaw knowledge create --data '{"title":"Runbook","content":"...","tags":["ops"]}'
swarmclaw knowledge upload --data '{"filename":"spec.md"}'
swarmclaw knowledge hygiene
swarmclaw knowledge sources
swarmclaw knowledge source-sync <sourceId>

memory

swarmclaw memory list --query q="deployment checklist"
swarmclaw memory get <memoryId>
swarmclaw memory create --data '{"title":"Deploy note","content":"Rotate keys","category":"note","agentId":"<agentId>"}'
swarmclaw memory maintenance
swarmclaw memory graph

mcp-servers

swarmclaw mcp-servers list
swarmclaw mcp-servers create --data '{"name":"Local MCP","transport":"stdio","command":"npx","args":["-y","some-server"]}'
swarmclaw mcp-servers test <serverId>
swarmclaw mcp-servers tools <serverId>
swarmclaw mcp-servers conformance <serverId>

wallets

swarmclaw wallets list
swarmclaw wallets generate --data '{"agentId":"<agentId>"}'
swarmclaw wallets get <walletId>

autonomy and activity

swarmclaw autonomy estop
swarmclaw autonomy incidents --query limit=50
swarmclaw autonomy reflections --query limit=50
swarmclaw activity list --query entityType=task --query action=updated
swarmclaw usage get --query range=7d

providers and OpenClaw

swarmclaw setup init
swarmclaw setup check-provider --provider ollama --endpoint http://localhost:11434
swarmclaw gateways list
swarmclaw gateways health <gatewayId>
swarmclaw openclaw discover
swarmclaw openclaw deploy-status
swarmclaw openclaw dashboard-url --data '{"agentId":"<agentId>"}'

Notes

  • The CLI exposes many additional API-backed groups beyond the examples above, including notifications, secrets, providers, runs, extensions, files, portability, and more.
  • swarmclaw help <group> or swarmclaw <group> --help is the fastest way to inspect the current command surface for a group.