Haven't installed OpenClaw yet? Click here for one-line install commands
curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Worried about affecting your computer? ClawTank runs in the cloud with no installation, eliminating accidental deletion risks
Key Findings
  • The OpenClaw CLI follows a consistent openclaw <noun> [subcommand] naming structure -- nouns are always plural (models, channels, skills, hooks, agents), and all operations can be completed via the terminal
  • openclaw doctor is the most important daily maintenance command -- automatically detects Gateway, Channels, Skills, Plugins, and Memory status; add --fix for auto-repair, --deep for system service scanning
  • Gateway defaults to starting on ws://127.0.0.1:18789 -- managed via openclaw gateway (foreground) or openclaw gateway install (service registration), with all Channels and Skills communicating through this WebSocket endpoint
  • Model management uses an OAuth / Auth Profiles mechanism -- complete OAuth authorization via openclaw models auth login, supporting free models like Qwen and GitHub Copilot with automatic token refresh
  • Configuration files are in JSON format (~/.openclaw/openclaw.json) -- operated via openclaw config get/set/unset with dot-path syntax, or openclaw configure to launch the interactive setup wizard

Since OpenClaw officially went open source in early 2026, it has rapidly become one of the most watched AI agent frameworks.[3] Compared to similar tools that rely on web interfaces or desktop applications, OpenClaw was designed from the ground up with the command-line interface (CLI) as its primary entry point, making it naturally suited for integration with existing DevOps toolchains, Shell scripts, and automation scheduling.

However, many first-time OpenClaw users face the same challenge: while the official documentation is comprehensive, the number of commands is vast (40+ top-level commands), and flags vary slightly between versions.[1] This article, based on actual testing with OpenClaw 2026.2.25, systematically compiles all commonly used commands from installation to diagnostics, from model management to Agents, providing a verified and complete reference.

I. CLI Overview

1.1 OpenClaw CLI Design Philosophy

OpenClaw's CLI is built on Node.js (not Go), designed following the openclaw <noun> [subcommand] [flags] format.[4] Important naming convention: top-level nouns always use plural form -- models, channels, skills, hooks, agents, plugins, sessions. A few core commands use singular form (gateway, doctor, config).

1.2 Global Help and Version Information

Appending --help or -h after any subcommand will display its help text:

# Display all available top-level commands with brief descriptions
openclaw --help

# Display help for a specific subcommand
openclaw gateway --help
openclaw models --help
openclaw channels add --help

Running openclaw --help produces the following output structure (2026.2.25):

Usage: openclaw [options] [command]

Options:
  --dev                Dev profile: isolate state under ~/.openclaw-dev
  -h, --help           Display help for command
  --log-level <level>  Global log level override (silent|fatal|error|warn|info|debug|trace)
  --no-color           Disable ANSI colors
  --profile <name>     Use a named profile (isolates state/config)
  -V, --version        output the version number

Core Commands:
  gateway *      Run, inspect, and query the WebSocket Gateway
  models *       Discover, scan, and configure models
  channels *     Manage connected chat channels (Telegram, Discord, etc.)
  skills *       List and inspect available skills
  hooks *        Manage internal agent hooks
  plugins *      Manage OpenClaw plugins and extensions
  agents *       Manage isolated agents (workspaces, auth, routing)
  doctor         Health checks + quick fixes
  config *       Non-interactive config helpers (get/set/unset)
  configure      Interactive setup wizard

Utility Commands:
  update *       Update OpenClaw and inspect update channel status
  logs           Tail gateway file logs via RPC
  sessions *     List stored conversation sessions
  browser *      Manage OpenClaw's dedicated browser (Chrome/Chromium)
  cron *         Manage cron jobs via the Gateway scheduler
  security *     Security tools and local config audits
  memory *       Search, inspect, and reindex memory files
  tui            Open a terminal UI connected to the Gateway
  dashboard      Open the Control UI with your current token
  onboard        Interactive onboarding wizard
  status         Show channel health and recent session recipients
  uninstall      Uninstall the gateway service + local data (CLI remains)
  reset          Reset local config/state (keeps the CLI installed)

Docs: https://docs.openclaw.ai/cli

Checking version information:

# Display version number
openclaw --version
# Output: 2026.2.25

Note: The openclaw version command does not exist; version information is retrieved via the --version or -V flag.

