The Code-Swarm CLI provides commands for managing agents, tasks, and deployments.
code-swarm api [OPTIONS]
Options:
--host TEXT Host to bind to (default: 127.0.0.1)
--port INTEGER Port to bind to (default: 8000)
--reload Enable auto-reload on code changes
--workers INTEGER Number of worker processes (default: 1)Example:
code-swarm api --host 0.0.0.0 --port 8000 --reloadcode-swarm agents list [OPTIONS]
Options:
--role TEXT Filter by role (backend, frontend, etc.)
--status TEXT Filter by status (idle, active, completed)
--format TEXT Output format: json, table (default: table)Example:
code-swarm agents list --role backend --format jsonOutput:
┌─────────┬─────────┬─────────┬──────────┐
│ ID │ Name │ Role │ Status │
├─────────┼─────────┼─────────┼──────────┤
│ agent_1 │ solver │ backend │ idle │
│ agent_2 │ designer│ frontend│ active │
└─────────┴─────────┴─────────┴──────────┘
code-swarm agents create [OPTIONS]
Options:
--name TEXT Agent name (required)
--model TEXT Model ID (default: gpt-4)
--role TEXT Agent role (backend, frontend, etc.)
--capabilities TEXT Comma-separated capabilitiesExample:
code-swarm agents create \
--name solver \
--role backend \
--capabilities code-generation,testingcode-swarm agents show <agent_id>Output:
Agent: solver (agent_1)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Model: gpt-4
Role: backend
Status: idle
Capabilities: code-generation, testing
Created: 2026-05-03 10:00:00 UTC
code-swarm tasks list [OPTIONS]
Options:
--status TEXT Filter by status (pending, active, completed)
--assigned-to TEXT Filter by agent
--format TEXT Output format: json, tableExample:
code-swarm tasks list --status pendingcode-swarm tasks create [OPTIONS]
Options:
--title TEXT Task title (required)
--description TEXT Detailed description
--priority INTEGER Priority level 1-10
--assigned-to TEXT Agent to assign task toExample:
code-swarm tasks create \
--title "Fix login endpoint" \
--description "Add JWT refresh token" \
--priority 8 \
--assigned-to solvercode-swarm tasks show <task_id>Output:
Task: Fix login endpoint (task_1)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Status: active
Priority: 8/10
Assigned: solver
Created: 2026-05-03 10:00:00 UTC
Progress: ████████░░ 80%
Last 5 log entries:
[10:05:20] Analyzing endpoint...
[10:05:25] Found 3 issues
[10:05:30] Generating fix...
[10:06:15] Testing fix...
[10:06:45] Fix validated ✓
code-swarm tasks watch <task_id>
Flags:
--follow Continue watching until completion
--filter Filter logs by agent or actionExample:
code-swarm tasks watch task_1 --followOutput (streaming):
task_1: hermes | Distributing task...
task_1: prometheus | Analyzing requirements...
task_1: zeus | Planning architecture...
task_1: atlas | Generating backend...
task_1: iris | Generating frontend...
task_1: [COMPLETE] ✓ All systems ready
code-swarm deploy vercel [OPTIONS]
Options:
--project TEXT Vercel project name
--env-file TEXT Path to .env file
--production Deploy to productionExample:
code-swarm deploy vercel --project code-swarm --productioncode-swarm deploy k8s [OPTIONS]
Options:
--context TEXT Kubernetes context
--namespace TEXT Target namespace
--replicas INTEGER Number of replicascode-swarm db init
Creates tables and indices in Supabase.code-swarm db migrate
Applies pending schema migrations.code-swarm status
Output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 API Server: healthy
🟢 Database: connected
🟢 Simone-MCP: connected
🟡 Cache: degraded
Active Agents: 3
Running Tasks: 12
Avg Response Time: 145mscode-swarm logs [OPTIONS]
Options:
--tail INTEGER Show last N lines (default: 50)
--agent TEXT Filter by agent
--level TEXT Log level (debug, info, warning, error)
--follow Follow logs in real-timeExample:
code-swarm logs --agent solver --level error --followcode-swarm config show
Output:
SUPABASE_URL: postgresql://...
SIMONE_MCP_URL: http://your-simone-host:8234
PRIMARY_MODEL: gpt-4
ENVIRONMENT: productioncode-swarm config set <KEY> <VALUE>
Example:
code-swarm config set PRIMARY_MODEL gpt-4-turboThe CLI respects all environment variables defined in .env:
export SUPABASE_URL=postgresql://...
export SIMONE_MCP_URL=http://your-simone-host:8234
export PRIMARY_MODEL=gpt-4
export SECRET_KEY=your-secret-key# Create 5 agents at once
for i in {1..5}; do
code-swarm agents create --name "agent-$i" --role backend
done# Export to JSON
code-swarm tasks list --format json > tasks.json
# Export to CSV
code-swarm tasks list --format csv > tasks.csv# Enable debug logging
DEBUG=1 code-swarm api
# Verbose output
code-swarm --verbose agents list# Bash
eval "$(code-swarm --bash-complete)"
# Zsh
eval "$(code-swarm --zsh-complete)"# Global help
code-swarm --help
# Command-specific help
code-swarm agents --help
code-swarm tasks --help
code-swarm deploy --helpLast updated: 2026-05-03