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.
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.
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.
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 identifieragents.defaults.workspace: Path to your skill and workspace directoryagents.defaults.sandbox.mode: Execution sandbox level. Set tonon-mainfor isolated agent groups, oroffto disableagents.defaults.timeoutSeconds: Request timeout for model callsgateway.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 tokenopenclaw channels add --channel discord --token $TOKEN: Connect Discordopenclaw channels add --channel whatsapp: Connect WhatsApp (uses QR-based auth)openclaw channels list: Show all connected channelsopenclaw 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 backgroundopenclaw gateway stop: Shut down the daemonopenclaw gateway restart: Restart after config changesopenclaw 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 scoreclawhub explore: Browse the newest skills. Add--sort trendingor--sort downloadsto change the order. Cap results with--limit 50clawhub inspect <slug>: View metadata for a skill without installing it. Add--versionsto see all published versions or--filesto list bundle contents
Installing and managing skills:
clawhub install <slug>: Download and extract into your workspace directoryclawhub uninstall <slug>: Remove a skill and its lockfile entryclawhub list: Show installed skills with their pinned statusclawhub update <slug>: Update a specific skill. Useclawhub update --allto update everything (pinned skills are skipped automatically)clawhub pin <slug> --reason "stable for production": Freeze a skill at its current versionclawhub 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-pluginclawhub package download <name>: Download with SHA-256 verificationclawhub package verify <file>: Validate checksums against the registryclawhub package publish <source>: Publish from a local folder, npm tarball, or GitHub repo. Add--dry-runto preview without uploading
Environment variables for ClawHub:
CLAWHUB_SITE: Override the registry URLCLAWHUB_WORKDIR: Set the working directoryCLAWHUB_CONFIG_PATH: Point to a custom config file
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.
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 definitionsSOUL.md: Personality and behavior rulesUSER.md: User-specific contextIDENTITY.md: Agent identity configurationMEMORY.md: Memory index (yesterday and today loaded at session start)TOOLS.md: Available tool documentationHEARTBEAT.md: Heartbeat message templatesBOOT.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
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.