Updated Feb 2026 ยท v2026.2.19+

The OpenClaw Cheatsheet

Every command, config, file, and trick โ€” on one page. Bookmark this.

โšก

Quick Install

One-Liner CLI

# 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

From Source Advanced

git clone https://github.com/openclaw/openclaw.git ~/.openclaw
cd ~/.openclaw && npm install && npm run build && npm run init
openclaw --version

Requirements

  • Node.js 22+ (node --version)
  • macOS 14+, Linux, or Windows (WSL2)
  • AI API key โ€” Anthropic (recommended), OpenAI, or OpenRouter
  • Low RAM? export NODE_OPTIONS="--max-old-space-size=4096"

Post-Install

openclaw --version          # Version
openclaw doctor              # Health check
openclaw doctor --deep --yes # Deep scan + auto-fix
openclaw test model          # Test AI
openclaw dashboard            # Web UI
๐Ÿ“

Workspace Files

File Reference Files

All in ~/.openclaw/workspace/ โ€” agent reads at session start.

FilePurposeLoaded
AGENTS.mdOperating instructions, priorities, workflow rulesEvery session
SOUL.mdPersonality, tone, values, behavioral constraintsEvery session
USER.mdAbout you โ€” name, preferences, styleEvery session
IDENTITY.mdAgent name, role, goals, voiceEvery session
TOOLS.mdLocal tool notes, calendar IDs, conventionsEvery session
HEARTBEAT.mdChecklist for periodic heartbeat runsHeartbeat only
BOOT.mdStartup ritual on gateway restart (optional)Boot hook
BOOTSTRAP.mdFirst-run interview โ€” auto-deleted afterFirst run
MEMORY.mdLong-term curated memory (optional)Main DM only
memory/YYYY-MM-DD.mdDaily logs โ€” today + yesterday loadedSession start

What Goes Where Tip

  • AGENTS.md โ†’ stable rules, not temp tasks
  • SOUL.md โ†’ personality & ethics, not tickets
  • USER.md โ†’ personalization (tone, formatting)
  • TOOLS.md โ†’ guidance only, doesn't control access
  • MEMORY.md โ†’ curated facts, not transcripts

Git Backup CLI

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.

โš™๏ธ

Configuration openclaw.json

Starter Config 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..." } }
}

Config CLI CLI

openclaw config get <key>
openclaw config set <key> <val>
openclaw config unset <key>
openclaw gateway restart  # Required after changes

Model Fallbacks Config

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.

โŒจ๏ธ

Core CLI Commands

Gateway CLI

openclaw gateway status|start|stop|restart
openclaw dashboard         # Web UI
openclaw tui               # Terminal UI

Channels CLI

openclaw channels list
openclaw channels status --probe
openclaw channels login          # WhatsApp QR
openclaw channels add --channel telegram --token $TOK
openclaw channels logs --channel whatsapp

Agents CLI

openclaw agents list --bindings
openclaw agents add|delete <name>
openclaw agents set-identity --from-identity

Logs & Diagnostics CLI

openclaw logs --follow        # Tail live
openclaw logs --json          # JSON
openclaw logs --limit 200
openclaw doctor --deep --yes  # Full fix
openclaw health --json --verbose

Skills & Plugins CLI

openclaw plugins list|enable|disable
clawhub install|uninstall|list|inspect <slug>
clawhub update --all

Global Flags CLI

openclaw --dev status
openclaw --profile work gateway status
openclaw status --json
openclaw logs --no-color
๐Ÿ’ฌ

Slash Commands

In-Chat Commands Slash

Processed by Gateway โ€” never reaches the AI model.

CommandWhat it does
/statusModel, context usage, queue, runtime mode
/helpCommon commands grouped
/commandsAll commands (paginated on Telegram)
/new [model]Fresh session (alias: /reset)
/compact [instr]Summarize context, free tokens
/stopAbort run + clear queue
/think [level]off, minimal, low, medium, high, xhigh
/tts on|offToggle text-to-speech
/send on|offOverride delivery for session
/whoamiSender identity info
/context [mode]Token usage (list, detail, json)

Inline shortcuts: /help, /status, /whoami work mid-message.

Directives Slash

# Per-message modifiers
:think high    # Thinking level
:model opus    # Model override
:send off      # Suppress delivery
:verbose       # Verbose mode

Skill Commands Slash

Skills auto-register as /skill-name. Use /skill <name> [input]. Auto on for Discord/Telegram.

๐Ÿ“ฑ

Channel Setup

Telegram Config

{ channels: { telegram: {
  enabled: true,
  botToken: "123456:ABC-DEF..."
}}}

Most stable โ€” persistent API, survives reboots.

WhatsApp Config

{ channels: { whatsapp: {
  enabled: true,
  allowFrom: ["+1555..."],
  groupPolicy: "allowlist"
}}}

QR scan required. Breaks on reboot.

Discord Config

{ channels: { discord: {
  enabled: true,
  token: "BOT_TOKEN",
  allowFrom: ["USER_ID"]
}}}

Others

  • iMessage โ€” macOS only, Shortcuts bridge
  • Slack โ€” Bot + App Token + Signing Secret
  • Signal โ€” requires signal-cli
  • WebChat โ€” built-in at localhost:18789
  • Extensions: MS Teams, Matrix, Zalo, Voice Call
