← Home
Quick ReferenceEvery command, config, and shortcut

Quick Reference

All essential OpenClaw commands, config options, slash commands, API endpoints, and shortcuts in one place. Bookmark this page.


CLI Commands

Setup & Installation

# Install OpenClaw
npm install -g openclaw

# Initialize a new config
openclaw init

# Start the gateway
openclaw start

# Start with a specific config file
openclaw start --config /path/to/openclaw.json

# Start in background (daemon)
openclaw start --daemon

# Stop the daemon
openclaw stop

# Check current status
openclaw status

# Show current version
openclaw --version

Configuration

# Open config in default editor
openclaw config edit

# Get a config value
openclaw config get agents.default.model

# Set a config value
openclaw config set agents.default.model claude-sonnet-4-6

# Validate config without starting
openclaw config validate

# Show resolved config (with env vars substituted)
openclaw config show --resolved

Channels

# List all connected channels
openclaw channels list

# Check channel status
openclaw channels status

# Enable a channel
openclaw channels enable telegram

# Disable a channel
openclaw channels disable whatsapp

# Test a channel connection
openclaw channels test telegram

# View channel logs
openclaw channels logs telegram --tail 50

Workspaces

# List all workspaces
openclaw workspaces list

# Create a workspace
openclaw workspaces create --id my-team --label "My Team"

# Delete a workspace
openclaw workspaces delete my-team

# Add user to allowlist
openclaw workspaces allow my-team telegram:123456789

# Remove user from allowlist
openclaw workspaces deny my-team telegram:123456789

# Migrate user between workspaces
openclaw workspace migrate-user U01 from:old-team to:new-team

# Suspend a workspace
openclaw workspace suspend my-team

# Show workspace stats
openclaw stats workspace my-team

Sessions

# List active sessions
openclaw sessions list

# Clear a specific session
openclaw sessions clear {sessionId}

# Clear all sessions in a workspace
openclaw sessions clear --workspace my-team

# View session history
openclaw sessions history {sessionId}

Skills

# List installed skills
openclaw skills list

# Search ClawHub
openclaw skills search github

# Install a skill
openclaw skills install github

# Install a specific version
openclaw skills install github@2.1.0

# Update all skills
openclaw skills update

# Remove a skill
openclaw skills remove github

# Show skill info
openclaw skills info github

API Keys

# Create an API key
openclaw api-key create --label "My App" --workspaces team,admins

# List all keys
openclaw api-key list

# Revoke a key
openclaw api-key revoke oclaw_live_abc123...

# Rotate a key
openclaw api-key rotate oclaw_live_abc123...

Logs & Monitoring

# Stream all logs
openclaw logs

# Stream logs for a specific channel
openclaw logs --channel telegram

# View last 100 lines
openclaw logs --tail 100

# Filter by log level
openclaw logs --level error

# Export logs
openclaw logs export --from 2026-04-01 --to 2026-04-30 > logs.json

# Show usage stats
openclaw stats

# Stats for a date range
openclaw stats --from 2026-04-01 --to 2026-04-30

# Compare workspace usage
openclaw stats workspaces --compare

Canvas

# List saved canvases
openclaw canvas list

# Open a canvas
openclaw canvas open {id}

# Export a canvas
openclaw canvas export {id} --format png --output diagram.png

# Delete a canvas
openclaw canvas delete {id}

# Start canvas server
openclaw canvas-server --port 4000

Slash Commands (In Chat)

These commands are typed directly in your messaging app:

General

CommandDescription
/helpShow all available commands
/statusCheck gateway status
/versionShow OpenClaw version
/pingCheck response time
/whoamiShow your user ID and workspace

Session Control

CommandDescription
/clearClear the current session (fresh start)
/historyShow recent conversation summary
/exportExport conversation as a text file
/sessionShow current session info

Agent Control

CommandDescription
/model haikuSwitch to Claude Haiku for this session
/model sonnetSwitch to Claude Sonnet
/model opusSwitch to Claude Opus
/thinkEnable extended thinking mode
/fastEnable fast/brief response mode
/verboseEnable detailed response mode

Canvas

CommandDescription
/canvas newCreate a new blank canvas
/canvas clearClear the current canvas
/canvas saveSave canvas permanently
/canvas linkGet the canvas URL
/canvas shareGet a read-only link
/canvas export pngDownload as PNG
/canvas export svgDownload as SVG
/canvas export pdfDownload as PDF
/canvas historyList canvases from this session

Workspace & Pairing

