Every command, config, file, and trick โ on one page. Bookmark this.
# macOS / Linux โ installs Node.js + everything curl -fsSL https://openclaw.ai/install.sh | bash # Windows (PowerShell) iwr -useb https://openclaw.ai/install.ps1 | iex # npm global install npm i -g openclaw # Onboard โ interactive wizard openclaw onboard --install-daemon
git clone https://github.com/openclaw/openclaw.git ~/.openclaw cd ~/.openclaw && npm install && npm run build && npm run init openclaw --version
node --version)export NODE_OPTIONS="--max-old-space-size=4096"openclaw --version # Version openclaw doctor # Health check openclaw doctor --deep --yes # Deep scan + auto-fix openclaw test model # Test AI openclaw dashboard # Web UI
All in ~/.openclaw/workspace/ โ agent reads at session start.
| File | Purpose | Loaded |
|---|---|---|
| AGENTS.md | Operating instructions, priorities, workflow rules | Every session |
| SOUL.md | Personality, tone, values, behavioral constraints | Every session |
| USER.md | About you โ name, preferences, style | Every session |
| IDENTITY.md | Agent name, role, goals, voice | Every session |
| TOOLS.md | Local tool notes, calendar IDs, conventions | Every session |
| HEARTBEAT.md | Checklist for periodic heartbeat runs | Heartbeat only |
| BOOT.md | Startup ritual on gateway restart (optional) | Boot hook |
| BOOTSTRAP.md | First-run interview โ auto-deleted after | First run |
| MEMORY.md | Long-term curated memory (optional) | Main DM only |
| memory/YYYY-MM-DD.md | Daily logs โ today + yesterday loaded | Session start |
cd ~/.openclaw/workspace git init && git add AGENTS.md SOUL.md TOOLS.md \ IDENTITY.md USER.md HEARTBEAT.md memory/ git commit -m "Add workspace" git remote add origin <private-repo> git push -u origin main
Never commit: API keys, OAuth tokens, ~/.openclaw/ config.
// ~/.openclaw/openclaw.json โ JSON5 (comments + trailing commas OK) { identity: { name: "Clawd", emoji: "๐ฆ", theme: "helpful lobster" }, agent: { workspace: "~/.openclaw/workspace", model: { primary: "anthropic/claude-sonnet-4-5" }, heartbeat: { every: "30m", target: "last" }, }, channels: { telegram: { enabled: true, botToken: "123456:ABC..." } } }
openclaw config get <key> openclaw config set <key> <val> openclaw config unset <key> openclaw gateway restart # Required after changes
agent: { model: { primary: "anthropic/claude-sonnet-4-5", fallbacks: ["anthropic/claude-opus-4-6", "openai/gpt-5.2"] }}
Auto-rotates auth profiles on rate limits.
openclaw gateway status|start|stop|restart openclaw dashboard # Web UI openclaw tui # Terminal UI
openclaw channels list openclaw channels status --probe openclaw channels login # WhatsApp QR openclaw channels add --channel telegram --token $TOK openclaw channels logs --channel whatsapp
openclaw agents list --bindings openclaw agents add|delete <name> openclaw agents set-identity --from-identity
openclaw logs --follow # Tail live openclaw logs --json # JSON openclaw logs --limit 200 openclaw doctor --deep --yes # Full fix openclaw health --json --verbose
openclaw plugins list|enable|disable clawhub install|uninstall|list|inspect <slug> clawhub update --all
openclaw --dev status openclaw --profile work gateway status openclaw status --json openclaw logs --no-color
Processed by Gateway โ never reaches the AI model.
| Command | What it does |
|---|---|
| /status | Model, context usage, queue, runtime mode |
| /help | Common commands grouped |
| /commands | All commands (paginated on Telegram) |
| /new [model] | Fresh session (alias: /reset) |
| /compact [instr] | Summarize context, free tokens |
| /stop | Abort run + clear queue |
| /think [level] | off, minimal, low, medium, high, xhigh |
| /tts on|off | Toggle text-to-speech |
| /send on|off | Override delivery for session |
| /whoami | Sender identity info |
| /context [mode] | Token usage (list, detail, json) |
Inline shortcuts: /help, /status, /whoami work mid-message.
# Per-message modifiers :think high # Thinking level :model opus # Model override :send off # Suppress delivery :verbose # Verbose mode
Skills auto-register as /skill-name. Use /skill <name> [input]. Auto on for Discord/Telegram.
{ channels: { telegram: {
enabled: true,
botToken: "123456:ABC-DEF..."
}}}Most stable โ persistent API, survives reboots.
{ channels: { whatsapp: {
enabled: true,
allowFrom: ["+1555..."],
groupPolicy: "allowlist"
}}}QR scan required. Breaks on reboot.
{ channels: { discord: {
enabled: true,
token: "BOT_TOKEN",
allowFrom: ["USER_ID"]
}}}localhost:18789memory/YYYY-MM-DD.md โ today + yesterday loadedMEMORY.md โ curated, DM onlymemory_search tool, ~400 token chunksopenclaw memory index --all openclaw memory search "query"
--- name: my-skill description: "What it does" metadata: { "openclaw": { "requires": { "bins": ["uv"], "env": ["API_KEY"] }}} --- # Agent instructions below...
| Key | Default | Effect |
|---|---|---|
| user-invocable | true | Expose as /slash command |
| disable-model-invocation | false | Exclude from prompt |
| command-dispatch | โ | "tool" = bypass model |
| os | all | darwin, linux, win32 |
workspace/skills/~/.openclaw/skills/Name collisions: workspace wins. Hot-reload 250ms.
every: "0m" โ disabledheartbeat: { every: "30m", target: "last", model: "cheap-model", activeHours: { start: "08:00", end: "22:00", timezone: "Europe/Bucharest" } }
// ~/.openclaw/cron/jobs.json { "name": "Morning Brief", "schedule": { "kind": "cron", "expr": "0 8 * * *" }, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "message": "Deliver my briefing." } }
0 7 * * * โ Morning briefing0 18 * * 1-5 โ Weekday evening recap0 10 * * 1 โ Weekly competitive intel0 8 1 * * โ Monthly invoice reminderCron vs Heartbeat: Cron = fixed time. Heartbeat = periodic, notifies only when needed.
| Provider | Format | Auth |
|---|---|---|
| Anthropic | anthropic/claude-* | API key / OAuth |
| OpenAI | openai/gpt-* | API key / OAuth |
| OpenRouter | openrouter/* | Single key |
| google/gemini-* | API key | |
| Ollama | ollama/* | None (local) |
| LM Studio | Custom baseUrl | None (local) |
models: { providers: { "ollama": { baseUrl: "http://localhost:11434", apiKey: "ollama-local", api: "openai-completions" }}}
compaction.softThresholdTokens to flush earlyopenclaw doctor --fix openclaw security audit --deep chmod 700 ~/.openclaw chmod 600 ~/.openclaw/openclaw.json chmod 700 ~/.openclaw/credentials netstat -an | grep 18789 | grep LISTEN grep -r "sk-" ~/.openclaw/
security: { dmPolicy: "paired-only", groupPolicy: "allowlisted", sandboxEnabled: true }
allowFrom per channel for whitelistingper-channel-peer scope for multi-userrequireMention: truecurl|bash, base64, Gatekeeper bypasspip install cisco-ai-skill-scanneropenclaw doctor --deep --yes
Solves 80% of issues.
| Problem | Fix |
|---|---|
| Port conflict | lsof -i :18789 โ kill or change port |
| Context full | /compact or /new |
| Channel down | openclaw channels status --probe |
| No response | openclaw logs --follow |
| WhatsApp drops | Re-scan QR. Use Telegram instead. |
sudo npm i -g openclaw@latest openclaw update status openclaw update wizard
~/.openclaw/ โโโ openclaw.json โ Main config (JSON5) โโโ credentials/ โ OAuth/API keys (chmod 600) โโโ workspace/ โ Agent's home โ โโโ AGENTS.md SOUL.md USER.md IDENTITY.md โ โโโ TOOLS.md HEARTBEAT.md MEMORY.md โ โโโ memory/ โ Daily logs โ โโโ skills/ โ Workspace skills โโโ agents/<id>/sessions/ โ Chat history โโโ skills/ โ Managed skills โโโ memory/<id>.sqlite โ Vector index โโโ cron/jobs.json โ Scheduled tasks โโโ sandboxes/ โ Sandbox workspaces /tmp/openclaw/openclaw-YYYY-MM-DD.log โ Gateway log
| Provider | Quality | Cost |
|---|---|---|
| ElevenLabs | Ultra-realistic | Premium |
| OpenAI TTS | Fast, high-quality | Standard |
| Edge TTS | Multi-language | Free |
Auto: messages.tts.auto: "always" ยท Toggle: /tts on|off
openclaw browser fill --fields \ '[{"ref":"name","value":"John"}]' openclaw sandbox list|recreate|explain
Navigate, click, screenshot, extract. Needs browser.enabled: true.