โ๏ธ Core CLI Commands
Run these from any shell with the OpenClaw CLI installed.
| Command | Purpose |
|---|---|
openclaw gateway | Run the Gateway in the foreground. |
openclaw gateway start / restart | Start or restart the Gateway service. |
openclaw channels add | Add or update a channel account. |
openclaw channels list | List configured channels and auth profiles. |
openclaw channels status --probe | Channel health + live probe checks. |
openclaw status --deep | Gateway + channel deep health probe. |
openclaw onboard | Guided setup for gateway, workspace, and skills. |
openclaw setup | Initialize config + workspace (wizard mode available). |
openclaw doctor | Health checks + quick fixes. |
openclaw models list | List configured models (or --all for full catalog). |
openclaw models set <model> | Switch the default model. |
openclaw models status | Show model auth + health (use --probe for live). |
openclaw models auth setup-token --provider anthropic | Paste a Claude setup-token on the gateway host. |
Install:
npm install -g openclaw@latest โ openclaw onboard โ openclaw gateway
๐๏ธ Workspace Anatomy
Key files in your agent workspace (the assistant reads these every session).
| File | Why it matters |
|---|---|
AGENTS.md | Instructions for the agent & workflow rules. |
SOUL.md | Persona and personality. |
USER.md | User preferences and context. |
IDENTITY.md | Agent name, theme, avatar. |
MEMORY.md | Curated long-term memory. |
memory/YYYY-MM-DD.md | Daily logs / short-term memory. |
HEARTBEAT.md | Periodic checks + proactive tasks. |
BOOT.md | Startup instructions run on gateway boot (via hooks). |
.openclaw/ | Project-level config + state. |
๐ง Memory & Models
Memory Search
openclaw memory search --query "deployment notes"openclaw memory statusopenclaw memory index --force- In chat: use
memory_searchtool (vector search).
Model Switching
openclaw models list --provider anthropicopenclaw models set claude-3-5-sonnetopenclaw models status --probe- Auth via wizard:
openclaw onboard --auth-choice setup-token
๐งฉ Hooks & Skills
| Command | Purpose |
|---|---|
openclaw hooks list | List installed hooks. |
openclaw hooks enable <id> | Enable a hook (e.g., boot-md). |
openclaw skills list | List available skills. |
openclaw skills check | Verify skill dependencies. |
clawhub search "gmail" | Search community skills. |
clawhub install <slug> | Install a ClawHub skill. |
โจ๏ธ In-Chat Slash Commands
| Command | Use |
|---|---|
/context list / /context <id> | Inspect or switch context. |
/compact | Compress the conversation context. |
/new | Start a fresh session. |
/stop | Abort current tool/action. |
/tts on / /tts off | Toggle text-to-speech. |
Full list: Slash Commands QRG โ
๐ฑ Channel Management
| Channel | Quick Command | Notes |
|---|---|---|
openclaw channels login --channel whatsapp | Shows QR code for WhatsApp Web pairing. | |
| Telegram | openclaw channels add --channel telegram --token <token> | Bot token from @BotFather. |
| Discord | openclaw channels add --channel discord --token <token> | Bot token from Discord dev portal. |
| Slack | openclaw channels add --channel slack --bot-token ... --app-token ... | Requires bot + app token. |
| iMessage (macOS) | openclaw channels add --channel imessage | Uses local Messages DB + imsg CLI. |
More: Channel guides โ
๐ Voice & TTS
- Providers: OpenAI, ElevenLabs, Edge TTS (free).
- Toggle speech per chat:
/tts onor/tts off. - Configure provider keys during
openclaw onboardor via the config wizard.
๐งฏ Troubleshooting Fast Path
| Symptom | Command | What it checks |
|---|---|---|
| No DM reply | openclaw channels status --probe | Channel connectivity + auth. |
| Silent in group chat | openclaw channels status --probe | Group allowlists + permissions. |
| Auth expired | openclaw models status --probe | Model auth validity + live probes. |
| Gateway down | openclaw gateway status | Service status + optional probe. |
| Memory bugs | openclaw memory status | Index state + provider health. |
| Memory index stale | openclaw memory index --force | Rebuild vector index. |
| Everything weird | openclaw doctor | Full diagnostic sweep. |
Deep dive: Troubleshooting guide โ
๐ค Automation & Research
Browser Automation
openclaw browser statusopenclaw browser startopenclaw browser snapshot
Cron Jobs
openclaw cron listopenclaw cron addopenclaw cron runs
Subagents & Sessions
openclaw agents listopenclaw sessions list- Use
/newto start a fresh thread.
Heartbeat System
openclaw system heartbeat lastopenclaw system heartbeat enableopenclaw system heartbeat disable