Quick Reference Guide
OpenClaw

MEGA CHEATSHEET

The most comprehensive reference for OpenClaw operators and developers

⚙️Config
OpenClaw Cheatsheet Visual
👁️ VIEW PNG

Visual Reference Edition

⌨️

Core CLI Commands

openclaw gatewayRun WebSocket Gateway server
--port --bind --token
openclaw gateway start|stop|restartManage Gateway service (launchd/systemd)
openclaw channels loginWhatsApp QR pairing (Web flow)
openclaw channels addAdd Telegram/Discord/Slack bot
--token
openclaw channels status --probeCheck channel health + connectivity
openclaw onboardInteractive setup wizard
--install-daemon
openclaw doctorHealth checks + quick fixes
--deep --yes
openclaw config get|set|unsetRead/write config values (JSON5 or raw)
openclaw models list|set|statusModel management + auth status
openclaw models auth setup-tokenPreferred Anthropic auth flow
openclaw models fallbacks add|removeConfigure model fallback chain
openclaw memory status|index|searchVector search over MEMORY.md + daily logs
openclaw agents list|add|deleteMulti-agent workspace management
openclaw logs --followTail Gateway file logs via RPC
openclaw status --all --deepFull diagnosis (pasteable)
--usage
openclaw sessions --jsonList stored conversation sessions
openclaw security auditAudit config for security foot-guns
--fix
openclaw browser start|tabs|screenshotHeadless browser automation
openclaw cron list|add|runScheduled job management
openclaw pairing list|approveApprove DM pairing requests
openclaw reset --scopeReset config/creds/sessions/full

Global Flags

--dev

Isolate state under ~/.openclaw-dev, shift ports

--profile <name>

Isolate state under ~/.openclaw-<name>

--no-color

Disable ANSI colors (respects NO_COLOR=1)

--json

Machine-readable output (disables styling)

-V, --version

Print version and exit

🚀

Quick Start & Installation

Global Install

Terminal
npm install -g openclaw@latest

Onboarding

1

Guided Setup

openclaw onboard --install-daemon
2

Channel Link

openclaw channels login
3

Start Gateway

openclaw gateway --port 18789

Onboard Flags

  • --mode localLocal gateway mode
  • --mode remoteConnect to remote gateway
  • --flow quickstartMinimal setup
  • --skip-channelsSkip channel setup
💬

Channel Setup

📱
WhatsAppQR Scan
openclaw channels login
✈️
TelegramBot Token
channels add --channel telegram --token $TOKEN
🎮
DiscordBot Token
channels add --channel discord --token $TOKEN
💬
iMessagemacOS Native
macOS bridge
🏢
SlackBot Token
channels add --channel slack
💬
Google ChatService Account
channels add --channel googlechat
🔒
SignalLinked Device
channels add --channel signal
📎
MS TeamsBot Registration
channels add --channel msteams

Quick Diagnostics

Status: openclaw channels status --probe

Logs: openclaw channels logs --channel [id]

📁

Workspace Files

🤖AGENTS.md

Operating instructions for the agent

SOUL.md

Persona, tone, boundaries

👤USER.md

User info & preferences

🆔IDENTITY.md

Agent name, emoji, theme

🧠MEMORY.md

Curated long-term memory (DM only)

📅memory/YYYY-MM-DD.md

Daily append-only log

🔧TOOLS.md

Local tool notes

💓HEARTBEAT.md

Heartbeat checklist

BOOT.md

Startup checklist

⚠️ Root: ~/.openclaw/workspace

🧠

Memory System

Daily Logsmemory/YYYY-MM-DD.md

Append-only, read today + yesterday at session start

Long-Term MemoryMEMORY.md

Curated facts, only loaded in main DM session

Vector Searchmemory_search tool

Semantic search over memory chunks (~400 tokens)

ProvidersmemorySearch.provider

Auto-select: local GGUF → OpenAI → Gemini → Voyage

QMD Backendmemory.backend = "qmd"

BM25 + vectors + reranking (experimental)

Hybrid Search0.7/0.3 default weights

