AI & Agents

OpenClaw Cheat Sheet: Quick Reference for Commands and Config

OpenClaw ships over 30 CLI commands, a separate ClawHub package manager with its own 20-plus command set, and a JSON config file with dozens of keys spread across gateway, channel, model, and sandbox sections. This cheat sheet consolidates the commands and config patterns developers reach for daily into one scannable page, so you stop jumping between four different doc sites.

Fastio Editorial Team 11 min read
Every OpenClaw command and config key in one reference

The Documentation Problem

OpenClaw crossed 375,000 GitHub stars by mid-2026, up from 100,000 in late January of the same year. That growth rate pulled in thousands of developers who all hit the same wall: the reference material for the core CLI, the ClawHub package manager, the gateway config file, and the in-session slash commands lives across four separate sources. No single page collects the commands and settings a working developer needs daily.

This cheat sheet fixes that. It covers the OpenClaw CLI (gateway management, channels, models, diagnostics), the ClawHub CLI (skill discovery, installation, publishing, packages), the main configuration file, and the slash commands available inside a running session. Every command listed here was verified against the official OpenClaw and ClawHub documentation as of June 2026.

The reference is organized by task, not alphabetically. Each section groups commands the way you actually use them: start a gateway, configure a channel, find a skill, debug a problem. Bookmark the section you need and come back when you forget a flag.

Essential OpenClaw CLI Commands

This table covers the commands developers reach for most often. Keep it pinned or print it.

Command What It Does
openclaw gateway status Check if the gateway daemon is running and healthy
openclaw doctor Run diagnostics and auto-fix common issues
openclaw channels add --channel <platform> Connect a messaging channel (Telegram, Discord, Slack, etc.)
openclaw models status Show configured models and their auth status
openclaw config set <key> <value> Change a configuration value
openclaw logs --follow Stream gateway logs in real time
clawhub search <query> Find skills in the ClawHub registry
clawhub install <slug> Install a skill into your workspace
clawhub update --all Update all installed skills (skips pinned ones)
openclaw onboard Run first-time setup: gateway, workspace, and default skills

A few notes on these commands. openclaw doctor is the single best troubleshooting starting point. It checks your Node.js version (22.19+ minimum, 24 recommended), gateway connectivity, channel health, and model authentication, then offers to fix what it finds.

openclaw models status saves time when you switch providers. It probes each configured model and reports whether credentials are valid, so you know immediately if an API key expired or a provider endpoint changed.

clawhub search uses vector search, not exact keyword matching. You can search for "summarize PDFs" instead of knowing the exact skill slug. Results show the slug, owner, and a relevance score.

OpenClaw command reference displayed in a developer terminal

How to Configure Gateway and Channel Settings

OpenClaw stores all settings in a single JSON configuration file in the user's home directory. You can edit it directly or use openclaw config set and openclaw config get to read and write individual keys from the command line.

A minimal configuration that sets a default model and opens the gateway on the default port looks like this:

{
  "agent": {
    "model": "anthropic/claude-sonnet-4-20250514"
  },
  "gateway": {
    "port": 18789
  }
}

The agent.model value follows the format <provider>/<model-id>. OpenClaw supports provider types including Anthropic, OpenAI, AWS Bedrock, Azure OpenAI, GCP Vertex, and local Ollama instances.

Key configuration sections:

  • agent.model: The default LLM provider and model identifier
  • agents.defaults.workspace: Path to your skill and workspace directory
  • agents.defaults.sandbox.mode: Execution sandbox level. Set to non-main for isolated agent groups, or off to disable
  • agents.defaults.timeoutSeconds: Request timeout for model calls
  • gateway.port: The port the gateway daemon listens on (default 18789)

Channel configuration controls how the agent handles inbound messages on each platform:

Each channel entry supports an access policy that controls how the agent handles messages from unknown senders. The default mode requires a pairing code before the agent responds to a new contact. You can also set the policy to open (respond to anyone) or restrict access to a whitelist of specific users.