1.3 Global Flags Reference

The following flags can be applied to the main CLI:

--log-level <level>  Log level (silent|fatal|error|warn|info|debug|trace)
--no-color           Disable ANSI color output (suitable for piped output and CI environments)
--dev                Use development profile, isolate state to ~/.openclaw-dev
--profile <name>     Use a named profile, isolate state to ~/.openclaw-<name>
-V, --version        Output version number
-h, --help           Display help

II. Installation and Environment Management

2.1 Initial Installation

OpenClaw provides three installation methods, all ultimately performing global installation via npm install -g openclaw@latest:[2]

# macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash

# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex

# Windows CMD (bypasses ExecutionPolicy restrictions)
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

After installation, run Doctor to confirm the environment is ready:

openclaw doctor

Doctor checks Gateway status, Skills, Plugins, Channels, Memory search, and more, then reports any issues.

2.2 Updating

# Update to latest stable version
openclaw update

# Switch update channel (stable/beta/dev)
openclaw update --channel beta

# One-time update to a specific version or dist-tag
openclaw update --tag 2026.2.20

# Preview update content (dry run)
openclaw update --dry-run

# Don't auto-restart Gateway service after update
openclaw update --no-restart

# Non-interactive mode (for CI environments)
openclaw update --yes --json

# View current update channel and version status
openclaw update status

# Interactive update wizard
openclaw update wizard

2.3 Uninstalling and Resetting

# Uninstall Gateway service + local data (CLI remains)
openclaw uninstall

# Uninstall and remove all config, state, and workspace
openclaw uninstall --all --yes

# Preview uninstall actions
openclaw uninstall --dry-run

# Remove only service/state/workspace
openclaw uninstall --service
openclaw uninstall --state
openclaw uninstall --workspace

# Reset local config (keep CLI)
openclaw reset
openclaw reset --scope config          # Reset config only
openclaw reset --scope full --yes      # Full reset (non-interactive)

2.4 Global Configuration Management

The configuration file is located at ~/.openclaw/openclaw.json (JSON format, not YAML):

# Get a specific config value (dot-path syntax)
openclaw config get gateway.port
# Output: 18789

openclaw config get gateway.mode
# Output: local

# Set a specific value
openclaw config set gateway.port 18790
openclaw config set gateway.bind loopback

# Remove a config value
openclaw config unset gateway.tailscale

# Launch interactive setup wizard
openclaw configure

# Setup wizard for a specific section
openclaw configure --section model
openclaw configure --section web

III. Gateway Management Commands

3.1 Gateway Concept

The Gateway is OpenClaw's core WebSocket server, responsible for receiving messages from Channels on ws://127.0.0.1:18789, managing Agent sessions, and coordinating Skills execution.[7] All Channels, Dashboard, and Browser control communicate through the Gateway.

3.2 Starting and Running

# Foreground mode (press Ctrl+C to stop)
openclaw gateway

# Equivalent to
openclaw gateway run

# Specify port and bind mode
openclaw gateway --port 18790
openclaw gateway --bind lan        # loopback|lan|tailnet|auto|custom

# Force start (kill process occupying the port)
openclaw gateway --force

# Gateway auth mode
openclaw gateway --auth token --token "your-secret-token"
openclaw gateway --auth password --password "your-password"

# Tailscale exposure mode
openclaw gateway --tailscale serve   # off|serve|funnel

# Verbose logging mode
openclaw gateway --verbose
openclaw gateway --compact           # Compact WebSocket logs

# Dev mode (isolated state)
openclaw gateway --dev

3.3 Gateway Service Management (Persistence)

# Install as system service (launchd/systemd/schtasks)
openclaw gateway install

# Start the installed service
openclaw gateway start

# Stop the service
openclaw gateway stop

# Restart the service
openclaw gateway restart

# Uninstall the service
openclaw gateway uninstall

# View service status + probe Gateway
openclaw gateway status

Windows note: openclaw gateway install relies on schtasks under the hood and requires system administrator privileges. Non-admin environments should use foreground mode openclaw gateway.

3.4 Gateway Status Queries

# View full status (service + probe)
openclaw gateway status

