Essential OpenClaw Commands Every User Should Know
The complete OpenClaw CLI reference guide. Every command grouped by category — from onboarding and gateway management to in-chat slash commands. Bookmark this cheat sheet.
Why You Need This Guide
OpenClaw has a powerful CLI. It’s how you install, configure, monitor, and debug your AI agent. But with dozens of commands and subcommands, it’s easy to miss the ones that matter most.
This guide groups every essential command by what you’re trying to do. Bookmark it. You’ll come back.
Prerequisites: OpenClaw installed (
npm install -g openclaw@latest) and Node ≥ 22. If you’re not there yet, start with our Getting Started guide.
Getting Started
These are the commands you’ll run on day one.
openclaw onboard
The interactive setup wizard. This is the first command you should run after installing OpenClaw. It walks you through gateway configuration, workspace setup, model auth, and channel connections.
openclaw onboard
Quickstart mode (minimal prompts, auto-generates a gateway token):
openclaw onboard --flow quickstart
Advanced mode (full control over port, bind, auth):
openclaw onboard --flow manual
Non-interactive (for automation or remote servers):
openclaw onboard --non-interactive --mode local --auth-choice setup-token --install-daemon
Connect to a remote gateway instead of running locally:
openclaw onboard --mode remote --remote-url ws://gateway-host:18789 --remote-token <token>
Pro tip: Add
--install-daemonto automatically install the Gateway as a background service (launchd on macOS, systemd on Linux). This means it starts on boot — no manualopenclaw gatewayneeded.
openclaw setup
Initializes config and workspace without the full wizard. Useful if you want to set things up manually.
openclaw setup --workspace ~/my-agent-workspace
openclaw doctor
Health checks and guided repairs. Run this after installing, after updating, or whenever something feels off.
openclaw doctor
Deep scan (checks for extra gateway installs system-wide):
openclaw doctor --deep
Auto-fix (writes backup to openclaw.json.bak, cleans unknown keys):
openclaw doctor --repair
Pro tip:
openclaw doctoris your “did I break something?” command. Make it a habit after every update.
openclaw update
Safely update OpenClaw and manage release channels.
openclaw update
Switch to beta or dev channel:
openclaw update --channel beta
openclaw update --channel dev
Check for updates without installing:
openclaw update status
Configuration
openclaw configure
Interactive wizard for credentials, models, channels, and agent defaults. Run it whenever you need to change settings with guided prompts.
openclaw configure
Target specific sections only:
openclaw configure --section models --section channels
openclaw config
Non-interactive config helpers for scripting. Without a subcommand, opens the wizard (same as configure).
# Read a value
openclaw config get gateway.port
# Set a value
openclaw config set agents.defaults.model.primary "anthropic/claude-sonnet-4"
# Remove a value
openclaw config unset messages.responsePrefix
Config lives at ~/.openclaw/openclaw.json.
Gateway Management
The Gateway is OpenClaw’s core — a WebSocket server that owns channel connections, sessions, and the control plane.
openclaw gateway
Run the gateway process in the foreground. Most users install it as a service instead (see gateway install).
openclaw gateway
Common options:
openclaw gateway --port 18789 --bind loopback --token <secret>
Force start (kills any existing process on the port):
openclaw gateway --force
Gateway Service Management
These commands manage the Gateway as a background service:
openclaw gateway install # Install as a service (launchd/systemd)
openclaw gateway start # Start the service
openclaw gateway stop # Stop the service
openclaw gateway restart # Restart the service
openclaw gateway uninstall # Remove the service
openclaw gateway status
Check if the Gateway is running and healthy. Probes via RPC by default.
openclaw gateway status
openclaw gateway status --deep # Also scan system services
openclaw gateway status --json # Machine-readable output
openclaw gateway status --no-probe # Service-only, skip RPC check
openclaw gateway health
Quick health check of the running Gateway:
openclaw gateway health
openclaw gateway probe
The “debug everything” command. Probes both your configured remote gateway and localhost, printing all reachable gateways:
openclaw gateway probe
Over SSH (useful if the remote gateway is bound to loopback):
openclaw gateway probe --ssh user@gateway-host
openclaw gateway discover
Scan your local network for Gateway beacons via Bonjour:
openclaw gateway discover
openclaw gateway discover --timeout 4000
openclaw gateway call
Low-level RPC helper for direct Gateway method calls:
openclaw gateway call status
openclaw gateway call logs.tail --params '{"sinceMs": 60000}'
Channel Setup
Channels connect OpenClaw to messaging platforms — WhatsApp, Telegram, Discord, Slack, Signal, iMessage, Google Chat, and more.
openclaw channels list
Show all configured channels and auth profiles:
openclaw channels list
openclaw channels list --json
openclaw channels list --no-usage # Skip provider usage snapshots
openclaw channels add
Add a new channel account. Without flags, runs an interactive wizard:
openclaw channels add
# Non-interactive examples:
openclaw channels add --channel telegram --token $TELEGRAM_BOT_TOKEN
openclaw channels add --channel discord --account work --name "Work Bot" --token $DISCORD_BOT_TOKEN
openclaw channels remove
Disable or delete a channel account:
openclaw channels remove --channel discord --account work # Disable
openclaw channels remove --channel discord --account work --delete # Delete config
openclaw channels login
Interactive login for channels that need it (primarily WhatsApp Web — shows a QR code):
openclaw channels login
openclaw channels login --channel whatsapp
openclaw channels logout
openclaw channels logout --channel whatsapp
openclaw channels status
Check channel health and connectivity:
openclaw channels status
openclaw channels status --probe # Run extra checks
openclaw channels logs
Tail channel-specific logs:
openclaw channels logs
openclaw channels logs --channel telegram --lines 500
openclaw channels capabilities
Check provider capabilities (Discord intents, Slack scopes, etc.):
openclaw channels capabilities
openclaw channels capabilities --channel discord --target channel:123
openclaw channels resolve
Resolve human-readable names to provider IDs:
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels resolve --channel discord "My Server/#support"
Models & Authentication
openclaw models status
Show your current model configuration, fallbacks, and auth status. This is the single best command for understanding your model setup:
openclaw models status
openclaw models status --probe # Live-test each auth profile (uses tokens!)
openclaw models list
List all available models:
openclaw models list
openclaw models list --all # Include all known models
openclaw models list --local # Only local/ollama models
openclaw models list --provider anthropic
openclaw models set
Change the default model:
openclaw models set anthropic/claude-sonnet-4
openclaw models set openai/gpt-5.2
openclaw models scan
Auto-discover available models from your configured providers:
openclaw models scan
openclaw models scan --set-default # Auto-set the best match
openclaw models auth
Manage authentication profiles:
openclaw models auth add # Interactive auth setup
openclaw models auth setup-token # Use a setup token (e.g. from claude setup-token)
openclaw models auth paste-token # Paste a pre-generated token
openclaw models auth login --provider anthropic # Run provider OAuth flow
Aliases & Fallbacks
openclaw models aliases list
openclaw models aliases add fast anthropic/claude-haiku-3
openclaw models fallbacks add openai/gpt-5.2 # Add a fallback model
openclaw models fallbacks list
Security & Sandboxing
openclaw security audit
Audit your config and local state for common security issues:
openclaw security audit
openclaw security audit --deep # Include live Gateway probe
openclaw security audit --fix # Auto-tighten safe defaults + chmod state/config
Pro tip: Run
openclaw security auditafter any config change. It catches things like multiple DM senders sharing a session, small models without sandboxing, and more.
openclaw sandbox list
List Docker sandbox containers and their status:
openclaw sandbox list
openclaw sandbox list --browser # Browser containers only
openclaw sandbox list --json
openclaw sandbox recreate
Force-recreate containers (needed after image or config updates):
openclaw sandbox recreate --all
openclaw sandbox recreate --agent mybot
openclaw sandbox recreate --browser
openclaw sandbox explain
Show the effective sandbox policy for a session — what’s sandboxed, what’s elevated, what tools are available:
openclaw sandbox explain
openclaw sandbox explain --agent work
openclaw sandbox explain --session agent:main:main
Sessions & Agents
openclaw sessions
List stored conversation sessions:
openclaw sessions
openclaw sessions --active 120 # Only sessions active in last 120 minutes
openclaw sessions --json
openclaw agents list
List all configured agents:
openclaw agents list
openclaw agents list --bindings # Show channel bindings
openclaw agents add
Create a new isolated agent with its own workspace, model, and channel bindings:
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents delete
Remove an agent and its workspace:
openclaw agents delete work
openclaw agents delete work --force
openclaw agent
Run a single agent turn via the Gateway (useful for scripting and testing):
openclaw agent --message "What's the weather?"
openclaw agent --message "Deploy the thing" --to main --deliver
openclaw agent --message "Think hard" --thinking high
Messaging
openclaw message send
Send outbound messages from the command line:
openclaw message send --target +15555550123 --message "Hello from OpenClaw"
openclaw message send --channel discord --target channel:123 --message "Update deployed" --media ./screenshot.png
openclaw message send --channel telegram --target @mychat --message "Choose:" \
--buttons '[{"text":"Yes","callback_data":"yes"}]'
openclaw message poll
Create polls:
openclaw message poll --channel discord --target channel:123 \
--poll-question "Lunch?" --poll-option Pizza --poll-option Sushi --poll-multi
openclaw message react
openclaw message react --channel slack --target C123 --message-id 456 --emoji "✅"
openclaw message broadcast
Send to multiple targets at once:
openclaw message broadcast --targets "+1555..." --targets "+4477..." --message "System update"
See
openclaw message --helpfor the full surface — edit, delete, pin, search, threads, roles, and more.
Debugging & Logs
openclaw status
The go-to diagnostics command. Shows channel health, recent sessions, gateway status, and update info:
openclaw status
openclaw status --all # Full diagnosis (pasteable for support)
openclaw status --deep # Live-probe all channels
openclaw status --usage # Model provider usage/quota
openclaw health
Quick gateway health check:
openclaw health
openclaw health --verbose # Per-account timings
openclaw logs
Tail gateway logs in real time:
openclaw logs --follow
openclaw logs --limit 500
openclaw logs --json # Machine-readable for piping
openclaw dashboard
Open the browser-based Control UI:
openclaw dashboard
openclaw dashboard --no-open # Print URL without launching browser
openclaw tui
Open the terminal UI (remote-friendly):
openclaw tui
openclaw tui --url ws://remote:18789 --token <token>
openclaw tui --session main --deliver
Automation & Scheduling
openclaw cron
Manage scheduled jobs:
openclaw cron list
openclaw cron status
openclaw cron add --name "daily-summary" --every 24h --system-event "Daily summary"
openclaw cron enable <job-id>
openclaw cron disable <job-id>
openclaw cron run <job-id> --force # Trigger manually
openclaw cron runs --id <job-id> # View run history
openclaw system event
Fire a system event (triggers agent processing):
openclaw system event --text "Check for new emails"
openclaw system event --text "Deploy completed" --mode now
openclaw system heartbeat
openclaw system heartbeat last # When was the last heartbeat?
openclaw system heartbeat enable
openclaw system heartbeat disable
Nodes & Devices
Nodes are paired devices (iOS, Android, macOS, headless) that connect to your Gateway.
openclaw nodes
openclaw nodes status # List all nodes
openclaw nodes status --connected # Only currently connected
openclaw nodes describe --node myphone
openclaw nodes pending # Unapproved pairing requests
openclaw nodes approve <requestId>
Node Actions
# Run a command on a node
openclaw nodes run --node macbook -- ls -la
# Send a notification
openclaw nodes notify --node iphone --title "Alert" --body "Something happened"
# Take a photo
openclaw nodes camera snap --node iphone --facing back
# Get location
openclaw nodes location get --node iphone --accuracy precise
Headless Node Host
Run a headless node that connects to a remote Gateway:
openclaw node run --host gateway-host --port 18789
openclaw node install --host gateway-host --port 18789 # Install as service
Skills & Plugins
openclaw skills
openclaw skills list # All available skills
openclaw skills list --eligible # Only ready-to-use skills
openclaw skills info <name> # Details for a skill
openclaw skills check # Summary of ready vs missing
openclaw plugins
openclaw plugins list
openclaw plugins info <id>
openclaw plugins install <path-or-npm-spec>
openclaw plugins enable <id>
openclaw plugins disable <id>
openclaw plugins doctor # Diagnose plugin load errors
In-Chat Slash Commands
These commands work inside any chat session (WhatsApp, Telegram, Discord, etc.). Send them as standalone messages.
Session Control
| Command | What It Does |
|---|---|
/reset | Clear the conversation and start fresh |
/new | Same as /reset (accepts optional model hint: /new opus) |
/stop | Abort the current agent run |
/status | Quick diagnostics (includes provider usage when available) |
/help | Show available commands |
/commands | List all available commands |
/whoami | Show your sender ID (alias: /id) |
Model & Thinking
| Command | What It Does |
|---|---|
/model | Show model picker with numbered list |
/model list | Same as above |
/model 3 | Select model #3 from the picker |
/model anthropic/claude-opus-4-5 | Switch to a specific model |
/model status | Detailed model/auth/endpoint view |
/think high | Set thinking level (off, minimal, low, medium, high, xhigh) |
/reasoning on | Show model reasoning in a separate message |
/reasoning stream | Stream reasoning as Telegram drafts |
/verbose on | Show extra debugging output (on, full, off) |
Security & Execution
| Command | What It Does |
|---|---|
/elevated on | Enable elevated (host) tool access |
/elevated off | Disable elevated access |
/exec | Show current execution policy |
/exec host=gateway security=full | Override exec settings |
/approve <id> allow-once | Approve a pending tool execution |
Agent Behavior
| Command | What It Does |
|---|---|
/activation mention | Require @mention in groups |
/activation always | Respond to all messages in groups |
/send on | Enable message delivery |
/usage tokens | Show token count per response |
/usage cost | Show cost summary from session logs |
/compact | Compact the conversation context |
/queue | Show queue settings |
/tts always | Enable text-to-speech on all responses |
/tts off | Disable TTS |
Sub-Agents
| Command | What It Does |
|---|---|
/subagents list | List running sub-agents |
/subagents stop | Stop a sub-agent |
/subagents log | View sub-agent output |
/subagents send | Send a message to a sub-agent |
Config & Debug (Owner Only)
These require explicit opt-in (commands.config: true / commands.debug: true):
| Command | What It Does |
|---|---|
/config show | Show current config |
/config set <path>=<value> | Persist a config change to disk |
/config unset <path> | Remove a config value |
/debug show | Show runtime overrides |
/debug set <path>=<value> | Set a runtime-only override (memory, not disk) |
/debug reset | Clear all debug overrides |
/allowlist add <id> | Add to sender allowlist |
Host Shell (Disabled by Default)
Requires commands.bash: true plus tools.elevated allowlists:
! ls -la # Run a shell command
/bash ls -la # Same thing
!poll # Check output of a running command
!stop # Kill a running command
Common Workflows
First Thing After Install
openclaw onboard --install-daemon
openclaw channels login # Pair WhatsApp (QR code)
openclaw doctor # Verify everything is healthy
openclaw dashboard # Open the Control UI
Daily Health Check
openclaw status --deep
openclaw health --verbose
”Something Is Broken”
openclaw doctor --repair
openclaw logs --follow
openclaw status --all # Copy this output for support
After an Update
openclaw update
openclaw doctor
openclaw sandbox recreate --all # If using Docker sandboxing
Adding a New Channel
openclaw channels add --channel telegram --token $BOT_TOKEN
openclaw gateway restart
openclaw channels status --probe
Security Hardening
openclaw security audit --fix
openclaw sandbox explain
Quick-Reference Cheat Sheet
Getting Started
| Command | Purpose |
|---|---|
openclaw onboard | Interactive setup wizard |
openclaw setup | Initialize config + workspace |
openclaw doctor | Health checks + guided repairs |
openclaw update | Update OpenClaw |
openclaw configure | Interactive config wizard |
openclaw config get/set/unset | Non-interactive config edits |
Gateway
| Command | Purpose |
|---|---|
openclaw gateway | Run gateway (foreground) |
openclaw gateway install | Install as background service |
openclaw gateway start/stop/restart | Manage the service |
openclaw gateway status | Check gateway status |
openclaw gateway health | Quick health check |
openclaw gateway probe | Debug connectivity |
openclaw gateway discover | Find gateways on network |
Channels
| Command | Purpose |
|---|---|
openclaw channels list | Show configured channels |
openclaw channels add | Add a channel account |
openclaw channels remove | Remove a channel account |
openclaw channels login | Interactive login (WhatsApp QR) |
openclaw channels status | Check channel health |
openclaw channels logs | Tail channel logs |
Models
| Command | Purpose |
|---|---|
openclaw models status | Current model + auth overview |
openclaw models list | Available models |
openclaw models set <model> | Change default model |
openclaw models scan | Auto-discover models |
openclaw models auth add | Set up auth |
Security & Sandbox
| Command | Purpose |
|---|---|
openclaw security audit | Security audit |
openclaw sandbox list | List sandbox containers |
openclaw sandbox recreate --all | Rebuild containers |
openclaw sandbox explain | Show effective policy |
Sessions & Agents
| Command | Purpose |
|---|---|
openclaw sessions | List sessions |
openclaw agents list | List agents |
openclaw agents add <name> | Create new agent |
openclaw agent --message "..." | Run single agent turn |
Debugging
| Command | Purpose |
|---|---|
openclaw status --all | Full diagnostics |
openclaw health | Gateway health |
openclaw logs --follow | Tail live logs |
openclaw dashboard | Open Control UI |
openclaw tui | Terminal UI |
Automation
| Command | Purpose |
|---|---|
openclaw cron list | Show scheduled jobs |
openclaw cron add | Create a scheduled job |
openclaw system event | Fire a system event |
Utility
| Command | Purpose |
|---|---|
openclaw reset | Reset local state |
openclaw uninstall | Remove service + data |
openclaw message send | Send outbound message |
openclaw skills list | List available skills |
openclaw plugins list | List plugins |
openclaw docs <query> | Search the docs |
Global Flags
These work with any openclaw command:
| Flag | Purpose |
|---|---|
--dev | Isolate state under ~/.openclaw-dev |
--profile <name> | Isolate state under ~/.openclaw-<name> |
--no-color | Disable ANSI colors |
--json | Machine-readable output (where supported) |
-V / --version | Print version |
What’s Next?
This guide covers the CLI essentials, but OpenClaw goes deeper. Here are some paths to explore:
- OpenClaw Academy Courses — structured learning from zero to production
- 5 Prompt Injection Attacks — understand the security model
- Getting Started with OpenClaw — step-by-step first install
- Official Docs — the full reference
Got questions? Join the community on Discord or drop into the GitHub Discussions.
Disclaimer: OpenClaw Academy is a community project, not officially affiliated with OpenClaw. Content is for educational purposes only and should not be considered professional advice. See our Terms of Service.
OpenClaw Academy Team
Practical guides for getting the most out of your AI agent
Share this article
Related Articles
Setting Up OpenClaw: What You Need to Know Before Installing
OpenClaw is a powerful AI agent gateway — but installing it without understanding security first is risky. Here's the high-level overview and why our free course is the safest way to get started.
Read MoreWhat is OpenClaw? The Complete Guide to Self-Hosted AI Agent Gateways
OpenClaw is an open-source AI agent gateway that lets you control AI assistants via WhatsApp, Telegram, Discord, and 20+ channels. Self-hosted, secure, and extensible. Learn how it works, key features, and why developers choose OpenClaw.
Read MoreStay secure. Stay sharp.
Get notified when we publish new security guides and courses. No spam.