Channel management commands:

  • openclaw channels add --channel telegram --token $TOKEN: Connect Telegram with a bot token
  • openclaw channels add --channel discord --token $TOKEN: Connect Discord
  • openclaw channels add --channel whatsapp: Connect WhatsApp (uses QR-based auth)
  • openclaw channels list: Show all connected channels
  • openclaw channels status --probe: Test connectivity for each channel

OpenClaw supports WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, Microsoft Teams, Matrix, LINE, and several others.

Gateway lifecycle commands:

  • openclaw gateway start: Launch the daemon in the background
  • openclaw gateway stop: Shut down the daemon
  • openclaw gateway restart: Restart after config changes
  • openclaw gateway run: Run in the foreground for debugging (pair with --verbose)
  • openclaw gateway install: Register as a system service (launchd on macOS, systemd on Linux)

ClawHub Skill and Package Management

ClawHub is the skill registry for OpenClaw, similar to npm for Node.js packages. It ships its own CLI with commands for authentication, discovery, installation, publishing, and package management.

Authentication:

clawhub login

This opens a browser for authentication. Use clawhub login --token clh_... for headless environments or CI pipelines. Verify your session with clawhub whoami. For CI scripts that need the raw token, clawhub token outputs it to stdout.

Finding skills:

  • clawhub search <query>: Search by keyword or natural language description. Results show slug, owner, and relevance score
  • clawhub explore: Browse the newest skills. Add --sort trending or --sort downloads to change the order. Cap results with --limit 50
  • clawhub inspect <slug>: View metadata for a skill without installing it. Add --versions to see all published versions or --files to list bundle contents

Installing and managing skills:

  • clawhub install <slug>: Download and extract into your workspace directory
  • clawhub uninstall <slug>: Remove a skill and its lockfile entry
  • clawhub list: Show installed skills with their pinned status
  • clawhub update <slug>: Update a specific skill. Use clawhub update --all to update everything (pinned skills are skipped automatically)
  • clawhub pin <slug> --reason "stable for production": Freeze a skill at its current version
  • clawhub unpin <slug>: Allow future updates again

Publishing skills:

clawhub skill publish ./my-skill --version 1.0.0

This publishes your skill directory as a versioned package. Add --owner <handle> if publishing under an organization. Skills are released under MIT-0. Additional publish operations include clawhub skill rename <slug> <new-slug> (old slug redirects), clawhub skill merge <source> <target> (consolidate two skills), and clawhub sync (batch-publish all changed skills in your workspace).

Package commands handle code plugins and bundle plugins separately from skills:

  • clawhub package explore: Browse the package catalog. Filter with --family skill|code-plugin|bundle-plugin
  • clawhub package download <name>: Download with SHA-256 verification
  • clawhub package verify <file>: Validate checksums against the registry
  • clawhub package publish <source>: Publish from a local folder, npm tarball, or GitHub repo. Add --dry-run to preview without uploading

Environment variables for ClawHub:

  • CLAWHUB_SITE: Override the registry URL
  • CLAWHUB_WORKDIR: Set the working directory
  • CLAWHUB_CONFIG_PATH: Point to a custom config file
ClawHub skill registry search results in a terminal
Fastio features

Give your OpenClaw agent persistent file storage

Fastio's Business Trial includes 50GB storage, MCP server access, and included credits. No credit card, no trial expiration. Connect your agent and start persisting output today.

What Commands Work Inside a Running Session

Once you are inside an OpenClaw session through any connected channel or the web interface, these slash commands control the agent without leaving the conversation.

Command Effect
/status Display current session state and active model
/new Start a fresh session
/reset Clear the current context entirely
/compact Compress conversation history to free context space
/think <level> Adjust reasoning depth (e.g., /think high)
/verbose on or off Toggle detailed output
/trace on or off Enable or disable execution tracing
/usage off, tokens, or full Configure token usage reporting
/restart Reboot the agent process
/activation mention or always Set when the agent responds: only on @mention, or to every message

Two of these deserve extra attention. /compact lets you keep working in a long conversation without starting over. When context fills up, compacting summarizes the history so the agent retains the key points without hitting token limits. /think high adds more reasoning steps before the agent responds. It slows down replies but improves accuracy for complex, multi-step tasks.

How to Chain Commands for Common Tasks

