本文摘要详细的命令分类整理 OpenClaw命令大全,供大家日常使用中作为手册参考查阅。
直接上干货!
命令格式:
openclaw [options] [command] [参数...]
⬆ ⬆ ⬆ ⬆
命令标识 命令类 具体命令 参数举例:
penClaw gateway restart
OpenClaw --version详细的命令分类整理如下表:
| 分类 | 命令 | 功能描述 |
|---|---|---|
| 安装依赖 | git --version | 检查是否安装 git,安装依赖的工具 |
| node --version | 检查是否安装 node,安装依赖的工具,要求 node 必须 ≥22.0.0 | |
| 安装准备 | npm config set registry https://registry.npmmirror.com | 配置国内镜像加速,以便减少因外网访问较慢带来的各种问题 |
| npm view openclaw versions | 查询当前 OpenClaw 的发布信息,不建议跟风最新版本(--tag latest),可能会存在一些关键问题 | |
| 解除 PowerShell 的执行策略限制 | Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | PowerShell 执行报错,解除,PowerShell 的执行策略限制 |
| Get-ExecutionPolicy -Scope CurrentUser | 验证设置是否生效 | |
| 安装 | npm install -g openclaw@latest | npm 安装方式 |
| openclaw --version | 检查安装版本号 | |
| openclaw onboard --install-daemon | 初始化配置,首次必跑,向导操作 | |
| openclaw gateway | 启动 Gateway 服务 | |
| openclaw gateway restart | 重启 Gateway 服务 | |
| 升级 | npm i -g openclaw@latest | npm 升级 OpenClaw |
| openclaw gateway restart | 重启 Gateway 服务 | |
| 状态检查 | openclaw gateway status | 查询 Gateway 状态 |
| openclaw status | 系统整体诊断 | |
| openclaw status --deep | 带实时探测的深度诊断 | |
| openclaw status --usage | 看完整 provider 用量明细 | |
| openclaw health | 快速检查 Gateway 是否正常 | |
| openclaw doctor --fix | 配置验证错误并修复 | |
| web UI | openclaw dashborad | 启动 Web UI,官方聊天入口 |
| openclaw config get gateway.auth.token | 获取 Token,Web UI 登录框若提示需要 token 时,可查看,并输入 | |
| channels | openclaw channels list | 列出所有渠道 |
| openclaw channels status | 检查渠道健康(会给修复建议) | |
| openclaw channels add | 添加渠道 | |
| openclaw channels remove | 移除渠道 | |
| openclaw channels login | 登录渠道账号 | |
| openclaw channels logout | 登出渠道账号 | |
| openclaw channels logs | 查看渠道日志 | |
| openclaw message send --target --message | 主动往渠道发消息 | |
| openclaw directory | 查找目标 ID,配合 message send 用 | |
| models | openclaw models | 等于 models status |
| openclaw models list | 模型列表 | |
| openclaw models status | 模型状态 | |
| openclaw models set | 设置默认模型 | |
| openclaw models set-image | 设置图像模型 | |
| openclaw models auth | 模型认证 | |
| openclaw models aliases | 模型别名 | |
| openclaw models fallbacks | 模型回退链 | |
| skills | openclaw skills list | 有哪些技能 |
| openclaw skills info | 某个技能的详情 | |
| openclaw skills check | 检查技能依赖是否就绪 | |
| memory | openclaw memory status | 记忆索引状态 |
| openclaw memory index | 建索引 | |
| openclaw memory search | 搜索记忆 | |
| agents | openclaw agents list | 列出所有独立 Agent |
| openclaw agents add | 添加 Agent | |
| openclaw agents delete | 删除 Agent | |
| openclaw agents bindings | 查看绑定关系 | |
| openclaw agents bind | 绑定 | |
| openclaw agents unbind | 解绑 | |
| openclaw agents set-identity | 设置 Agent 身份 | |
| openclaw agent --message "..." | 触发一轮 Agent 运行 | |
| openclaw agent --local | 本地运行,不走 Gateway | |
| openclaw approvals get | 查看当前审批规则 | |
| approvals 安全 | openclaw approvals set | 设置审批规则 |
| openclaw approvals allowlist add | 添加白名单 | |
| openclaw approvals allowlist remove | 移除白名单 | |
| openclaw security audit | 安全审计 | |
| 管理类 | openclaw gateway install/start/stop\status\restart | 网关服务管理 |
| openclaw browser ... | 浏览器实例控制 | |
| openclaw nodes ... | 节点管理 | |
| openclaw node ... | 单节点操作 | |
| openclaw cron ... | 定时任务 | |
| openclaw backup ... | 备份 | |
| openclaw plugins ... | 插件管理 | |
| openclaw sessions ... | 会话管理 | |
| 聊天会话 | /help | 帮助 |
| /commands | 列出所有可用命令 | |
| /status | 当前会话状态(模型、provider 用量 | |
| /context detail | 当前上下文有什么文件、工具、skill | |
| /context json | JSON 格式输出上下文 | |
| /whoami 或 /id | 我的 sender ID | |
| /reset 或 /new | 开新会话 | |
| /new | 开新会话并切换模型 | |
| /stop | 停止当前运行 | |
| /restart | 重启 | |
| /usage off | 关闭 usage 显示 | |
| /usage tokens | 每条回复后显示 token 用量 | |
| /usage full | 完整 usage | |
| /usage cost | 打印本地 session 的成本汇总 | |
| /compact | 压缩上下文(对话太长时用) | |
| 高级 Directives 运行时调参 | /model | 切换模型 |
| /model list | 列出可用模型 | |
| /model status | 当前模型状态 | |
| /think off | 关闭思考 | |
| /think minimal | 最小思考 | |
| /think low | 低 | |
| /think medium | 中等 | |
| /think high | 高 | |
| /think xhigh | 极高 | |
| /verbose on/full/off | 详细信息(调试用,正常建议关) | |
| /reasoning on/off/stream | 输出推理过程 | |
| /elevated on/off/ask/full | 提升执行权限 | |
| /exec host=<...> | 执行环境参数 | |
| /queue | 队列控制 | |
| 高级 Sub-agent 控制 | /subagents list | 当前有哪些子 Agent |
| /subagents spawn | 启动一个子 Agent | |
| /subagents info | 子 Agent 详情 | |
| /subagents log | 查看某个子 Agent 的日志 | |
| /subagents send | 给子 Agent 发消息 | |
| /subagents steer | 中途调整方向 | |
| /subagents kill | 终止子 Agent | |
| config | /config show | 查看配置 |
| /config get | 读取某项 | |
| /config set | 修改配置(写入磁盘 openclaw.json) | |
| /config unset | 删除某项 | |
| debug | /debug show | 查看运行时调试配置 |
| /debug set | 修改(只改运行时,不写磁盘) | |
| /debug unset | 删除 | |
| /debug reset | 重置 | |
| approve | /approve allow-once | 本次允许 |
| /approve allow-always | 永久允许 | |
| /approve deny | 拒绝 | |
| /allowlist | 看或修改白名单 | |
| Shell 执行 | ! | 在宿主机跑命令 |
| /bash | 同上,别名 | |
| !poll | 查看长时间运行的命令状态 | |
| !stop | 停止运行中的命令 |
觉得内容不错?我要