命令速查表类别命令说明启动openclaw gateway启动 Gateway停止CtrlC停止 Gateway重启openclaw gateway restart重启 Gateway状态openclaw gateway status查看 Gateway 状态健康检查openclaw gateway health健康检查安装openclaw update更新 OpenClaw配置openclaw config set path value设置配置验证openclaw config validate验证配置插件openclaw plugins install xxx安装插件频道openclaw channels add --channel xxx添加频道日志openclaw channels logs --channel all查看日志诊断openclaw doctor运行诊断成本openclaw gateway usage-cost查看使用成本 核心操作命令1.Gateway 启动/运行# 启动 Gateway本地模式openclaw gateway# 启动 Gateway显式形式openclaw gateway run# 启动 Gateway开发模式不强制配置openclaw gateway run --allow-unconfigured --dev# 启动 Gateway 并指定端口openclaw gateway --port 18789# 启动 Gateway 并绑定到局域网openclaw gateway --bind lan# 启动 Gateway 并使用 Tailscaleopenclaw gateway --tailscale serve2.Gateway 暂停/停止/重启# 重启 Gateway安全模式等待任务完成openclaw gateway restart# 重启 Gateway强制立即重启openclaw gateway restart --force# 重启 Gateway等待指定时间openclaw gateway restart --wait 30s# 重启 Gateway跳过延迟openclaw gateway restart --safe --skip-deferral# 停止 Gateway需要手动停止进程# Windows: CtrlC 或关闭终端# macOS/Linux: CtrlC3.Gateway 状态查询# 查看Gateway服务状态openclaw gateway status# 查看Gateway服务状态JSON格式openclaw gateway status --json# 查看Gateway服务状态深度扫描openclaw gateway status --deep# 查看Gateway服务状态需要RPC权限openclaw gateway status --require-rpc# 健康检查存活检查openclaw gateway health# 健康检查就绪检查openclaw gateway health --port 18789# 探测所有目标openclaw gateway probe# 探测所有目标JSON格式openclaw gateway probe --json 安装与更新4.安装 OpenClaw# macOS / Linuxcurl -fsSL https://openclaw.ai/install.sh | bash# Windows (PowerShell)iwr -useb https://openclaw.ai/install.ps1 | iex# 检查版本openclaw --version# 更新 OpenClawopenclaw update5.首次配置# 运行引导配置推荐openclaw onboard --install-daemon# 快速启动跳过引导openclaw gateway# 打开控制面板openclaw dashboard# 手动配置openclaw configure⚙️ 配置管理6.Config 基础操作# 查看配置文件路径openclaw config file# 查看配置openclaw config get path# 设置配置openclaw config set path value# 批量设置配置openclaw config set --batch-json [...]# 删除配置openclaw config unset path# 查看配置模式openclaw config schema# 验证配置openclaw config validate# 查看配置JSON格式openclaw config get path --json# 应用补丁文件openclaw config patch --file ./openclaw.patch.json5# 模拟运行补丁不实际写入openclaw config patch --file ./openclaw.patch.json5 --dry-run 插件管理7.Plugin 操作# 安装插件openclaw plugins install openclaw/feishuopenclaw plugins install openclaw/qqbotopenclaw plugins install tencent-weixin/openclaw-weixin# 列出已安装插件openclaw plugins list# 启用插件openclaw config set plugins.entries.plugin-name.enabled true# 禁用插件openclaw config set plugins.entries.plugin-name.enabled false 频道管理8.Channel 操作# 列出所有频道openclaw channels list# 列出所有频道包括未安装的openclaw channels list --all# 查看频道状态openclaw channels status# 查看频道状态探针模式openclaw channels status --probe# 查看频道能力openclaw channels capabilities# 添加频道openclaw channels add --channel telegram --token 123:abcopenclaw channels add --channel qqbot --token ***# 删除频道openclaw channels remove --channel telegram --delete# 登录频道扫码openclaw channels login --channel openclaw-weixinopenclaw channels login --channel whatsapp# 登出频道openclaw channels logout --channel whatsapp# 查看频道日志openclaw channels logs --channel allopenclaw channels logs --channel discord --lines 100# 解析名称到IDopenclaw channels resolve --channel slack #general janeopenclaw channels resolve --channel discord My Server/#support someone Agent 管理9.Agent 操作# 添加新 Agentopenclaw agents add name# 添加新 Agent非交互模式openclaw agents add name --model model-id --workspace path# 列出所有 Agentopenclaw agents list# 绑定 Agent 到频道openclaw agents bind agent-id --channel channel --peer peer# 解绑 Agentopenclaw agents unbind agent-id --channel channel 诊断与维护10.诊断命令# 运行诊断openclaw doctor# 运行诊断并修复问题openclaw doctor --fix# 导出诊断报告openclaw gateway diagnostics export# 导出诊断报告指定输出路径openclaw gateway diagnostics export --output openclaw-diagnostics.zip# 导出诊断报告JSON格式openclaw gateway diagnostics export --json# 查看使用成本openclaw gateway usage-cost# 查看最近7天的使用成本openclaw gateway usage-cost --days 7# 查看所有 Agent 的使用成本openclaw gateway usage-cost --all-agents# 查看稳定性记录openclaw gateway stability# 查看稳定性记录指定类型openclaw gateway stability --type payload.large# 导出稳定性记录openclaw gateway stability --bundle latest --export 状态查询11.状态查询# 查看整体状态openclaw status# 查看整体状态深度扫描openclaw status --deep# 查看会话信息openclaw session_status# 查看会话信息JSON格式openclaw session_status --json# 查看会话历史openclaw sessions_history --sessionKey key# 列出所有会话openclaw sessions_list 其他常用命令12.其他操作# 迁移数据openclaw migrate --from hermes --source ~/.hermes# 打开聊天界面openclaw chat# 修复配置openclaw doctor --fix# 查看帮助openclaw --helpopenclaw gateway --helpopenclaw channels --helpopenclaw config --help这些就是 OpenClaw 的所有核心操作命令了如果你想深入了解某个命令的详细参数可以运行openclaw command --help比如openclaw gateway --help- 查看 Gateway 命令的所有选项openclaw channels add --help- 查看 Channels 添加命令的详细参数