These patterns chain commands together for common tasks. Copy the blocks that match your situation.

Fresh install to first message:

npm install -g openclaw@latest
openclaw onboard
openclaw channels add --channel telegram --token $BOT_TOKEN
openclaw gateway start
openclaw doctor

The onboard command handles initial gateway setup, workspace creation, and default skill installation in one step. Run doctor afterward to catch anything the setup missed.

Adding a model provider:

openclaw models auth add
openclaw models set anthropic/claude-sonnet-4-20250514
openclaw models status

The interactive models auth add walks through provider configuration. After setting a new default with models set, run models status to confirm the credentials are valid before you start using them.

Finding and installing skills for a project:

clawhub search "pdf extraction"
clawhub inspect pdf-extractor --versions
clawhub install pdf-extractor
openclaw skills list

Search first, inspect to check version history and maintainer activity, then install. The openclaw skills list command (note: openclaw, not clawhub) confirms the skill is available to your agent locally.

Troubleshooting a broken gateway:

openclaw doctor --fix
openclaw logs --follow --limit 100
openclaw gateway restart --verbose
openclaw status --all

Start with doctor --fix for automated repairs. If the issue persists, stream logs to identify the specific error, then restart with --verbose for detailed output. status --all gives a full system overview: gateway health, channel connectivity, and model availability in one view.

Persistent file storage for agent output:

When your OpenClaw agent produces files that need to outlive a single session, local disk works for single-machine setups. S3 or Google Drive handle cloud storage if you build the integration yourself. For teams running multiple agents or handing off output to humans, a shared workspace like Fastio provides persistent, indexed storage that agents access over the MCP server. The free tier includes 50GB and included credits with no credit card required.

Workspace file structure reference:

OpenClaw organizes agent configuration through markdown files in ~/.openclaw/workspace/:

  • AGENTS.md: Agent prompt definitions
  • SOUL.md: Personality and behavior rules
  • USER.md: User-specific context
  • IDENTITY.md: Agent identity configuration
  • MEMORY.md: Memory index (yesterday and today loaded at session start)
  • TOOLS.md: Available tool documentation
  • HEARTBEAT.md: Heartbeat message templates
  • BOOT.md: Startup instructions

Skills live in subdirectories under ~/.openclaw/workspace/skills/<skill-name>/, each containing a SKILL.md file that defines the skill's capabilities and behavior.

Frequently Asked Questions

What are the most common OpenClaw commands?

The five commands developers use most are openclaw gateway status (check daemon health), openclaw doctor (diagnose and fix issues), openclaw channels add (connect a messaging platform), openclaw models status (verify model and API key configuration), and openclaw logs --follow (stream live gateway logs). For skill management, clawhub search and clawhub install are the main entry points to the ClawHub registry.

How do I configure OpenClaw gateway settings?

Edit ~/.openclaw/openclaw.json directly or use openclaw config set <key> <value> from the command line. The most commonly changed keys are gateway.port (default 18789), agent.model (your default LLM in provider/model-id format), and channels.<platform>.dmPolicy (set to pairing or open). After changing gateway settings, run openclaw gateway restart to apply them.

What is the OpenClaw CLI syntax?

OpenClaw follows a category-action-flags pattern: openclaw <category> <action> [flags]. Categories include gateway, channels, models, config, cron, browser, nodes, and skills. Global flags like --json (machine-readable output), --profile <name> (isolated configuration), and --dev (development mode) work across all commands. The ClawHub CLI uses a separate binary (clawhub) with its own command structure for registry operations.

How do I manage skills in OpenClaw?

Use the ClawHub CLI for registry operations: clawhub search <query> to find skills, clawhub install <slug> to add them, clawhub pin <slug> to freeze versions, and clawhub update --all to update everything. For local management, openclaw skills list shows what is installed and openclaw skills check identifies missing dependencies. To publish your own skills, use clawhub skill publish with a version flag.

Related Resources

Fastio features

Give your OpenClaw agent persistent file storage

Fastio's Business Trial includes 50GB storage, MCP server access, and included credits. No credit card, no trial expiration. Connect your agent and start persisting output today.