# Actual output example (2026.2.25):
# Service: Scheduled Task (missing)
# Config (cli): ~\.openclaw\openclaw.json
# Gateway: bind=loopback (127.0.0.1), port=18789
# Probe target: ws://127.0.0.1:18789
# Dashboard: http://127.0.0.1:18789/
# Listening: 127.0.0.1:18789

# Get Gateway health status
openclaw gateway health
# Output: Gateway Health OK (1693ms)
# Telegram: ok (@your_bot) (1693ms)

# Probe Gateway reachability
openclaw gateway probe

# Discover Gateway on local and wide area networks
openclaw gateway discover

# Directly call Gateway RPC methods
openclaw gateway call health

# View usage cost summary
openclaw gateway usage-cost

3.5 Log Viewing

# View Gateway logs (via RPC)
openclaw logs

# Follow logs in real-time
openclaw logs --follow

# Limit number of lines
openclaw logs --limit 100

# JSON format output
openclaw logs --json

# Display in local time
openclaw logs --local-time

# Plain text output (no ANSI styling)
openclaw logs --plain

IV. Model Configuration Commands

4.1 Listing and Viewing Models

# List configured models
openclaw models list

# Actual output example:
# Model                       Input      Ctx    Local Auth  Tags
# qwen-portal/coder-model     text       125k   no    yes   default,configured
# qwen-portal/vision-model    text+image 125k   no    yes   configured

# View model status summary
openclaw models status

# Actual output example:
# Config        : ~\.openclaw\openclaw.json
# Default       : qwen-portal/coder-model
# Aliases (1)   : qwen -> qwen-portal/coder-model
# Configured models (2): qwen-portal/coder-model, qwen-portal/vision-model

# JSON output
openclaw models --status-json

# Plain text output
openclaw models --status-plain

4.2 Setting Default Model

# Set default model (using model ID or alias)
openclaw models set qwen-portal/coder-model
openclaw models set qwen

# Set image model
openclaw models set-image qwen-portal/vision-model

4.3 Model Auth Management

# Interactive auth addition (set token or paste token)
openclaw models auth add

# Execute OAuth authorization flow
openclaw models auth login

# Log in to GitHub Copilot (Device Code Flow)
openclaw models auth login-github-copilot

# Manually paste token
openclaw models auth paste-token

# Set up token via provider CLI
openclaw models auth setup-token

# Manage auth order
openclaw models auth order

4.4 Model Aliases and Fallback

# Manage model aliases
openclaw models aliases

# Manage model fallback list
openclaw models fallbacks

# Manage image model fallback list
openclaw models image-fallbacks

# Scan OpenRouter free models
openclaw models scan

V. Channel Management Commands

5.1 Supported Channels

OpenClaw 2026.2.25 supports 20+ communication channels: Telegram, WhatsApp, Discord, Slack, Signal, iMessage, IRC, Google Chat, LINE, Zalo, Matrix, Nostr, Microsoft Teams, Mattermost, Nextcloud Talk, BlueBubbles, Synology Chat, Tlon, Feishu, and more.

5.2 Adding Channels

# Add Telegram Bot (non-interactive)
openclaw channels add --channel telegram --token "123456:ABC..."

# Add Discord Bot
openclaw channels add --channel discord --token "MTIz..."

# Add Slack App
openclaw channels add --channel slack --bot-token "xoxb-..." --app-token "xapp-..."

# Add WhatsApp (requires interactive QR login)
openclaw channels login --channel whatsapp

# Add Matrix
openclaw channels add --channel matrix --homeserver "https://matrix.org" --user-id "@user:matrix.org" --access-token "..."

# Add Signal
openclaw channels add --channel signal --signal-number "+886..."

# Add multiple accounts (specify account ID)
openclaw channels add --channel telegram --account work --token "..."

5.3 Listing and Managing Channels

# List all configured channels
openclaw channels list

# Actual output example:
# Chat channels:
# - Telegram default: configured, token=config, enabled
#
# Auth providers (OAuth + API keys):
# - qwen-portal:default (oauth)

# View channel status (with Gateway probe)
openclaw channels status
openclaw channels status --probe     # Active probe

# View channel logs
openclaw channels logs

# View provider capabilities (supported features)
openclaw channels capabilities

# Remove a channel
openclaw channels remove --channel telegram

# Logout channel session
openclaw channels logout --channel whatsapp

# Resolve channel/user name to ID
openclaw channels resolve