๐Ÿง 

Memory System

How It Works

  • Daily logs memory/YYYY-MM-DD.md โ€” today + yesterday loaded
  • Long-term MEMORY.md โ€” curated, DM only
  • Vector search โ€” memory_search tool, ~400 token chunks
  • Providers: local GGUF โ†’ OpenAI โ†’ Gemini โ†’ Voyage
  • Flush at 40k tokens โ†’ distills to daily log

CLI + Tips CLI

openclaw memory index --all
openclaw memory search "query"
  • Tell agent "save this to memory" for important facts
  • Keep MEMORY.md compact โ€” decisions, not transcripts
  • Memory files are .md โ€” edit directly, git-back them
๐Ÿงฉ

Skills & ClawHub

SKILL.md Format File

---
name: my-skill
description: "What it does"
metadata: { "openclaw": { "requires": {
  "bins": ["uv"], "env": ["API_KEY"]
}}}
---
# Agent instructions below...

Frontmatter Keys

KeyDefaultEffect
user-invocabletrueExpose as /slash command
disable-model-invocationfalseExclude from prompt
command-dispatchโ€”"tool" = bypass model
osalldarwin, linux, win32

Priority

  • Workspace (highest) โ€” workspace/skills/
  • Managed โ€” ~/.openclaw/skills/
  • Bundled (lowest) โ€” ships with OpenClaw

Name collisions: workspace wins. Hot-reload 250ms.

๐Ÿ’“

Heartbeat System

How It Works

  • Default: every 30m (1h Anthropic OAuth)
  • Reads HEARTBEAT.md strictly
  • HEARTBEAT_OK โ†’ suppressed, no notification
  • Empty file โ†’ skipped (saves tokens)
  • every: "0m" โ†’ disabled

Config Config

heartbeat: {
  every: "30m", target: "last",
  model: "cheap-model",
  activeHours: { start: "08:00", end: "22:00",
    timezone: "Europe/Bucharest" }
}
โฐ

Cron Jobs

Job Format Config

// ~/.openclaw/cron/jobs.json
{ "name": "Morning Brief",
  "schedule": { "kind": "cron", "expr": "0 8 * * *" },
  "sessionTarget": "isolated",
  "payload": { "kind": "agentTurn",
    "message": "Deliver my briefing." }
}

Examples Tip

  • 0 7 * * * โ€” Morning briefing
  • 0 18 * * 1-5 โ€” Weekday evening recap
  • 0 10 * * 1 โ€” Weekly competitive intel
  • 0 8 1 * * โ€” Monthly invoice reminder

Cron vs Heartbeat: Cron = fixed time. Heartbeat = periodic, notifies only when needed.

๐Ÿค–

Model Providers

Supported

ProviderFormatAuth
Anthropicanthropic/claude-*API key / OAuth
OpenAIopenai/gpt-*API key / OAuth
OpenRouteropenrouter/*Single key
Googlegoogle/gemini-*API key
Ollamaollama/*None (local)
LM StudioCustom baseUrlNone (local)

Local LLM Config

models: { providers: { "ollama": {
  baseUrl: "http://localhost:11434",
  apiKey: "ollama-local",
  api: "openai-completions"
}}}

Cost Tips Tip

  • Cheap model for heartbeats
  • Claude Max $200/mo flat = no per-token billing
  • Gemini free tier for basics
  • Ollama = $0, local, private
  • Edge TTS = free voice
  • Set compaction.softThresholdTokens to flush early
๐Ÿ”

Security Essentials

Hardening Security

openclaw 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/

DM & Group Policies Config

security: {
  dmPolicy: "paired-only",
  groupPolicy: "allowlisted",
  sandboxEnabled: true
}
  • allowFrom per channel for whitelisting
  • per-channel-peer scope for multi-user
  • Groups: requireMention: true

Skill Vetting Security

  • Red flags: curl|bash, base64, Gatekeeper bypass
  • Cisco scanner: pip install cisco-ai-skill-scanner
  • Check for zero-width Unicode in SKILL.md
  • Never install skills with auto-update behavior
๐Ÿ”ง

Troubleshooting

Universal Fix

openclaw doctor --deep --yes

Solves 80% of issues.

Common Issues

ProblemFix
Port conflictlsof -i :18789 โ†’ kill or change port
Context full/compact or /new
Channel downopenclaw channels status --probe
No responseopenclaw logs --follow
WhatsApp dropsRe-scan QR. Use Telegram instead.

Update CLI

sudo npm i -g openclaw@latest
openclaw update status
openclaw update wizard
๐Ÿ“‚

Key Paths

Directory Structure

~/.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
๐Ÿ”Š

Voice & TTS

TTS Providers

ProviderQualityCost
ElevenLabsUltra-realisticPremium
OpenAI TTSFast, high-qualityStandard
Edge TTSMulti-languageFree

Auto: messages.tts.auto: "always" ยท Toggle: /tts on|off

Browser Automation CLI

openclaw browser fill --fields \
  '[{"ref":"name","value":"John"}]'
openclaw sandbox list|recreate|explain

Navigate, click, screenshot, extract. Needs browser.enabled: true.