# OpenClaw CLI Reference Source: `docs.openclaw.ai/cli` + individual subcommand pages. Verified: 2026-02-27. High-risk commands require `OPENCLAW_WRAPPER_ALLOW_RISKY=1`. See `security-policy.md`. ## ⚡ Quick Lookup | Keyword | Section | |---------|--------| | setup, install, doctor, update, reset | Core Commands | | gateway, bind, port, service, probe | Gateway Commands | | channel, login, pairing, capabilities | Channels and Pairing | | model, auth, alias, fallback, scan | Models | | agent, send, deliver, thinking, identity | Agents | | message, poll, thread, emoji, sticker | Messaging | | security, audit, fix | Security and Secrets | | secret, reload, apply, configure | Security and Secrets | | memory, index, search, semantic | Memory | | skill, list, check | Skills | | cron, schedule, announce, deliver | Automation (Cron) | | browser, click, type, screenshot, pdf | Browser | | node, invoke, run, camera, screen, location | Nodes | | device, approve, rotate, revoke | Devices | | approval, allowlist | Approvals | | sandbox, recreate | Sandbox | | webhook, gmail, dns | Webhooks and DNS | | hook, enable, bundled | Bundled Hooks | | /status, /config, /debug | Chat Slash Commands | ## Global Flags - `--dev`: isolate state under `~/.openclaw-dev`, shift default ports. - `--profile `: isolate state under `~/.openclaw-`. - `--no-color`: disable ANSI colors. `NO_COLOR=1` also respected. - `--json`: machine-readable output (most commands). - `-V`, `--version`, `-v`: print version and exit. ## Command Tree ``` openclaw [--dev] [--profile ] setup onboard [--install-daemon] configure config get|set|unset completion doctor dashboard [--no-open] security audit [--deep] [--fix] secrets reload|audit|configure|apply [--from ] [--dry-run] reset uninstall update channels list|status|logs|add|remove|login|logout directory skills list|info|check [--eligible] [--json] [-v] plugins list|info|install|enable|disable|doctor [--json] hooks list|info|check|enable|disable|install|update memory status|index|search [--query ""] message send|poll|react|reactions|read|edit|delete|pin|unpin|pins|permissions|search|timeout|kick|ban message thread message emoji message sticker message role message channel message member info message voice status message event agent [--message ] [--to ] [--channel ] [--local] [--deliver] [--json] agents list|add|delete|bindings|bind|unbind acp status health sessions gateway [--port ] [--bind ] [--token ] [--force] gateway call [--params ] gateway health|status|probe|discover gateway install|uninstall|start|stop|restart|run logs [--follow] [--limit ] [--json] [--plain] [--no-color] system event [--text ] [--mode ] system heartbeat last|enable|disable system presence models list [--all] [--local] [--provider ] [--json] models status [--check] [--probe] [--probe-provider ] models set models set-image models aliases list|add|remove models fallbacks list|add|remove|clear models image-fallbacks list|add|remove|clear models scan [--min-params ] [--set-default] [--set-image] models auth add|setup-token|paste-token models auth order get|set|clear sandbox list|recreate|explain cron status|list|add|edit|rm|enable|disable|runs|run nodes status|list|describe|pending|approve|reject|rename|invoke|run|notify nodes camera list|snap|clip nodes canvas snapshot|present|hide|navigate|eval|a2ui nodes screen record nodes location get devices list|approve|reject|remove|clear|rotate|revoke node run|status|install|uninstall|start|stop|restart approvals get|set|allowlist add|remove browser status|start|stop|reset-profile|tabs browser open|focus|close|navigate|resize browser click|type|press|hover|drag|select|upload|fill browser dialog|wait|evaluate|console|pdf browser screenshot|snapshot browser profiles|create-profile|delete-profile webhooks gmail setup|run pairing list|approve qr dns setup [--apply] docs [query...] tui voicecall (plugin; if installed) ``` ## Core Commands - `openclaw onboard [--install-daemon]`: Run onboarding wizard. - `openclaw doctor`: Validate local install and health. - `openclaw status`: Show global OpenClaw status. - `openclaw version`: Print CLI version. - `openclaw health`: Check health endpoint (standalone). - `openclaw dashboard [--no-open]`: Open or print dashboard URL. - `openclaw configure`: Interactive config wizard. - `openclaw config get `: Get config value. - `openclaw config set `: Set config value. - `openclaw config unset `: Unset config value. - `openclaw update`: Update CLI to latest stable build. - `openclaw uninstall`: Remove CLI and optionally data. - `openclaw completion`: Shell completion setup. - `openclaw logs [--follow] [--limit ] [--json] [--plain]`: Structured log viewer. ## Gateway Commands - `openclaw gateway`: Start gateway in foreground. - By default, requires `gateway.mode=local` in `~/.openclaw/openclaw.json`. Use `--allow-unconfigured` for ad-hoc/dev runs. - Binding beyond loopback without auth is blocked (safety guardrail). - `SIGUSR1` triggers in-process restart (controlled by `commands.restart` config key, enabled by default). - `--port `, `--bind `, `--token ` - `--auth `, `--password ` - `--tailscale `, `--tailscale-reset-on-exit` - `--allow-unconfigured`, `--dev`, `--reset` (requires `--dev`), `--force`, `--verbose` - `--ws-log `, `--compact`, `--raw-stream`, `--raw-stream-path ` - `--claude-cli-logs`: only show claude-cli logs in console - `--token` also sets `OPENCLAW_GATEWAY_TOKEN` for the process - `--password` also sets `OPENCLAW_GATEWAY_PASSWORD` for the process - `openclaw gateway status [--deep] [--no-probe] [--json]`: Show gateway runtime status. - `--url `, `--token `, `--password `, `--timeout ` (default 10000) - `--deep`: system-level service scan. `--no-probe`: skip RPC probe. - Surfaces legacy or extra gateway services. Profile-named services are first-class. - `openclaw gateway health [--url ]`: Check gateway health endpoint. - `openclaw gateway probe [--json]`: Probe configured remote + localhost. - `--ssh `, `--ssh-identity `, `--ssh-auto` - Related config: `gateway.remote.sshTarget`, `gateway.remote.sshIdentity` - `openclaw gateway discover [--timeout ] [--json]`: Discover gateways via Bonjour/mDNS. - Advertises `_openclaw-gw._tcp` service type. - Fields: `role`, `transport`, `gatewayPort`, `sshPort`, `tailnetDns`, `gatewayTls`, `cliPath` - `openclaw gateway restart|stop|start`: Manage service lifecycle (all support `--json`). - `openclaw gateway install [--port ] [--runtime ] [--token ] [--force] [--json]`: Install gateway background service. - Note: `--runtime` defaults to Node; bun is not recommended (WhatsApp/Telegram bugs). - `openclaw gateway uninstall`: Remove gateway background service. - `openclaw gateway run`: Run gateway process. - `openclaw gateway call [--params ]`: Call gateway RPC methods. ## Channels and Pairing - `openclaw channels list [--no-usage] [--json]`: List configured channels. - `--no-usage`: skip usage snapshot (avoids HTTP 403 if `user:profile` scope is missing). - `openclaw channels status`: Show channel status. - `openclaw channels logs --channel `: Channel-specific logs. - `openclaw channels capabilities [--channel ] [--target channel:]`: Probe channel capabilities. - Discord: intents + channel permissions. Slack: bot + user scopes. Telegram: bot flags + webhook. - MS Teams: app token + Graph roles/scopes. Signal: daemon version. - `openclaw channels resolve --channel "" [--kind user|group|auto]`: Resolve names to IDs. - Supports Slack (#channel/@user), Discord (Server/#channel), Matrix (Room Name). - `openclaw channels add --channel [--token ] [--delete]`: Add a channel. - Interactive mode: prompts for account IDs, display names, agent bindings. - Creates `channels..accounts` config entries. - `openclaw channels remove --channel [--delete]`: Remove a channel. - `openclaw channels login --channel `: Authenticate a channel (interactive). - `openclaw channels logout --channel `: Disconnect a channel. - `openclaw pairing list [channel] [--channel ] [--account ] [--json]`: List pairing requests. - `openclaw pairing approve [--account ] [--notify]`: Approve pairing (high-risk). ## Models - `openclaw models list [--all] [--local] [--provider ] [--json] [--plain]`: Show available models. - `openclaw models status [--check] [--probe] [--json] [--plain]`: Model auth and provider status. - `--probe-provider `, `--probe-profile `, `--probe-timeout ` - `openclaw models set `: Set default model. - `openclaw models set-image `: Set default image model. - `openclaw models auth add`: Interactive auth helper. - `openclaw models auth setup-token --provider [--yes]`: Setup token shorthand. - `openclaw models auth paste-token --provider [--profile-id ] [--expires-in ]`: Direct token paste. - `openclaw models auth order get|set|clear [--provider ] [--agent ]`: Auth priority ordering. - `openclaw models aliases list|add|remove [--json] [--plain]`: List/add/remove alias map. - `openclaw models fallbacks list|add|remove|clear [--json]`: Model fallback chain. - `openclaw models image-fallbacks list|add|remove|clear [--json]`: Image model fallback chain. - `openclaw models scan [--min-params ] [--max-age-days ] [--provider ] [--set-default] [--set-image] [--json]`: Discover local models. ## Agents - `openclaw agent [--message ] [--to ] [--session-id ] [--agent ] [--channel ] [--local] [--deliver] [--json] [--timeout ] [--thinking ] [--verbose ]`: Send message to agent. - `--reply-channel ` + `--reply-to `: Route agent reply to a different channel/target. - `--thinking` only works with GPT-5.2+ and Codex models. - `OPENCLAW_AGENT_DIR` / `PI_CODING_AGENT_DIR` env vars also scope agent context. - `openclaw agents list [--json] [--bindings]`: List agents. - `openclaw agents add [name] [--workspace ] [--model ] [--agent-dir ] [--bind ] [--non-interactive] [--json]`: Add agent. - `openclaw agents delete [--force] [--json]`: Delete agent. - `openclaw agents bindings [--agent ] [--json]`: Show bindings. - `openclaw agents bind [--agent ] [--bind ] [--json]`: Add bindings. - Binding without `accountId` matches channel default account only. - `accountId: "*"` is channel-wide fallback (less specific than explicit account). - Adding explicit accountId to existing channel-only binding upgrades in place. - `openclaw agents unbind [--agent ] [--bind ] [--all] [--json]`: Remove bindings. - `openclaw agents set-identity [--workspace ] [--agent ] [--from-identity] [--identity-file ] [--name ] [--emoji ] [--avatar ]`: Set agent identity. - Reads `IDENTITY.md` from workspace root when using `--from-identity`. - Identity fields: `name`, `theme`, `emoji`, `avatar` (stored in `agents.list[].identity`). ## Messaging - `openclaw message send --target --message ""`: Send message. - `openclaw message poll --channel --target --poll-question "" --poll-option `: Create poll. - `openclaw message react|reactions|read|edit|delete|pin|unpin|pins|permissions|search|timeout|kick|ban`: Message operations. - `openclaw message thread `: Thread operations. - `openclaw message emoji `: Emoji operations. - `openclaw message sticker `: Sticker operations. - `openclaw message role `: Role operations. - `openclaw message channel `: Channel info. - `openclaw message member info`: Member info. - `openclaw message voice status`: Voice status. - `openclaw message event `: Event operations. ## Security and Secrets - `openclaw security audit [--json]`: Audit config + local state for common security issues. - Checks: `session.dmScope`, `security.trust_model`, `hooks.defaultSessionKey`, `gateway.nodes.denyCommands/allowCommands`, `tools.profile`, `gateway.allowRealIpFallback`, `discovery.mdns.mode`, `sandbox.browser.cdpSourceRange`, `gateway.auth.mode`, `dangerous`/`dangerously` keywords - `openclaw security audit --deep [--json]`: Best-effort live Gateway probe. - `openclaw security audit --fix [--json]`: Tighten safe defaults (high-risk). - Flips `groupPolicy="open"` → `"allowlist"` - Sets `logging.redactSensitive` from `"off"` to `"tools"` - Tightens permissions for state/config files (`credentials/*.json`, `auth-profiles.json`, `sessions.json`, `*.jsonl`) - Does NOT: rotate tokens, disable tools, change bind/auth/network - `openclaw secrets reload [--json]`: Re-resolve refs via `secrets.reload` RPC. Keeps last-known-good on failure. - `openclaw secrets audit [--check] [--json]`: Scan for plaintext residues, unresolved refs, precedence drift. - Finding codes: `PLAINTEXT_FOUND`, `REF_UNRESOLVED`, `REF_SHADOWED`, `LEGACY_RESIDUE` - `--check`: exits non-zero on findings. - JSON summary: `plaintextCount`, `unresolvedRefCount`, `shadowedRefCount`, `legacyResidueCount` - `openclaw secrets configure [--providers-only] [--skip-provider-setup] [--apply] [--yes] [--plan-out ] [--json]`: Interactive helper. - Workflow: provider setup → credential mapping → preflight → optional apply. - `--providers-only`: configure `secrets.providers` only. - `--skip-provider-setup`: skip provider setup, map to existing providers. - Generated plans enable scrub options by default (`scrubEnv`, `scrubAuthProfilesForProviderTargets`, `scrubLegacyAuthJson`). - Without `--apply`, still prompts "Apply this plan now?" after preflight. - Targets secret-bearing fields: `models.providers.*.apiKey`, `skills.entries.*.apiKey`, etc. - `openclaw secrets apply --from [--dry-run] [--json]`: Apply a previously generated plan (high-risk). - Mutates: `openclaw.json`, `auth-profiles.json`, legacy `auth.json`, `~/.openclaw/.env` - No rollback backups by design. Use `--dry-run` first. ## System - `openclaw system event [--text ] [--mode ] [--json]`: Push system events. - `openclaw system heartbeat last|enable|disable [--json]`: Heartbeat management. - `openclaw system presence [--json]`: Presence info. ## Memory Memory is provided by the `memory-core` plugin. Disable with `plugins.slots.memory = "none"` in config. - `openclaw memory status [--deep] [--agent ]`: Show index stats. - `--deep`: probes vector + embedding availability. - `--deep --index`: runs reindex if store is dirty. - `openclaw memory index [--verbose] [--agent ]`: Reindex memory files. - `--verbose`: prints per-phase details (provider, model, sources, batch activity). - Includes extra paths from `memorySearch.extraPaths` config. - `openclaw memory search "" [--query ""] [--agent ]`: Semantic search over memory. - Query input: positional `[query]` or `--query ` (flag wins if both provided). ## Skills - `openclaw skills list [--eligible] [--json] [-v]`: List skills. - `openclaw skills info `: Show details for one skill. - `openclaw skills check`: Summary of ready vs missing requirements. ## Automation (Cron) - `openclaw cron status [--json]`: Cron engine status. - `openclaw cron list [--all] [--json]`: List cron jobs (table by default). - `openclaw cron add --name (--at|--every|--cron) (--system-event|--message)`: Create cron job (high-risk). - `--announce`: announce to channel. `--deliver` / `--no-deliver`: control delivery. - `--at` + `--keep-after-run`: one-time job that persists after execution. - `--channel `, `--to `: delivery target for announce. - `openclaw cron edit [--announce] [--channel ] [--to ] [--no-deliver]`: Edit job (high-risk). - `openclaw cron rm `: Delete job (aliases: `remove`, `delete`) (high-risk). - `openclaw cron enable ` / `cron disable `: Toggle job. - `openclaw cron runs --id [--limit ]`: View run history. - Run logs stored at `~/.openclaw/cron/runs/.jsonl`. - `cron.sessionRetention` (default 24h) prunes completed sessions. - `cron.runLog.maxBytes` + `cron.runLog.keepLines` prune log files. - `openclaw cron run [--force]`: Run job immediately (high-risk). ## Browser Common flags: `--url `, `--token `, `--timeout `, `--browser-profile `, `--json`. ### Browser Profiles Two built-in profile types: - `openclaw`: dedicated OpenClaw-managed Chrome instance (isolated user data dir). - `chrome`: controls existing Chrome tabs via Chrome extension relay. - `openclaw browser profiles`: List browser profiles. - `openclaw browser create-profile --name [--color ] [--cdp-url ]`: Create profile. - `openclaw browser delete-profile --name `: Delete profile. - `openclaw browser --browser-profile `: Use specific profile. ### Browser Extension Relay - `openclaw browser extension install`: Install Chrome extension. - `openclaw browser extension path`: Show extension path. - Attach via `chrome://extensions` → load unpacked. ### Remote Browser Control - Via node host proxy: `gateway.nodes.browser.mode` + `gateway.nodes.browser.node` config. ### Lifecycle - `openclaw browser status|start|stop`: Manage browser runtime (high-risk). - `openclaw browser reset-profile`: Reset browser profile. ### Tabs - `openclaw browser tabs`: List open tabs. - `openclaw browser open `: Open URL in new tab. - `openclaw browser focus `: Focus tab. - `openclaw browser close [targetId]`: Close tab. ### Navigation & Capture - `openclaw browser navigate [--target-id ]`: Navigate tab. - `openclaw browser screenshot [targetId] [--full-page] [--ref ] [--element ] [--type png|jpeg]`: Capture screenshot. - `openclaw browser snapshot [--format aria|ai] [--target-id ] [--interactive] [--compact] [--depth ] [--selector ] [--out ] [--limit ]`: Capture structured page snapshot. - `openclaw browser pdf [--target-id ]`: Export page as PDF. ### Interaction - `openclaw browser resize [--target-id ]`: Resize viewport. - `openclaw browser click [--double] [--button ] [--modifiers ] [--target-id ]`: Click element. - `openclaw browser type [--submit] [--slowly] [--target-id ]`: Type into element. - `openclaw browser press [--target-id ]`: Press key. - `openclaw browser hover [--target-id ]`: Hover element. - `openclaw browser drag [--target-id ]`: Drag and drop. - `openclaw browser select [--target-id ]`: Select dropdown. - `openclaw browser upload [--ref ] [--input-ref ] [--element ] [--target-id ] [--timeout-ms ]`: File upload. - `openclaw browser fill [--fields ] [--fields-file ] [--target-id ]`: Fill form. - `openclaw browser dialog --accept|--dismiss [--prompt ] [--target-id ] [--timeout-ms ]`: Handle dialogs. - `openclaw browser wait [--time ] [--text ] [--text-gone ] [--target-id ]`: Wait for conditions. - `openclaw browser evaluate --fn [--ref ] [--target-id ]`: Execute JavaScript. - `openclaw browser console [--level ] [--target-id ]`: Read console logs. ## Nodes Common flags: `--url`, `--token`, `--timeout`, `--json`. ### Node Management - `openclaw nodes status [--connected] [--last-connected ] [--json]`: Node status. - `openclaw nodes list [--connected] [--last-connected ] [--json]`: List nodes. - `--last-connected` accepts durations like `24h`, `7d`. - `openclaw nodes describe --node `: Describe a node. - `openclaw nodes pending`: List pending approvals. - `openclaw nodes approve `: Approve node (high-risk). - `openclaw nodes reject `: Reject node. - `openclaw nodes rename --node --name `: Rename node. ### Remote Execution (Highest Risk) - `openclaw nodes invoke --node --command [--params ] [--invoke-timeout ] [--idempotency-key ]`: Invoke command on node. - Default params: `{}`. Default invoke timeout: 15000ms. - `openclaw nodes run --node [--cwd ] [--env KEY=VAL] [--command-timeout ] [--invoke-timeout ] [--needs-screen-recording] `: Run shell on node. - `--raw `: Run a shell string (`/bin/sh -lc` or `cmd.exe /c`). - `--agent `: Agent-scoped approvals/allowlists. - `--ask `, `--security `: Security mode overrides. - Reads `tools.exec.*` config (+ `agents.list[].tools.exec.*` overrides). - Uses exec approvals (`exec.approval.request`) before invoking `system.run`. - `--node` can be omitted when `tools.exec.node` is set. - Note: node hosts ignore `PATH` overrides; `tools.exec.pathPrepend` not applied to node hosts. - On Windows node hosts, `cmd.exe /c` shell-wrapper runs always require approval. ### Notifications & Sensors - `openclaw nodes notify --node [--title ] [--body ] [--sound ] [--priority ] [--delivery ] [--invoke-timeout ]`: Push notification (macOS only). - `openclaw nodes camera list --node `: List cameras. - `openclaw nodes camera snap --node [--facing front|back|both] [--device-id ] [--max-width ] [--quality <0-1>] [--delay-ms ] [--invoke-timeout ]`: Take photo (high-risk). - `openclaw nodes camera clip --node [--facing front|back] [--device-id ] [--duration ] [--no-audio] [--invoke-timeout ]`: Record video clip (high-risk). - `openclaw nodes canvas snapshot|present|hide|navigate|eval|a2ui`: Canvas/UI overlay commands. - `openclaw nodes screen record --node [--duration ] [--fps ]`: Record screen (high-risk). - `openclaw nodes location get --node [--accuracy ]`: Get location (high-risk). ## Node Host - `openclaw node run --host --port 18789`: Run node. - `openclaw node status`: Node status. - `openclaw node install [--host ] [--port ] [--tls] [--runtime ] [--force]`: Install node service. - `openclaw node uninstall|stop|restart`: Node lifecycle. ## Devices - `openclaw devices list [--json]`: List devices. - `openclaw devices approve [requestId] [--latest]`: Approve device (high-risk). - `openclaw devices reject `: Reject device. - `openclaw devices remove `: Remove device (high-risk). - `openclaw devices clear --yes [--pending]`: Clear devices (high-risk). - `openclaw devices rotate --device --role [--scope ]`: Rotate device credentials (high-risk). - `openclaw devices revoke --device --role `: Revoke device role (high-risk). ## Approvals - `openclaw approvals get [--node ] [--gateway] [--json]`: Get approval policies. - `--node`: scope to a specific node. `--gateway`: scope to gateway. - `openclaw approvals set --file [--node ] [--gateway]`: Replace approvals from file. - `openclaw approvals allowlist add [--agent ] [--node ]`: Add to allowlist. - `--agent` defaults to `"*"` (all agents). Patterns support globs. - Stored at `~/.openclaw/exec-approvals.json`. - `openclaw approvals allowlist remove `: Remove from allowlist. - Note: `--node` resolves via same resolver as `openclaw nodes` (id, name, ip, or id prefix). ## Sandbox - `openclaw sandbox explain [--session ] [--agent ] [--json]`: Explain sandbox config. - `openclaw sandbox list [--browser] [--json]`: List sandboxes. - Shows: container name/status, Docker image match, age, idle time, session/agent. - `--browser`: only list browser containers. - `openclaw sandbox recreate [--all] [--session ] [--agent ] [--browser] [--force] [--json]`: Recreate sandbox (high-risk). - Use cases: after Docker image update, config change, `setupCommand` change. ## Webhooks and DNS - `openclaw webhooks gmail setup|run [--account ] [--project] [--topic]`: Gmail webhook integration (high-risk). - `openclaw dns setup [--apply]`: Local DNS setup (high-risk, `--apply` requires sudo on macOS). ## Other - `openclaw docs [query...]`: Search docs from CLI. - `openclaw qr`: QR code generation. - `openclaw tui`: Terminal UI. - `openclaw acp`: Agent Communication Protocol. - `openclaw directory`: Directory listing. - `openclaw voicecall`: Voice call plugin (if installed). - `openclaw doctor [--fix] [--yes]`: Validate install. `--fix` applies repairs. ## Chat Slash Commands - `/status`: Quick diagnostics. - `/config`: Persisted config changes. - `/debug`: Runtime-only config overrides (requires `commands.debug: true`). ## Bundled Hooks Four bundled hooks (disabled by default, enable via `openclaw hooks enable `, restart gateway): - `session-memory`: Save context on `/new` → `memory/YYYY-MM-DD-slug.md` - `bootstrap-extra-files`: Inject `AGENTS.md`/`TOOLS.md` on agent bootstrap - `command-logger`: Log to `~/.openclaw/logs/commands.log` (JSONL) - `boot-md`: Run `BOOT.md` on gateway startup --- Config hot reload and env var details → see `config-schema.md`.