5.4 DM Pairing

# View pending pairing requests
openclaw pairing

# Approve Telegram pairing
openclaw pairing approve telegram WR8XRQQA

# Pairing management
openclaw pairing --help

VI. Skills Management Commands

6.1 Skills Concept

Skills are OpenClaw's feature extension mechanism -- each Skill defines a specific capability that the AI agent can perform. Skills can be bundled (built-in) or plugin-installed.[5]

6.2 Listing and Checking Skills

# List all available Skills
openclaw skills list

# Actual output example (partial):
# Skills (13/52 ready)
# ┌───────────┬──────────────────┬─────────────────────────────────┬────────────────┐
# │ Status    │ Skill            │ Description                     │ Source         │
# ├───────────┼──────────────────┼─────────────────────────────────┼────────────────┤
# │ ✓ ready   │ 🧩 coding-agent   │ ...                             │ openclaw-bundled│
# │ ✗ missing │ 🔐 1password      │ ...                             │ openclaw-bundled│

# Check Skills readiness status
openclaw skills check

# Actual output example:
# Skills Status Check
# Total: 52
# ✓ Eligible: 13
# ✗ Missing requirements: 39
#
# Ready to use:
#   🧩 coding-agent
#   ♊️ gemini
#   📦 gh-issues
#   🐙 github
#   ...
#
# Missing requirements:
#   🔐 1password (bins: op)
#   📝 apple-notes (bins: memo; os: darwin)
#   ...

# View detailed information for a specific Skill
openclaw skills info coding-agent

VII. Hooks Commands

7.1 Hooks Concept

Hooks are OpenClaw's event-driven automation mechanism -- automatically executing predefined actions when specific events are triggered.[6] For example, session-memory automatically saves session context when /new or /reset is issued.

7.2 Listing and Managing Hooks

# List all Hooks
openclaw hooks list

# Actual output example:
# Hooks (4/4 ready)
# ┌──────────┬──────────────────────┬──────────────────────────────────────────┬─────────────┐
# │ Status   │ Hook                 │ Description                              │ Source       │
# ├──────────┼──────────────────────┼──────────────────────────────────────────┼─────────────┤
# │ ✓ ready  │ 🚀 boot-md            │ Run BOOT.md on gateway startup           │ openclaw-bundled│
# │ ✓ ready  │ 📎 bootstrap-extra-files│ Inject additional workspace bootstrap files│ openclaw-bundled│
# │ ✓ ready  │ 📝 command-logger     │ Log all command events to audit file     │ openclaw-bundled│
# │ ✓ ready  │ 💾 session-memory     │ Save session context on /new or /reset   │ openclaw-bundled│

# View details for a specific Hook
openclaw hooks info session-memory

# Check Hooks eligibility status
openclaw hooks check

# Enable a Hook
openclaw hooks enable session-memory

# Disable a Hook
openclaw hooks disable command-logger

# Install a Hook pack (path, archive, or npm package)
openclaw hooks install ./my-hook-pack
openclaw hooks install some-npm-hook-package

# Update installed Hooks (npm-installed only)
openclaw hooks update

VIII. Plugins Management Commands

8.1 Listing and Managing Plugins

# List all discovered Plugins
openclaw plugins list

# View Plugin details
openclaw plugins info some-plugin

# Install Plugin (path, archive, or npm package)
openclaw plugins install ./my-plugin
openclaw plugins install some-npm-plugin

# Enable/Disable Plugin
openclaw plugins enable some-plugin
openclaw plugins disable some-plugin

# Uninstall Plugin
openclaw plugins uninstall some-plugin

# Update installed Plugins (npm-installed only)
openclaw plugins update

# Diagnose Plugin loading issues
openclaw plugins doctor

IX. Agents Management Commands

9.1 Agents Concept

Agents are OpenClaw's isolated execution units -- each Agent has its own independent workspace, Auth configuration, and routing rules. There is a default main Agent.

9.2 Managing Agents

# List configured Agents
openclaw agents list

# Add an isolated Agent
openclaw agents add work

# Set Agent identity (name/topic/emoji/avatar)
openclaw agents set-identity work --name "Work Bot"

# Delete Agent and clean up workspace
openclaw agents delete work

X. Diagnostic and Troubleshooting Commands

