--- summary: "OpenClaw CLI reference for `openclaw` commands, subcommands, and options" read_when: - Adding or modifying CLI commands or options - Documenting new command surfaces title: "CLI Reference" --- # CLI reference This page describes the current CLI behavior. If commands change, update this doc. ## Command pages - [`setup`](/cli/setup) - [`onboard`](/cli/onboard) - [`configure`](/cli/configure) - [`config`](/cli/config) - [`completion`](/cli/completion) - [`doctor`](/cli/doctor) - [`dashboard`](/cli/dashboard) - [`reset`](/cli/reset) - [`uninstall`](/cli/uninstall) - [`update`](/cli/update) - [`message`](/cli/message) - [`agent`](/cli/agent) - [`agents`](/cli/agents) - [`acp`](/cli/acp) - [`status`](/cli/status) - [`health`](/cli/health) - [`sessions`](/cli/sessions) - [`gateway`](/cli/gateway) - [`logs`](/cli/logs) - [`system`](/cli/system) - [`models`](/cli/models) - [`memory`](/cli/memory) - [`directory`](/cli/directory) - [`nodes`](/cli/nodes) - [`devices`](/cli/devices) - [`node`](/cli/node) - [`approvals`](/cli/approvals) - [`sandbox`](/cli/sandbox) - [`tui`](/cli/tui) - [`browser`](/cli/browser) - [`cron`](/cli/cron) - [`dns`](/cli/dns) - [`docs`](/cli/docs) - [`hooks`](/cli/hooks) - [`webhooks`](/cli/webhooks) - [`pairing`](/cli/pairing) - [`qr`](/cli/qr) - [`plugins`](/cli/plugins) (plugin commands) - [`channels`](/cli/channels) - [`security`](/cli/security) - [`secrets`](/cli/secrets) - [`skills`](/cli/skills) - [`daemon`](/cli/daemon) (legacy alias for gateway service commands) - [`clawbot`](/cli/clawbot) (legacy alias namespace) - [`voicecall`](/cli/voicecall) (plugin; if installed) ## Global flags - `--dev`: isolate state under `~/.openclaw-dev` and shift default ports. - `--profile `: isolate state under `~/.openclaw-`. - `--no-color`: disable ANSI colors. - `--update`: shorthand for `openclaw update` (source installs only). - `-V`, `--version`, `-v`: print version and exit. ## Output styling - ANSI colors and progress indicators only render in TTY sessions. - OSC-8 hyperlinks render as clickable links in supported terminals; otherwise we fall back to plain URLs. - `--json` (and `--plain` where supported) disables styling for clean output. - `--no-color` disables ANSI styling; `NO_COLOR=1` is also respected. - Long-running commands show a progress indicator (OSC 9;4 when supported). ## Color palette OpenClaw uses a lobster palette for CLI output. - `accent` (#FF5A2D): headings, labels, primary highlights. - `accentBright` (#FF7A3D): command names, emphasis. - `accentDim` (#D14A22): secondary highlight text. - `info` (#FF8A5B): informational values. - `success` (#2FBF71): success states. - `warn` (#FFB020): warnings, fallbacks, attention. - `error` (#E23D2D): errors, failures. - `muted` (#8B7F77): de-emphasis, metadata. Palette source of truth: `src/terminal/palette.ts` (aka “lobster seam”). ## Command tree ``` openclaw [--dev] [--profile ] setup onboard configure config get set unset completion doctor dashboard security audit secrets reload migrate reset uninstall update channels list status logs add remove login logout directory skills list info check plugins list info install enable disable doctor memory status index search message agent agents list add delete acp status health sessions gateway call health status probe discover install uninstall start stop restart run daemon status install uninstall start stop restart logs system event heartbeat last|enable|disable presence models list status set set-image aliases list|add|remove fallbacks list|add|remove|clear image-fallbacks list|add|remove|clear scan auth add|setup-token|paste-token auth order get|set|clear sandbox list recreate explain cron status list add edit rm enable disable runs run nodes devices node run status install uninstall start stop restart approvals get set allowlist add|remove browser status start stop reset-profile tabs open focus close profiles create-profile delete-profile screenshot snapshot navigate resize click type press hover drag select upload fill dialog wait evaluate console pdf hooks list info check enable disable install update webhooks gmail setup|run pairing list approve qr clawbot qr docs dns setup tui ``` Note: plugins can add additional top-level commands (for example `openclaw voicecall`). ## Security - `openclaw security audit` — audit config + local state for common security foot-guns. - `openclaw security audit --deep` — best-effort live Gateway probe. - `openclaw security audit --fix` — tighten safe defaults and chmod state/config. ## Secrets - `openclaw secrets reload` — re-resolve refs and atomically swap the runtime snapshot. - `openclaw secrets audit` — scan for plaintext residues, unresolved refs, and precedence drift. - `openclaw secrets configure` — interactive helper for provider setup + SecretRef mapping + preflight/apply. - `openclaw secrets apply --from ` — apply a previously generated plan (`--dry-run` supported). ## Plugins Manage extensions and their config: - `openclaw plugins list` — discover plugins (use `--json` for machine output). - `openclaw plugins info ` — show details for a plugin. - `openclaw plugins install ` — install a plugin (or add a plugin path to `plugins.load.paths`). - `openclaw plugins enable ` / `disable ` — toggle `plugins.entries..enabled`. - `openclaw plugins doctor` — report plugin load errors. Most plugin changes require a gateway restart. See [/plugin](/tools/plugin). ## Memory Vector search over `MEMORY.md` + `memory/*.md`: - `openclaw memory status` — show index stats. - `openclaw memory index` — reindex memory files. - `openclaw memory search ""` (or `--query ""`) — semantic search over memory. ## Chat slash commands Chat messages support `/...` commands (text and native). See [/tools/slash-commands](/tools/slash-commands). Highlights: - `/status` for quick diagnostics. - `/config` for persisted config changes. - `/debug` for runtime-only config overrides (memory, not disk; requires `commands.debug: true`). ## Setup + onboarding ### `setup` Initialize config + workspace. Options: - `--workspace `: agent workspace path (default `~/.openclaw/workspace`). - `--wizard`: run the onboarding wizard. - `--non-interactive`: run wizard without prompts. - `--mode `: wizard mode. - `--remote-url `: remote Gateway URL. - `--remote-token `: remote Gateway token. Wizard auto-runs when any wizard flags are present (`--non-interactive`, `--mode`, `--remote-url`, `--remote-token`). ### `onboard` Interactive wizard to set up gateway, workspace, and skills. Options: - `--workspace ` - `--reset` (reset config + credentials + sessions before wizard) - `--reset-scope ` (default `config+creds+sessions`; use `full` to also remove workspace) - `--non-interactive` - `--mode ` - `--flow ` (manual is an alias for advanced) - `--auth-choice ` - `--token-provider ` (non-interactive; used with `--auth-choice token`) - `--token ` (non-interactive; used with `--auth-choice token`) - `--token-profile-id ` (non-interactive; default: `:manual`) - `--token-expires-in ` (non-interactive; e.g. `365d`, `12h`) - `--secret-input-mode ` (default `plaintext`; use `ref` to store provider default env refs instead of plaintext keys) - `--anthropic-api-key ` - `--openai-api-key ` - `--mistral-api-key ` - `--openrouter-api-key ` - `--ai-gateway-api-key ` - `--moonshot-api-key ` - `--kimi-code-api-key ` - `--gemini-api-key ` - `--zai-api-key ` - `--minimax-api-key ` - `--opencode-zen-api-key ` - `--custom-base-url ` (non-interactive; used with `--auth-choice custom-api-key`) - `--custom-model-id ` (non-interactive; used with `--auth-choice custom-api-key`) - `--custom-api-key ` (non-interactive; optional; used with `--auth-choice custom-api-key`; falls back to `CUSTOM_API_KEY` when omitted) - `--custom-provider-id ` (non-interactive; optional custom provider id) - `--custom-compatibility ` (non-interactive; optional; default `openai`) - `--gateway-port ` - `--gateway-bind ` - `--gateway-auth ` - `--gateway-token ` - `--gateway-token-ref-env ` (non-interactive; store `gateway.auth.token` as an env SecretRef; requires that env var to be set; cannot be combined with `--gateway-token`) - `--gateway-password ` - `--remote-url ` - `--remote-token ` - `--tailscale ` - `--tailscale-reset-on-exit` - `--install-daemon` - `--no-install-daemon` (alias: `--skip-daemon`) - `--daemon-runtime ` - `--skip-channels` - `--skip-skills` - `--skip-health` - `--skip-ui` - `--node-manager ` (pnpm recommended; bun not recommended for Gateway runtime) - `--json` ### `configure` Interactive configuration wizard (models, channels, skills, gateway). ### `config` Non-interactive config helpers (get/set/unset/file/validate). Running `openclaw config` with no subcommand launches the wizard. Subcommands: - `config get `: print a config value (dot/bracket path). - `config set `: set a value (JSON5 or raw string). - `config unset `: remove a value. - `config file`: print the active config file path. - `config validate`: validate the current config against the schema without starting the gateway. - `config validate --json`: emit machine-readable JSON output. ### `doctor` Health checks + quick fixes (config + gateway + legacy services). Options: - `--no-workspace-suggestions`: disable workspace memory hints. - `--yes`: accept defaults without prompting (headless). - `--non-interactive`: skip prompts; apply safe migrations only. - `--deep`: scan system services for extra gateway installs. ## Channel helpers ### `channels` Manage chat channel accounts (WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost (plugin)/Signal/iMessage/MS Teams). Subcommands: - `channels list`: show configured channels and auth profiles. - `channels status`: check gateway reachability and channel health (`--probe` runs extra checks; use `openclaw health` or `openclaw status --deep` for gateway health probes). - Tip: `channels status` prints warnings with suggested fixes when it can detect common misconfigurations (then points you to `openclaw doctor`). - `channels logs`: show recent channel logs from the gateway log file. - `channels add`: wizard-style setup when no flags are passed; flags switch to non-interactive mode. - When adding a non-default account to a channel still using single-account top-level config, OpenClaw moves account-scoped values into `channels..accounts.default` before writing the new account. - Non-interactive `channels add` does not auto-create/upgrade bindings; channel-only bindings continue to match the default account. - `channels remove`: disable by default; pass `--delete` to remove config entries without prompts. - `channels login`: interactive channel login (WhatsApp Web only). - `channels logout`: log out of a channel session (if supported). Common options: - `--channel `: `whatsapp|telegram|discord|googlechat|slack|mattermost|signal|imessage|msteams` - `--account `: channel account id (default `default`) - `--name