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
| Command | Description |
|---|
/help | Show all available commands |
/status | Check gateway status |
/version | Show OpenClaw version |
/ping | Check response time |
/whoami | Show your user ID and workspace |
Session Control
| Command | Description |
|---|
/clear | Clear the current session (fresh start) |
/history | Show recent conversation summary |
/export | Export conversation as a text file |
/session | Show current session info |
Agent Control
| Command | Description |
|---|
/model haiku | Switch to Claude Haiku for this session |
/model sonnet | Switch to Claude Sonnet |
/model opus | Switch to Claude Opus |
/think | Enable extended thinking mode |
/fast | Enable fast/brief response mode |
/verbose | Enable detailed response mode |
Canvas
| Command | Description |
|---|
/canvas new | Create a new blank canvas |
/canvas clear | Clear the current canvas |
/canvas save | Save canvas permanently |
/canvas link | Get the canvas URL |
/canvas share | Get a read-only link |
/canvas export png | Download as PNG |
/canvas export svg | Download as SVG |
/canvas export pdf | Download as PDF |
/canvas history | List canvases from this session |
Workspace & Pairing
| Command | Description |
|---|
/workspace | Show current workspace |
/workspace list | List available workspaces |
/workspace switch {id} | Switch to a different workspace |
/pair {code} | Pair your account with the gateway |
/unpair | Remove your account from this gateway |
Skills
| Command | Description |
|---|
/skills | List active skills |
/skills enable github | Enable a skill for this session |
/skills disable github | Disable 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
| Method | Endpoint | Description |
|---|
GET | /health | Gateway health check |
POST | /messages | Send a message |
POST | /messages/stream | Send message (SSE stream) |
GET | /sessions | List sessions |
GET | /sessions/{id} | Get session |
GET | /sessions/{id}/history | Session history |
DELETE | /sessions/{id} | Clear session |
GET | /workspaces | List workspaces |
POST | /workspaces | Create workspace |
PATCH | /workspaces/{id}/allowlist | Update allowlist |
DELETE | /workspaces/{id} | Delete workspace |
GET | /stats | Usage statistics |
GET | /stats/workspaces | Per-workspace stats |
Environment Variables
| Variable | Description |
|---|
ANTHROPIC_API_KEY | Anthropic API key for Claude |
OPENAI_API_KEY | OpenAI API key |
TELEGRAM_BOT_TOKEN | Telegram bot token |
SLACK_BOT_TOKEN | Slack bot token (xoxb-...) |
SLACK_APP_TOKEN | Slack app token (xapp-...) |
DISCORD_BOT_TOKEN | Discord bot token |
WHATSAPP_NUMBER | WhatsApp number for pairing |
REDIS_URL | Redis connection URL |
OPENCLAW_CONFIG | Path to openclaw.json |
OPENCLAW_PORT | Gateway port (default: 3000) |
OPENCLAW_LOG_LEVEL | Log level: debug, info, warn, error |
API_KEY | REST 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)
| Shortcut | Action |
|---|
Ctrl+K | Focus search / command palette |
Ctrl+L | Clear current session |
Ctrl+Enter | Send message |
↑ | Edit last message |
Esc | Cancel / close modal |
Ctrl+/ | Toggle sidebar |
Ctrl+Shift+C | Copy 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}"
}
}
}