OpenClaw 命令参考大全
🦞 完整命令分类 + 中文说明
适用版本:openclaw@2026.3.8+
最后更新:2026-03-13
📖 使用说明
- 带
* 的命令有子命令,使用 openclaw <command> --help 查看详情 - 所有命令支持
--help 参数获取详细帮助 - 支持
--dev 参数运行开发模式(隔离状态)
🏗️ 一、核心服务管理
Gateway 服务(核心)
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw gateway start | 启动 Gateway 服务 | 开机后手动启动服务 |
openclaw gateway stop | 停止 Gateway 服务 | 维护或卸载前停止 |
openclaw gateway restart | 重启 Gateway 服务 | 配置更改后重启 |
openclaw gateway status | 查看服务状态 | 检查服务是否运行 |
openclaw gateway install | 安装系统服务 | 设置开机自启 |
openclaw gateway uninstall | 卸载系统服务 | 禁用开机自启 |
openclaw gateway run | 前台运行 Gateway | 调试用,可见日志 |
openclaw gateway call | 调用 Gateway 方法 | 高级 RPC 调用 |
openclaw gateway discover | 发现网关 | 局域网网关发现 |
openclaw gateway health | 获取健康状态 | 快速健康检查 |
openclaw gateway probe | 探测可达性 | 网络连通性测试 |
openclaw gateway usage-cost | 获取使用成本 | 查看会话日志统计 |
等价命令(Daemon 别名)
daemon 是 gateway 的旧版别名,两者完全等价:
1
2
3
| openclaw daemon start # 等价于 gateway start
openclaw daemon stop # 等价于 gateway stop
openclaw daemon status # 等价于 gateway status
|
⚙️ 二、配置管理
Config 配置
| 命令 | 中文说明 | 示例 |
|---|
openclaw config get <key> | 获取配置值 | openclaw config get gateway.port |
openclaw config set <key> <value> | 设置配置值 | openclaw config set gateway.port 18789 |
openclaw config unset <key> | 删除配置项 | openclaw config unset gateway.port |
openclaw config file | 显示配置文件路径 | 输出 ~/.openclaw/openclaw.json |
openclaw config validate | 验证配置文件 | 检查配置语法是否正确 |
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw configure | 交互式配置向导 | 初次安装后配置 |
🔧 三、诊断与维护
Doctor 健康检查
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw doctor | 健康检查 + 自动修复 | 诊断问题 |
openclaw doctor --repair | 执行修复 | 自动修复已知问题 |
Status 状态
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw status | 显示渠道健康和会话状态 | 快速查看系统状态 |
Health 健康
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw health | 获取运行中 Gateway 的健康状态 | API 方式检查健康 |
Logs 日志
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw logs | 查看 Gateway 日志 | 排查问题 |
openclaw logs --follow | 实时跟踪日志 | 监控运行状态 |
🗑️ 四、卸载与重置
Uninstall 卸载
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw uninstall | 卸载 Gateway 服务 + 本地数据 | 完全卸载 |
openclaw uninstall --all | 删除所有内容(含 App) | 彻底清理 |
openclaw uninstall --service | 仅卸载服务 | 保留数据 |
openclaw uninstall --state | 删除状态和配置 | 重置配置 |
openclaw uninstall --workspace | 删除工作空间 | 清理项目 |
openclaw uninstall --dry-run | 预览删除内容 | 确认操作 |
Reset 重置
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw reset | 重置本地配置/状态 | 保留 CLI 的情况下重置 |
🤖 五、Agent 管理
Agents 多 Agent 管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw agents list | 列出已配置的 Agent | 查看可用 Agent |
openclaw agents add | 添加新的隔离 Agent | 创建新 Agent |
openclaw agents delete | 删除 Agent | 移除不需要的 Agent |
openclaw agents bind | 添加路由绑定 | 配置消息路由 |
openclaw agents unbind | 移除路由绑定 | 取消路由配置 |
openclaw agents bindings | 列出路由绑定 | 查看路由配置 |
openclaw agents set-identity | 更新 Agent 身份 | 修改名称/主题/表情 |
Agent 单次运行
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw agent | 运行单次 Agent 调用 | 快速测试或一次性任务 |
📡 六、渠道管理(Channels)
Channels 渠道
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw channels list | 列出已配置的渠道 | 查看已连接平台 |
openclaw channels add | 添加渠道账户 | 连接新平台 |
openclaw channels remove | 移除渠道账户 | 断开平台连接 |
openclaw channels login | 登录渠道 | 扫码或令牌登录 |
openclaw channels logout | 登出渠道 | 退出登录 |
openclaw channels status | 显示渠道状态 | 检查连接状态 |
openclaw channels logs | 查看渠道日志 | 排查连接问题 |
openclaw channels resolve | 解析名称到 ID | 查找用户/群组 ID |
openclaw channels capabilities | 显示 provider 能力 | 查看支持的功能 |
📱 七、设备与节点管理
Devices 设备配对
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw devices list | 列出已配对设备 | 查看配对状态 |
openclaw devices approve | 批准配对请求 | 确认新设备 |
openclaw devices reject | 拒绝配对请求 | 拒绝未知设备 |
openclaw devices remove | 移除已配对设备 | 删除旧设备 |
openclaw devices clear | 清空所有配对设备 | 重置配对表 |
openclaw devices rotate | 轮换设备令牌 | 安全更新令牌 |
openclaw devices revoke | 撤销设备令牌 | 立即失效令牌 |
Nodes 节点管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw nodes list | 列出节点 | 查看已配对节点 |
openclaw nodes pending | 列出待处理请求 | 查看待批准配对 |
openclaw nodes approve | 批准配对请求 | 确认节点配对 |
openclaw nodes reject | 拒绝配对请求 | 拒绝节点配对 |
openclaw nodes rename | 重命名节点 | 修改显示名称 |
openclaw nodes describe | 描述节点能力 | 查看节点支持的功能 |
openclaw nodes invoke | 调用节点命令 | 执行远程命令 |
openclaw nodes run | 在节点上运行命令 | macOS 专用 |
openclaw nodes camera | 捕获相机媒体 | 获取节点相机内容 |
openclaw nodes screen | 捕获屏幕录制 | 获取节点屏幕内容 |
openclaw nodes location | 获取位置信息 | 获取节点位置 |
openclaw nodes notify | 发送本地通知 | macOS 专用通知 |
openclaw nodes push | 发送 APNs 测试推送 | iOS 节点测试 |
openclaw nodes canvas | 捕获画布内容 | 获取节点渲染内容 |
🗄️ 八、数据管理
Backup 备份
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw backup create | 创建备份 | 备份配置、凭证、会话 |
openclaw backup verify | 验证备份 | 检查备份完整性 |
Sessions 会话管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw sessions | 列出会话 | 查看历史会话 |
openclaw sessions --active 120 | 列出活跃会话 | 查看最近 120 分钟会话 |
openclaw sessions cleanup | 清理会话存储 | 维护会话数据 |
Memory 记忆管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw memory search | 搜索记忆文件 | 查找历史记忆 |
openclaw memory index | 重新索引记忆 | 更新搜索索引 |
openclaw memory status | 显示索引状态 | 检查索引健康 |
🌐 九、模型管理
Models 模型配置
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw models list | 列出已配置模型 | 查看可用模型 |
openclaw models set | 设置默认模型 | 更改主模型 |
openclaw models set-image | 设置图像模型 | 更改图像生成模型 |
openclaw models status | 显示模型状态 | 检查模型配置 |
openclaw models scan | 扫描 OpenRouter 免费模型 | 发现新模型 |
openclaw models aliases | 管理模型别名 | 配置模型快捷名称 |
openclaw models auth | 管理模型认证配置 | 配置 API 密钥 |
openclaw models fallbacks | 管理模型回退列表 | 配置降级策略 |
openclaw models image-fallbacks | 管理图像模型回退 | 图像模型降级配置 |
🔌 十、插件与技能
Plugins 插件管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw plugins list | 列出已发现插件 | 查看可用插件 |
openclaw plugins info | 显示插件详情 | 了解插件功能 |
openclaw plugins install | 安装插件 | 添加新插件 |
openclaw plugins uninstall | 卸载插件 | 移除插件 |
openclaw plugins update | 更新插件 | 升级已安装插件 |
openclaw plugins enable | 启用插件 | 激活插件 |
openclaw plugins disable | 禁用插件 | 停用插件 |
openclaw plugins doctor | 报告插件问题 | 诊断插件加载问题 |
Skills 技能管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw skills list | 列出可用技能 | 查看已安装技能 |
openclaw skills info | 显示技能详情 | 了解技能功能 |
openclaw skills check | 检查技能就绪状态 | 验证技能依赖 |
📅 十一、定时任务
Cron 定时任务
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw cron list | 列出定时任务 | 查看已配置任务 |
openclaw cron add | 添加定时任务 | 创建新任务 |
openclaw cron rm | 删除定时任务 | 移除任务 |
openclaw cron edit | 编辑定时任务 | 修改任务配置 |
openclaw cron enable | 启用定时任务 | 激活任务 |
openclaw cron disable | 禁用定时任务 | 停用任务 |
openclaw cron run | 立即运行任务 | 调试用 |
openclaw cron runs | 显示运行历史 | 查看执行记录 |
openclaw cron status | 显示调度器状态 | 检查 Cron 服务 |
🌍 十二、网络与发现
DNS 网络发现
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw dns | DNS 辅助工具 | Tailscale + CoreDNS 发现 |
Directory 目录查询
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw directory | 查找联系人/群组 ID | 获取用户/群组标识符 |
📦 十三、系统与更新
Update 更新管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw update status | 显示更新状态 | 检查版本信息 |
openclaw update wizard | 交互式更新向导 | 引导更新流程 |
openclaw update --channel beta | 切换到 beta 通道 | 测试新版本 |
openclaw update --dry-run | 预览更新操作 | 确认更新内容 |
System 系统事件
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw system event | 入队系统事件 | 触发心跳等 |
openclaw system heartbeat | 心跳控制 | 管理心跳任务 |
openclaw system presence | 列出系统存在项 | 查看在线状态 |
🎨 十四、界面与交互
Dashboard 控制面板
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw dashboard | 打开控制 UI | 浏览器访问管理界面 |
openclaw dashboard --no-open | 打印 URL 但不打开 | 获取访问链接 |
TUI 终端界面
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw tui | 打开终端 UI | 终端内的交互界面 |
QR 二维码
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw qr | 生成配对二维码 | iOS 设备配对 |
🔐 十五、安全与权限
Security 安全检查
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw security | 安全工具和本地配置审计 | 安全检查 |
Approvals 执行审批
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw approvals | 管理执行审批 | Gateway 或 Node 主机的审批管理 |
Pairing 配对管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw pairing | 安全 DM 配对 | 批准入站请求 |
Secrets 密钥管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw secrets | 密钥运行时重载控制 | 更新密钥配置 |
🛠️ 十六、开发工具
ACP Agent 控制协议
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw acp | Agent 控制协议工具 | 高级 Agent 管理 |
Browser 浏览器管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw browser click | 点击元素 | 浏览器自动化 |
openclaw browser type | 输入文本 | 表单填写 |
openclaw browser snapshot | 捕获页面快照 | 获取页面状态 |
openclaw browser screenshot | 截取屏幕截图 | 保存页面图像 |
openclaw browser navigate | 导航到 URL | 打开网页 |
openclaw browser create-profile | 创建浏览器配置 | 新建配置文件 |
openclaw browser delete-profile | 删除浏览器配置 | 清理配置文件 |
openclaw browser cookies | 读写 Cookie | 管理 Cookie |
openclaw browser console | 获取控制台消息 | 调试网页 |
openclaw browser download | 下载文件 | 保存下载内容 |
Node 节点服务
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw node | 运行无头节点服务 | 部署远程节点 |
Sandbox 沙盒管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw sandbox | 管理沙盒容器 | Agent 隔离环境 |
Hooks 钩子管理
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw hooks | 管理内部 Agent 钩子 | 自定义钩子 |
Webhooks Webhook 集成
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw webhooks | Webhook 辅助和集成 | 外部系统集成 |
📝 十七、消息管理
Message 消息操作
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw message send | 发送消息 | 推送通知 |
openclaw message | 管理消息 | 读取/管理消息 |
🎯 十八、初始化与设置
Setup 初始化
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw setup | 初始化配置和工作空间 | 首次安装后设置 |
Onboard 引导向导
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw onboard | 交互式引导向导 | 新用户引导流程 |
🔧 十九、工具命令
Completion Shell 补全
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw completion | 生成 Shell 补全脚本 | 启用命令行补全 |
1
2
3
4
5
| # 生成并启用 zsh 补全
openclaw completion zsh >> ~/.zshrc
# 生成并启用 bash 补全
openclaw completion bash >> ~/.bashrc
|
Help 帮助
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw help | 显示帮助信息 | 查看命令列表 |
openclaw <command> --help | 显示子命令帮助 | 查看具体命令用法 |
Docs 文档搜索
| 命令 | 中文说明 | 使用场景 |
|---|
openclaw docs | 搜索在线文档 | 查找文档 |
📊 命令分类速查表
| 分类 | 命令前缀 | 主要功能 |
|---|
| 🏗️ 核心服务 | gateway / daemon | 服务启停、安装卸载 |
| ⚙️ 配置 | config / configure | 配置管理 |
| 🔧 诊断 | doctor / status / health / logs | 健康检查、日志 |
| 🗑️ 卸载 | uninstall / reset | 卸载、重置 |
| 🤖 Agent | agent / agents | Agent 管理 |
| 📡 渠道 | channels | 平台连接 |
| 📱 设备 | devices / nodes | 设备配对、节点管理 |
| 🗄️ 数据 | backup / sessions / memory | 备份、会话、记忆 |
| 🌐 模型 | models | 模型配置 |
| 🔌 扩展 | plugins / skills | 插件、技能 |
| 📅 定时 | cron | 定时任务 |
| 🌍 网络 | dns / directory | 网络发现 |
| 📦 系统 | update / system | 更新、系统事件 |
| 🎨 界面 | dashboard / tui / qr | 界面交互 |
| 🔐 安全 | security / approvals / pairing / secrets | 安全权限 |
| 🛠️ 开发 | acp / browser / node / sandbox | 开发工具 |
| 📝 消息 | message | 消息管理 |
| 🎯 初始化 | setup / onboard | 初始化设置 |
| 🔧 工具 | completion / help / docs | 辅助工具 |
💡 常用命令组合
日常检查
1
2
3
| openclaw gateway status # 检查服务状态
openclaw status # 查看整体状态
openclaw health # 健康检查
|
问题诊断
1
2
3
| openclaw doctor # 自动诊断
openclaw logs --follow # 实时日志
openclaw gateway probe # 网络探测
|
配置管理
1
2
3
| openclaw config file # 查看配置文件位置
openclaw config validate # 验证配置
openclaw config get gateway.port # 获取特定配置
|
备份恢复
1
2
| openclaw backup create # 创建备份
openclaw backup verify # 验证备份
|
📞 需要帮助?
- 官方文档:https://docs.openclaw.ai
- CLI 文档:https://docs.openclaw.ai/cli
- GitHub:https://github.com/openclaw/openclaw
- Discord:https://discord.com/invite/clawd
文档版本:1.0
适用于:openclaw@2026.3.8+