CommandDescription
/workspaceShow current workspace
/workspace listList available workspaces
/workspace switch {id}Switch to a different workspace
/pair {code}Pair your account with the gateway
/unpairRemove your account from this gateway

Skills

CommandDescription
/skillsList active skills
/skills enable githubEnable a skill for this session
/skills disable githubDisable a skill for this session

Config File Structure

{
  "agents": {
    "default": {
      "provider": "anthropic",
      "model": "claude-sonnet-4-6",
      "apiKey": "${ANTHROPIC_API_KEY}",
      "systemPrompt": "You are a helpful assistant.",
      "maxContextTokens": 80000,
      "temperature": 0.7
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "${TELEGRAM_BOT_TOKEN}",
      "defaultWorkspace": "default"
    },
    "slack": {
      "enabled": true,
      "botToken": "${SLACK_BOT_TOKEN}",
      "appToken": "${SLACK_APP_TOKEN}",
      "defaultWorkspace": "team"
    }
  },
  "workspaces": [
    {
      "id": "default",
      "label": "Default",
      "agent": "default",
      "allowlist": ["*"],
      "skills": ["web-search", "memory"],
      "sessionTimeout": 1800
    }
  ],
  "api": {
    "enabled": true,
    "keys": [{ "key": "${API_KEY}", "label": "My App" }]
  },
  "canvas": {
    "enabled": true,
    "storageType": "file"
  }
}

API Quick Reference

Base URL: http://localhost:3000/api/v1
Auth: Authorization: Bearer your-api-key

MethodEndpointDescription
GET/healthGateway health check
POST/messagesSend a message
POST/messages/streamSend message (SSE stream)
GET/sessionsList sessions
GET/sessions/{id}Get session
GET/sessions/{id}/historySession history
DELETE/sessions/{id}Clear session
GET/workspacesList workspaces
POST/workspacesCreate workspace
PATCH/workspaces/{id}/allowlistUpdate allowlist
DELETE/workspaces/{id}Delete workspace
GET/statsUsage statistics
GET/stats/workspacesPer-workspace stats

Environment Variables

VariableDescription
ANTHROPIC_API_KEYAnthropic API key for Claude
OPENAI_API_KEYOpenAI API key
TELEGRAM_BOT_TOKENTelegram bot token
SLACK_BOT_TOKENSlack bot token (xoxb-...)
SLACK_APP_TOKENSlack app token (xapp-...)
DISCORD_BOT_TOKENDiscord bot token
WHATSAPP_NUMBERWhatsApp number for pairing
REDIS_URLRedis connection URL
OPENCLAW_CONFIGPath to openclaw.json
OPENCLAW_PORTGateway port (default: 3000)
OPENCLAW_LOG_LEVELLog level: debug, info, warn, error
API_KEYREST API bearer token

Docker Quick Reference

# Run with Docker
docker run -d --name openclaw --restart unless-stopped \
  -p 3000:3000 \
  -v ~/.openclaw:/app/data \
  -e ANTHROPIC_API_KEY=sk-ant-... \
  openclaw/openclaw:latest

# Docker Compose
docker compose up -d          # Start
docker compose down           # Stop
docker compose restart openclaw  # Restart
docker compose logs -f openclaw  # Logs
docker compose pull           # Pull new images
docker compose up -d --remove-orphans  # Update

# Check container health
docker inspect --format='{{.State.Health.Status}}' openclaw

Keyboard Shortcuts (Control UI)

ShortcutAction
Ctrl+KFocus search / command palette
Ctrl+LClear current session
Ctrl+EnterSend message
Edit last message
EscCancel / close modal
Ctrl+/Toggle sidebar
Ctrl+Shift+CCopy last response

Common Config Patterns

Public Bot (Anyone Can Use)

{ "allowlist": ["*"] }

Team Only (Specific Users)

{
  "allowlist": [
    "telegram:123456789",
    "slack:U01ABC123",
    "whatsapp:+12125550100"
  ]
}

Rate Limited Workspace

{
  "rateLimiting": {
    "maxRequestsPerMinute": 5,
    "maxRequestsPerHour": 50,
    "maxRequestsPerDay": 200
  }
}

High-Security Sandbox

{
  "agent": "default",
  "sandbox": true,
  "skills": ["web-search"],
  "allowlist": ["*"],
  "sessionTimeout": 600
}

Cost-Optimized (Haiku by Default)

{
  "agents": {
    "cheap": {
      "provider": "anthropic",
      "model": "claude-haiku-4-5-20251001",
      "apiKey": "${ANTHROPIC_API_KEY}"
    }
  }
}