10.1 openclaw doctor

openclaw doctor is the most important diagnostic tool -- it checks Gateway, Channels, Skills, Plugins, and Memory search status:

# Run environment diagnostics
openclaw doctor

# Attempt auto-repair
openclaw doctor --fix

# Deep scan (including system services)
openclaw doctor --deep

# Generate and set Gateway Token
openclaw doctor --generate-gateway-token

# Non-interactive mode (safe fixes only)
openclaw doctor --non-interactive

# Skip confirmation prompts
openclaw doctor --yes

10.2 Security Audit

# Local security audit
openclaw security audit

# Deep audit (including Gateway probe)
openclaw security audit --deep

# Auto-fix security issues
openclaw security audit --fix

# JSON output
openclaw security audit --json

10.3 Other Useful Commands

# View channel health status and recent sessions
openclaw status

# Open Dashboard (browser)
openclaw dashboard

# Open terminal TUI
openclaw tui

# View Memory index status
openclaw memory status

# Reindex Memory files
openclaw memory index --force

# Search Memory
openclaw memory search --query "deployment notes"

# Manage Cron schedules
openclaw cron list
openclaw cron add
openclaw cron status

# View Sessions
openclaw sessions
openclaw sessions --active 120    # Active in the last 2 hours
openclaw sessions --all-agents    # Aggregate across Agents
openclaw sessions --json          # JSON output

# Browser control
openclaw browser status
openclaw browser tabs
openclaw browser open https://example.com
openclaw browser screenshot
openclaw browser snapshot

XI. Common Issues and Troubleshooting

11.1 Common Command Name Errors

Issue: Running openclaw version, openclaw model, openclaw channel and similar commands produces unknown command.

# Incorrect:
openclaw version        # ✗ unknown command
openclaw model list     # ✗ unknown command (Did you mean models?)
openclaw channel list   # ✗ unknown command (Did you mean channels?)
openclaw skill list     # ✗ unknown command (Did you mean skills?)
openclaw hook list      # ✗ unknown command (Did you mean hooks?)

# Correct:
openclaw --version      # ✓ Use flag, not subcommand
openclaw models list    # ✓ Plural form
openclaw channels list  # ✓ Plural form
openclaw skills list    # ✓ Plural form
openclaw hooks list     # ✓ Plural form

11.2 Gateway Won't Start

Issue: openclaw gateway shows bind: address already in use.

# Option 1: Force start (kill occupying process)
openclaw gateway --force

# Option 2: Change port
openclaw gateway --port 18790
openclaw config set gateway.port 18790

# Option 3: Check occupying process
netstat -ano | findstr :18789   # Windows
lsof -i :18789                  # macOS/Linux

Issue: openclaw gateway install fails on Windows (Access denied).

# Gateway service installation requires admin privileges (schtasks)
# Option 1: Run PowerShell as Administrator
# Option 2: Use foreground mode
openclaw gateway

11.3 Configuration File Locations

# OpenClaw config file (JSON format)
~/.openclaw/openclaw.json

# Windows full path
C:\Users\<USERNAME>\.openclaw\openclaw.json

# Agent workspace
~/.openclaw/agents/main/

# Auth Profiles
~/.openclaw/agents/main/agent/auth-profiles.json

# Gateway logs
/tmp/openclaw/openclaw-YYYY-MM-DD.log     # macOS/Linux
\tmp\openclaw\openclaw-YYYY-MM-DD.log     # Windows

11.4 Getting Technical Support

# Run full diagnostics
openclaw doctor --deep

# Check version information
openclaw --version

# View Gateway status
openclaw gateway status

# View full health status
openclaw gateway health

# Search official documentation
openclaw docs

Conclusion

OpenClaw 2026.2.25's CLI provides 40+ top-level commands covering Gateway management, model configuration, Channel integration, Skills/Hooks/Plugins management, security auditing, Cron scheduling, browser control, and more.[8] Mastering a few core commands -- openclaw doctor, openclaw gateway, openclaw models status, openclaw channels list -- is sufficient for daily operational needs.

All commands in this article have been verified on OpenClaw 2026.2.25 in a Windows 11 environment. As versions evolve, some command flags or output formats may change. It is recommended to use the --help flag to check the latest usage and regularly run openclaw doctor to ensure environment health.[1]