Essential OpenClaw Commands Every User Should Know
Guides 17 min read

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.

OpenClaw Academy Team

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-daemon to automatically install the Gateway as a background service (launchd on macOS, systemd on Linux). This means it starts on boot — no manual openclaw gateway needed.

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 doctor is 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 audit after 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 --help for 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

CommandWhat It Does
/resetClear the conversation and start fresh
/newSame as /reset (accepts optional model hint: /new opus)
/stopAbort the current agent run
/statusQuick diagnostics (includes provider usage when available)
/helpShow available commands
/commandsList all available commands
/whoamiShow your sender ID (alias: /id)

Model & Thinking

CommandWhat It Does
/modelShow model picker with numbered list
/model listSame as above
/model 3Select model #3 from the picker
/model anthropic/claude-opus-4-5Switch to a specific model
/model statusDetailed model/auth/endpoint view
/think highSet thinking level (off, minimal, low, medium, high, xhigh)
/reasoning onShow model reasoning in a separate message
/reasoning streamStream reasoning as Telegram drafts
/verbose onShow extra debugging output (on, full, off)

Security & Execution

CommandWhat It Does
/elevated onEnable elevated (host) tool access
/elevated offDisable elevated access
/execShow current execution policy
/exec host=gateway security=fullOverride exec settings
/approve <id> allow-onceApprove a pending tool execution

Agent Behavior

CommandWhat It Does
/activation mentionRequire @mention in groups
/activation alwaysRespond to all messages in groups
/send onEnable message delivery
/usage tokensShow token count per response
/usage costShow cost summary from session logs
/compactCompact the conversation context
/queueShow queue settings
/tts alwaysEnable text-to-speech on all responses
/tts offDisable TTS

Sub-Agents

CommandWhat It Does
/subagents listList running sub-agents
/subagents stopStop a sub-agent
/subagents logView sub-agent output
/subagents sendSend a message to a sub-agent

Config & Debug (Owner Only)

These require explicit opt-in (commands.config: true / commands.debug: true):

CommandWhat It Does
/config showShow current config
/config set <path>=<value>Persist a config change to disk
/config unset <path>Remove a config value
/debug showShow runtime overrides
/debug set <path>=<value>Set a runtime-only override (memory, not disk)
/debug resetClear 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

CommandPurpose
openclaw onboardInteractive setup wizard
openclaw setupInitialize config + workspace
openclaw doctorHealth checks + guided repairs
openclaw updateUpdate OpenClaw
openclaw configureInteractive config wizard
openclaw config get/set/unsetNon-interactive config edits

Gateway

CommandPurpose
openclaw gatewayRun gateway (foreground)
openclaw gateway installInstall as background service
openclaw gateway start/stop/restartManage the service
openclaw gateway statusCheck gateway status
openclaw gateway healthQuick health check
openclaw gateway probeDebug connectivity
openclaw gateway discoverFind gateways on network

Channels

CommandPurpose
openclaw channels listShow configured channels
openclaw channels addAdd a channel account
openclaw channels removeRemove a channel account
openclaw channels loginInteractive login (WhatsApp QR)
openclaw channels statusCheck channel health
openclaw channels logsTail channel logs

Models

CommandPurpose
openclaw models statusCurrent model + auth overview
openclaw models listAvailable models
openclaw models set <model>Change default model
openclaw models scanAuto-discover models
openclaw models auth addSet up auth

Security & Sandbox

CommandPurpose
openclaw security auditSecurity audit
openclaw sandbox listList sandbox containers
openclaw sandbox recreate --allRebuild containers
openclaw sandbox explainShow effective policy

Sessions & Agents

CommandPurpose
openclaw sessionsList sessions
openclaw agents listList agents
openclaw agents add <name>Create new agent
openclaw agent --message "..."Run single agent turn

Debugging

CommandPurpose
openclaw status --allFull diagnostics
openclaw healthGateway health
openclaw logs --followTail live logs
openclaw dashboardOpen Control UI
openclaw tuiTerminal UI

Automation

CommandPurpose
openclaw cron listShow scheduled jobs
openclaw cron addCreate a scheduled job
openclaw system eventFire a system event

Utility

CommandPurpose
openclaw resetReset local state
openclaw uninstallRemove service + data
openclaw message sendSend outbound message
openclaw skills listList available skills
openclaw plugins listList plugins
openclaw docs <query>Search the docs

Global Flags

These work with any openclaw command:

FlagPurpose
--devIsolate state under ~/.openclaw-dev
--profile <name>Isolate state under ~/.openclaw-<name>
--no-colorDisable ANSI colors
--jsonMachine-readable output (where supported)
-V / --versionPrint version

What’s Next?

This guide covers the CLI essentials, but OpenClaw goes deeper. Here are some paths to explore:

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

Related Articles

Stay secure. Stay sharp.

Get notified when we publish new security guides and courses. No spam.