本页描述当前 CLI 行为。如果命令变更,请更新此文档。
命令页面索引
主要命令的详细文档:
- setup - 初始化配置和工作区
- onboard - 交互式引导向导
- configure - 交互式配置向导
- doctor - 健康检查和修复
- dashboard - 打开 Dashboard
- reset - 重置本地配置/状态
- uninstall - 卸载 Gateway 服务
- message - 统一出站消息
- agent - 运行单个代理轮次
- agents - 管理隔离代理
- status - 显示链接会话健康状态
- health - 从运行中的 Gateway 获取健康状态
- sessions - 列出存储的会话
- gateway - Gateway 管理
- logs - 查看日志
- models - 模型管理
- memory - 记忆搜索
- nodes - 节点管理
- browser - 浏览器控制
- cron - 定时任务
全局标志
--dev:在~/.openclaw-dev下隔离状态并移动默认端口。--profile <name>:在~/.openclaw-<name>下隔离状态。--no-color:禁用 ANSI 颜色。--update:openclaw update的快捷方式(仅源码安装)。-V, --version, -v:打印版本并退出。
输出样式
- ANSI 颜色和进度指示器仅在 TTY 会话中渲染。
- OSC-8 超链接在支持的终端中渲染为可点击链接;否则回退到纯 URL。
--json(及支持的地方--plain)禁用样式以获得干净输出。--no-color禁用 ANSI 样式;NO_COLOR=1也被接受。
命令树概览
openclaw [--dev] [--profile <name>] <command>
setup # 初始化
onboard # 引导向导
configure # 配置向导
config get|set|unset # 配置操作
doctor # 健康检查
security audit # 安全审计
reset # 重置
uninstall # 卸载
update # 更新
channels list|status|add|remove|login|logout # 频道管理
skills list|info|check # 技能管理
plugins list|info|install|enable|disable # 插件管理
memory status|index|search # 记忆搜索
message send|poll|react|... # 消息发送
agent # 运行代理轮次
agents list|add|delete # 管理代理
status # 状态查看
health # 健康检查
sessions # 会话列表
gateway run|status|install|uninstall|... # Gateway 管理
logs # 日志查看
system event|heartbeat|presence # 系统命令
models list|status|set|... # 模型管理
cron status|list|add|edit|rm|... # 定时任务
nodes status|list|invoke|run|... # 节点管理
browser status|start|stop|... # 浏览器控制
tui # 终端 UI
安全命令
openclaw security audit— 审计配置 + 本地状态的常见安全问题。openclaw security audit --deep— 尽力进行实时 Gateway 探测。openclaw security audit --fix— 收紧安全默认值并 chmod 状态/配置。
插件管理
openclaw plugins list # 发现插件
openclaw plugins info <id> # 显示插件详情
openclaw plugins install <path|spec> # 安装插件
openclaw plugins enable <id> # 启用插件
openclaw plugins disable <id> # 禁用插件
openclaw plugins doctor # 报告插件加载错误
记忆搜索
对 MEMORY.md + memory/*.md 进行向量搜索:
openclaw memory status # 显示索引统计
openclaw memory index # 重新索引记忆文件
openclaw memory search "<query>" # 语义搜索记忆
聊天斜杠命令
聊天消息支持 /... 命令。详见 斜杠命令。
要点:
/status用于快速诊断。/config用于持久化配置更改。/debug用于运行时配置覆盖(内存中,非磁盘;需要commands.debug: true)。
完整参考
此页面是概览。每个命令的详细选项和用法请参考各自的文档页面,或访问 官方 CLI 参考。