Vector similarity + BM25 keyword relevance

openclaw memory index --allopenclaw memory search "X"
🤖

Models & Auth

openclaw models list --allView all available models
openclaw models set <model>Set agents.defaults.model.primary
openclaw models set-image <model>Set default image model
openclaw models fallbacks add <model>Add to fallback chain
openclaw models auth setup-tokenPreferred Anthropic auth (OAuth)
openclaw models auth add --provider <p>Add provider API key
openclaw models status --probeLive probe configured auth profiles
openclaw models aliases add <a> <m>Create model alias

Failover & Cooldowns

1 min
5 min
1 hour
🔐

Sessions

session.dmScope

main (default) | per-peer | per-channel-peer | per-account-channel-peer

session.reset.mode

daily (default, 4am local) | idle

session.reset.idleMinutes

Sliding idle window (whichever expires first wins)

session.resetByType

Override policy for dm, group, thread sessions

session.resetByChannel

Per-channel override (takes precedence)

session.identityLinks

Map provider:id → canonical identity for cross-channel

session.sendPolicy

Block delivery for specific session types

session.store

~/.openclaw/agents/{agentId}/sessions/sessions.json

SECURITY USE per-channel-peer FOR MULTI-USER INBOXES TO PREVENT CONTEXT LEAKAGE.

Slash Commands

/statusSession health + context usage + WhatsApp cred status
/context listWhat's in the context window (biggest contributors)
/context detailFull system prompt + injected workspace files
/model <model>Switch model for this session (or /model list)
/compact [instructions]Summarize older context, free up window space
/new [model]Start fresh session (optional: set model)
/resetAlias for /new
/stopAbort current run + clear queued followups
/send on|off|inheritOverride delivery for this session
/tts on|offToggle text-to-speech
/think|/verboseToggle reasoning/verbose mode
/configPersisted config changes
/debugRuntime-only config overrides (requires commands.debug: true)
🔊

Text-to-Speech

ElevenLabsPremium

Ultra-realistic, higher latency

OpenAIStandard

Fast, high-quality voices

Edge TTSFree

No API key, multi-language support

Enable Auto-TTS

messages.tts.auto: "always"
📊

Logging & Diagnostics

openclaw logs --followTail Gateway file logs (colorized in TTY)
openclaw logs --jsonLine-delimited JSON (one event per line)
openclaw logs --limit 200Limit number of log lines
openclaw channels logs --channel whatsappChannel-specific logs

OTel Export Config

"diagnostics": { "otel": { "enabled": true } }
🌐

Browser & Cron

Browser Ops

openclaw browser start|stopStart/stop headless instance
openclaw browser tabsList all open pages
openclaw browser open <url>Open URL in new tab
openclaw browser screenshotCapture active view
openclaw browser navigate <url>Navigate current tab
openclaw browser click|type|pressDOM interactions
openclaw browser evaluate <js>Run JavaScript in page
openclaw browser pdfExport page as PDF

Cron Jobs

openclaw cron listView scheduled jobs
openclaw cron addCreate new scheduled job
openclaw cron edit <id>Edit existing job
openclaw cron enable|disable <id>Toggle job
openclaw cron run <id>Manual trigger
openclaw cron runsView run history
🔗

Hooks & Automation

Bundled Hooks

💾session-memorycommand:new

Save session context to memory on /new

📝command-loggercommand

Log all commands to audit file

🚀boot-mdgateway:startup

Run BOOT.md on gateway start

😈soul-evilagent:bootstrap

Swap SOUL.md during purge window

openclaw hooks listList all discovered hooks
openclaw hooks enable <name>Enable a hook
openclaw hooks disable <name>Disable a hook
openclaw hooks info <name>Show hook details
openclaw hooks checkCheck eligibility

Event Types

command:newWhen /new is issued
command:resetWhen /reset is issued
command:stopWhen /stop is issued
gateway:startupAfter channels start
agent:bootstrapBefore workspace files injected
🧩

Skills System

Skill Precedence

