
OpenClaw 完整命令行参考指南 全命令汇总 持续更新
OpenClaw 提供了丰富的命令行工具,支持从基础设置到高级自动化的完整功能集。本文档汇总了所有可用的 CLI 命令和选项。以下内容同步自 OpenClaw 官方 CLI 文档(2026-05-29 同步),包含完整命令树、全局标志、输出模式、Chat 斜杠命令等内容。本文会持续更新,建议收藏。
openclaw is the main CLI entry point. Each core command has either a
dedicated reference page or is documented with the command it aliases; this
index lists the commands, the global flags, and the output styling rules that
apply across the CLI.
Use the setup commands by intent:
openclaw setupcreates the baseline config and workspace without walking the full guided onboarding flow.openclaw onboardis the full guided first-run path for gateway, model auth, workspace, channels, skills, and health.openclaw configurechanges targeted parts of an existing setup, such as model auth, gateway, channels, plugins, or skills.openclaw channels addconfigures channel accounts after the baseline exists; run it without flags for guided channel setup or with channel-specific flags for scripts.
Command pages
| Area | Commands |
|---|---|
| Setup and onboarding | crestodian · setup · onboard · configure · config · completion · doctor · dashboard |
| Reset and uninstall | backup · reset · uninstall · update |
| Messaging and agents | message · agent · agents · acp · mcp |
| Health and sessions | status · health · sessions |
| Gateway and logs | gateway · logs · system |
| Models and inference | models · infer · capability (alias for infer) · memory · commitments · wiki |
| Network and nodes | directory · nodes · devices · node |
| Runtime and sandbox | approvals · exec-policy (see approvals) · sandbox · tui · chat/terminal (aliases for tui --local) · browser |
| Automation | cron · tasks · hooks · webhooks · transcripts |
| Discovery and docs | dns · docs |
| Pairing and channels | pairing · qr · channels |
| Security and plugins | security · secrets · skills · plugins · proxy |
| Legacy aliases | daemon (gateway service) · clawbot (namespace) |
| Plugins (optional) | path · policy · voicecall (if installed) |
Global flags
| Flag | Purpose |
|---|---|
--dev |
Isolate state under ~/.openclaw-dev and shift default ports |
--profile |
Isolate state under ~/.openclaw- |
--container |
Target a named container for execution |
--no-color |
Disable ANSI colors (NO_COLOR=1 is also respected) |
--update |
Shorthand for openclaw update (source installs only) |
-V, --version, -v |
Print version and exit |
Output modes
- ANSI colors and progress indicators render only in TTY sessions.
- OSC-8 hyperlinks render as clickable links where supported; otherwise the
CLI falls back to plain URLs.
--json(and--plainwhere supported) disables styling for clean output.- Long-running commands show a progress indicator (OSC 9;4 when supported).
Palette source of truth: src/terminal/palette.ts.
Command tree
openclaw [--dev] [--profile <name>] <command>
crestodian
setup
onboard
configure
config
get
set
unset
file
schema
validate
completion
doctor
dashboard
backup
create
verify
security
audit
secrets
reload
audit
configure
apply
reset
uninstall
update
wizard
status
channels
list
status
capabilities
resolve
logs
add
remove
login
logout
directory
self
peers list
groups list|members
skills
search
install
update
list
info
check
plugins
list
inspect
install
uninstall
update
enable
disable
doctor
marketplace list
memory
status
index
search
transcripts
list
show
path
path
resolve
find
set
validate
emit
commitments
list
dismiss
wiki
status
doctor
init
ingest
compile
lint
search
get
apply
bridge import
unsafe-local import
obsidian status|search|open|command|daily
message
send
broadcast
poll
react
reactions
read
edit
delete
pin
unpin
pins
permissions
search
thread create|list|reply
emoji list|upload
sticker send|upload
role info|add|remove
channel info|list
member info
voice status
event list|create
timeout
kick
ban
agent
agents
list
add
delete
bindings
bind
unbind
set-identity
acp
mcp
serve
list
show
set
unset
status
health
sessions
cleanup
tasks
list
audit
maintenance
show
notify
cancel
flow list|show|cancel
gateway
call
usage-cost
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
infer (alias: capability)
list
inspect
model run|list|inspect|providers|auth login|logout|status
image generate|edit|describe|describe-many|providers
audio transcribe|providers
tts convert|voices|providers|status|enable|disable|set-provider
video generate|describe|providers
web search|fetch|providers
embedding create|providers
auth add|login|login-github-copilot|setup-token|paste-token
auth order get|set|clear
sandbox
list
recreate
explain
cron
status
list
get
add
edit
rm
enable
disable
runs
run
nodes
status
describe
list
pending
approve
reject
rename
invoke
notify
push
canvas snapshot|present|hide|navigate|eval
canvas a2ui push|reset
camera list|snap|clip
screen record
location get
devices
list
remove
clear
approve
reject
rotate
revoke
node
run
status
install
uninstall
stop
restart
approvals
get
set
allowlist add|remove
exec-policy
show
preset
set
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
proxy
start
run
coverage
sessions
query
blob
purge
pairing
list
approve
qr
clawbot
qr
docs
dns
setup
tui
chat (alias: tui --local)
terminal (alias: tui --local)
Plugins can add additional top-level commands (for example openclaw voicecall).
Chat slash commands
Chat messages support /... commands. See slash commands.
Highlights:
/status— quick diagnostics./trace— session-scoped plugin trace/debug lines./config— persisted config changes./debug— runtime-only config overrides (memory, not disk; requirescommands.debug: true).
Usage tracking
openclaw status --usage and the Control UI surface provider usage/quota when
OAuth/API credentials are available. Data comes directly from provider usage
endpoints and is normalized to X% left. Providers with current usage
windows: Anthropic, GitHub Copilot, Gemini CLI, OpenAI Codex, MiniMax,
Xiaomi, and z.ai.
See Usage tracking for details.
Related
安装与初始化
推荐安装方式
使用安装脚本是最简单的方式,会自动检测并安装 Node.js:
# macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bash
# Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex
跳过向导仅安装二进制:
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
npm/pnpm 安装
# npm 安装
npm install -g openclaw@latest
openclaw onboard --install-daemon
# pnpm 安装
pnpm add -g openclaw@latest
pnpm approve-builds -g
openclaw onboard --install-daemon
高频使用命令速查
基础设置与配置
openclaw setup— 初始化配置和工作区(不运行完整向导)openclaw onboard— 完整交互式向导:网关、模型认证、工作区、频道、技能、健康检查openclaw configure— 更改已有配置的特定部分(模型认证、网关、频道、插件、技能)openclaw crestodian— 安全的免配置设置和修复助手openclaw config get/set/unset/file/schema/validate— 非交互式配置管理openclaw completion— 生成/安装 Shell 补全脚本
状态监控
openclaw status— 查看网关状态、会话健康状况openclaw status --usage— 查看提供商使用量/配额openclaw gateway status— 检查网关服务状态openclaw channels status— 检查频道健康状况openclaw models status— 查看模型状态openclaw health— 网关健康快照(RPC)openclaw logs— 查看网关日志openclaw doctor— 健康检查和引导修复
消息与通信
openclaw message send— 发送消息openclaw message broadcast— 广播消息openclaw message poll/react/read/edit/delete— 消息操作openclaw message pin/unpin/pins— 消息置顶openclaw message thread create|list|reply— 消息线程openclaw message emoji list|upload— 表情管理openclaw channels list/add/remove— 频道管理openclaw channels login/logout— 频道登录/登出
推理与模型管理
openclaw models list/status/set— 模型列表和状态openclaw models aliases/fallbacks— 别名和故障转移管理openclaw infer model run— 运行模型推理openclaw infer image generate/edit/describe— 图像生成/编辑/描述openclaw infer audio transcribe— 音频转文字openclaw infer tts convert— 文本转语音openclaw infer video generate/describe— 视频生成/描述openclaw infer web search/fetch— 网页搜索/抓取openclaw infer embedding create— 创建嵌入向量
自动化与调度
openclaw cron list/add/edit/rm— 定时任务管理openclaw tasks list/show/cancel— 后台任务管理openclaw tasks flow list|show|cancel— Task Flow 状态openclaw hooks list/enable/disable— 钩子管理openclaw webhooks gmail setup|run— Gmail Pub/Sub
MCP 与代理
openclaw mcp serve— 通过 MCP 暴露会话openclaw mcp list/show/set/unset— MCP 服务器定义管理openclaw agent— 发送代理轮次openclaw agents list/add/delete/bind/unbind— 代理管理openclaw acp— ACP 桥接(IDE 集成)
知识与记忆
openclaw memory status/index/search— 记忆文件管理openclaw wiki status/search/compile/apply— Wiki 知识库openclaw wiki obsidian status|search|open— Obsidian 集成openclaw commitments list/dismiss— 跟进承诺管理openclaw transcripts list/show— 会话记录
安全与维护
openclaw security audit— 安全审计openclaw secrets reload/audit/configure/apply— 密钥管理openclaw approvals get/set— 审批策略openclaw exec-policy show/preset/set— 执行策略openclaw sandbox list/recreate/explain— 沙盒管理openclaw proxy start/run/coverage— 代理调试openclaw backup create/verify— 备份管理openclaw reset— 重置本地配置/状态openclaw uninstall— 卸载网关服务
节点与设备
openclaw nodes status/list/describe— 节点状态openclaw nodes invoke— 远程节点执行openclaw nodes canvas snapshot|present|navigate— 画布操作openclaw nodes camera list|snap|clip— 摄像头操作openclaw nodes screen record— 屏幕录制openclaw devices list/approve/reject/rotate/revoke— 设备管理
浏览器控制
openclaw browser start/stop/status— 浏览器服务管理openclaw browser open/navigate— 页面导航openclaw browser click/type/press/hover/drag— UI 交互openclaw browser screenshot/snapshot/pdf— 截图和导出
实用技巧
- 使用
--json参数获取机器可读的输出 - 使用
--no-color禁用颜色输出(适合脚本) - 使用
--container <name>指定容器执行 - 聊天消息支持
/status,/config,/trace,/debug等斜杠命令 - OSC-8 超链接在支持的终端中可点击
- 大多数插件更改需要网关重启
总结
OpenClaw 的命令行工具集提供了从简单配置到复杂自动化的完整解决方案。通过合理组合这些命令,可以构建强大的 AI 助手工作流,实现跨平台的消息处理、自动化任务执行和智能决策支持。
建议收藏本文,以便随时查阅。


评论