Complete reference for every
goclawcommand, subcommand, and flag.
The goclaw binary is a single executable that starts the gateway and provides management subcommands. Global flags apply to all commands.
goclaw [global flags] <command> [subcommand] [flags] [args]Global flags
| Flag | Default | Description |
|---|---|---|
--config <path> |
config.json |
Config file path. Also read from $GOCLAW_CONFIG |
-v, --verbose |
false | Enable debug logging |
Running goclaw with no subcommand starts the gateway.
./goclaw
source .env.local && ./goclaw # with secrets loaded
GOCLAW_CONFIG=/etc/goclaw.json ./goclawOn first run (no config file), the setup wizard launches automatically.
Print version and protocol number.
goclaw version
# goclaw v1.2.0 (protocol 3)Interactive setup wizard — configure provider, model, gateway port, channels, features, and database.
goclaw onboardSteps:
- AI provider + API key (OpenRouter, Anthropic, OpenAI, Groq, DeepSeek, Gemini, Mistral, xAI, MiniMax, Cohere, Perplexity, Claude CLI, Custom)
- Gateway port (default: 18790)
- Channels (Telegram, Zalo OA, Feishu/Lark)
- Features (memory, browser automation)
- TTS provider
- PostgreSQL DSN
Saves config.json (no secrets) and .env.local (secrets only).
Environment-based auto-onboard — if the required env vars are set, the wizard is skipped and setup runs non-interactively (useful for Docker/CI).
Manage agents — add, list, delete, and chat.
List all configured agents.
goclaw agent list
goclaw agent list --json| Flag | Description |
|---|---|
--json |
Output as JSON |
Interactive wizard to add a new agent.
goclaw agent addPrompts: agent name, display name, provider (or inherit), model (or inherit), workspace directory. Saves to config.json. Restart gateway to activate.
Delete an agent from config.
goclaw agent delete <agent-id>
goclaw agent delete researcher --force| Flag | Description |
|---|---|
--force |
Skip confirmation prompt |
Also removes bindings referencing the deleted agent.
Send a one-shot message to an agent via the running gateway.
goclaw agent chat "What files are in the workspace?"
goclaw agent chat --agent researcher "Summarize today's news"
goclaw agent chat --session my-session "Continue where we left off"| Flag | Default | Description |
|---|---|---|
--agent <id> |
default |
Target agent ID |
--session <key> |
auto | Session key to resume |
--json |
false | Output response as JSON |
Database migration management. All subcommands require GOCLAW_POSTGRES_DSN.
goclaw migrate [--migrations-dir <path>] <subcommand>| Flag | Description |
|---|---|
--migrations-dir <path> |
Path to migrations directory (default: ./migrations) |
Apply all pending migrations.
goclaw migrate upAfter SQL migrations, runs pending Go-based data hooks.
Roll back migrations.
goclaw migrate down # roll back 1 step
goclaw migrate down -n 3 # roll back 3 steps| Flag | Default | Description |
|---|---|---|
-n, --steps <n> |
1 | Number of steps to roll back |
Show current migration version.
goclaw migrate version
# version: 10, dirty: falseForce-set the migration version without applying SQL (use after manual fixes).
goclaw migrate force 9Migrate to a specific version (up or down).
goclaw migrate goto 5DANGEROUS. Drop all tables.
goclaw migrate dropUpgrade database schema and run data migrations. Idempotent — safe to run multiple times.
goclaw upgrade
goclaw upgrade --dry-run # preview without applying
goclaw upgrade --status # show current upgrade status| Flag | Description |
|---|---|
--dry-run |
Show what would be done without applying |
--status |
Show current schema version and pending hooks |
Gateway startup also checks schema compatibility. Set GOCLAW_AUTO_UPGRADE=true to auto-upgrade on startup.
Manage device pairing — approve, list, and revoke paired devices.
List pending pairing requests and paired devices.
goclaw pairing listApprove a pairing code. Interactive selection if no code given.
goclaw pairing approve # interactive picker
goclaw pairing approve ABCD1234 # approve specific codeRevoke a paired device.
goclaw pairing revoke telegram 123456789View and manage chat sessions. Requires gateway to be running.
List all sessions.
goclaw sessions list
goclaw sessions list --agent researcher
goclaw sessions list --json| Flag | Description |
|---|---|
--agent <id> |
Filter by agent ID |
--json |
Output as JSON |
Delete a session.
goclaw sessions delete "telegram:123456789"Clear session history while keeping the session record.
goclaw sessions reset "telegram:123456789"Manage scheduled cron jobs. Requires gateway to be running.
List cron jobs.
goclaw cron list
goclaw cron list --all # include disabled jobs
goclaw cron list --json| Flag | Description |
|---|---|
--all |
Include disabled jobs |
--json |
Output as JSON |
Delete a cron job.
goclaw cron delete 3f5a8c2bEnable or disable a cron job.
goclaw cron toggle 3f5a8c2b true
goclaw cron toggle 3f5a8c2b falseView and manage configuration.
Display current configuration with secrets redacted.
goclaw config showPrint the config file path being used.
goclaw config path
# /home/user/goclaw/config.jsonValidate the config file syntax and structure.
goclaw config validate
# Config at config.json is valid.List and manage messaging channels.
List configured channels and their status.
goclaw channels list
goclaw channels list --json| Flag | Description |
|---|---|
--json |
Output as JSON |
Output columns: CHANNEL, ENABLED, CREDENTIALS (ok/missing).
List and inspect skills.
Store directories (searched in order):
{workspace}/skills/— agent-specific skills (workspace is per-agent, file-based)~/.goclaw/skills/— global skills shared across all agents (file-based)~/.goclaw/skills-store/— managed skills uploaded via API/dashboard (file content stored here, metadata in PostgreSQL)
List all available skills.
goclaw skills list
goclaw skills list --json| Flag | Description |
|---|---|
--json |
Output as JSON |
Show content and metadata for a specific skill.
goclaw skills show sequential-thinkingList configured AI models and providers.
goclaw models list
goclaw models list --json| Flag | Description |
|---|---|
--json |
Output as JSON |
Shows default model, per-agent overrides, and which providers have API keys configured.
Check system environment and configuration health.
goclaw doctorChecks: binary version, config file, database connectivity, schema version, providers, channels, external binaries (docker, curl, git), workspace directory.
Manage OAuth authentication for LLM providers. Requires the gateway to be running.
Show OAuth authentication status (currently: OpenAI OAuth).
goclaw auth statusUses GOCLAW_GATEWAY_URL, GOCLAW_HOST, GOCLAW_PORT, and GOCLAW_TOKEN env vars to connect.
Remove stored OAuth tokens.
goclaw auth logout # removes openai OAuth tokens
goclaw auth logout openai- WebSocket Protocol — wire protocol reference for the gateway
- REST API — HTTP API endpoint listing
- Config Reference — full
config.jsonschema