1
<workspace>/skills/
Per-agent, highest precedence
2
~/.openclaw/skills/
Managed/local, shared across workspaces
3
Bundled skills
Shipped with OpenClaw (lowest)

ClawHub Registry

clawhub install <slug>Install skill from ClawHub
clawhub update --allUpdate all installed skills
clawhub sync --allScan and publish updates

SKILL.md Format

---
name: my-skill
description: "What this skill does"
metadata: { "openclaw": { "requires": {...} } }
---
👥

Multi-Agent Routing

Isolated Workspaces

Each agent has own AGENTS.md, SOUL.md, USER.md

Per-Agent Auth

Separate auth profiles per agentDir

Session Store

Chat history under ~/.openclaw/agents/<id>/sessions

Bindings

Route messages by channel, accountId, peer

Routing Precedence

1
peer (exact DM/group id)
Highest precedence
2
guildId (Discord)
Guild-level routing
3
teamId (Slack)
Team-level routing
4
accountId
Account-level routing
5
channel
Channel-wide fallback
6
default agent
Final fallback
openclaw agents add <name>openclaw agents list --bindings
💓

Heartbeat System

heartbeat.everyInterval (default: 30m, 1h for Anthropic OAuth)
heartbeat.targetlast | none | <channel id>
heartbeat.toOptional recipient override
heartbeat.modelModel override for heartbeat runs
heartbeat.promptCustom prompt body
heartbeat.activeHoursRestrict to time window (start/end/timezone)

CONTRACT Reply HEARTBEAT_OK if nothing needs attention. Agent strips and drops OK-only replies.

HEARTBEAT.md Example

# Heartbeat checklist
- Quick scan: anything urgent?
- Daytime: lightweight check-in
- Blocked? Note what's missing
🔐

Sandboxing

sandbox.mode

"off"

No sandboxing, tools run on host

"non-main"

Sandbox only non-main sessions (default)

"all"

Every session runs in sandbox

sandbox.scope

"session"

One container per session (default)

"agent"

One container per agent

"shared"

One container for all sandboxed sessions

workspaceAccess

"none"

Tools see sandbox workspace only (default)

"ro"

Read-only mount at /agent

"rw"

Read/write mount at /workspace

Setup Image

scripts/sandbox-setup.sh

Default image: openclaw-sandbox:bookworm-slim

🎯

Sub-Agents

Parallel Work

Run research/long tasks without blocking

Session Isolation

Own session key + optional sandbox

Auto-Announce

Results posted to requester chat channel

Auto-Archive

Sessions archived after 60m (configurable)

/subagents listList active sub-agents
/subagents stop <id|#|all>Stop sub-agent runs
/subagents log <id|#>View sub-agent logs
/subagents info <id|#>Show run metadata
/subagents send <id|#> <msg>Send message to sub-agent

sessions_spawn Tool

{ task, label?, model?, thinking?,
  runTimeoutSeconds?, cleanup? }

Returns: { status, runId, childSessionKey }

🔧

Troubleshooting

No DM Replyopenclaw pairing list → approve pending requests
Silent in GroupCheck mentionPatterns config (agent needs @mention)
Auth Expiredopenclaw models auth setup-token --provider anthropic
Gateway Downopenclaw doctor --deep (scans for extra installs)
Memory Not Indexingopenclaw memory index (reindex memory files)
Context Full/compact or /new (start fresh session)
Channel Disconnectedopenclaw channels status --probe
Session Issuesopenclaw reset --scope sessions
Universal Fix Command
openclaw doctor --deep --yes

Health checks + quick fixes + system service scans.

📂

Key Paths

~/.openclaw/openclaw.jsonMain configuration file
~/.openclaw/workspace/Default agent workspace
~/.openclaw/agents/<id>/Per-agent state directory
~/.openclaw/agents/<id>/sessions/Session store + transcripts
~/.openclaw/credentials/OAuth/API keys
~/.openclaw/memory/<agentId>.sqliteVector index store
/tmp/openclaw/openclaw-YYYY-MM-DD.logGateway log file

TIP Use --dev or --profile <name> to isolate state under different directories.