Openclaw 附录A 命令速查表
附录A 命令速查表本附录目标提供OpenClaw常用命令的快速参考。所有命令均基于官方CLI文档https://docs.openclaw.ai/cli验证适用于v2026.3.7版本。 目录A.1 安装与初始化A.2 配置管理configA.3 Gateway与守护进程daemonA.4 状态与诊断A.5 通道管理channelsA.6 模型管理modelsA.7 Skills管理A.8 插件管理pluginsA.9 日志与会话A.10 定时任务cronA.11 消息发送messageA.12 安全与备份A.13 重置与卸载A.14 常用场景组合A.15 配置文件路径A.1 安装与初始化# 全局安装OpenClaw npm install -g openclawlatest # 首次引导向导推荐 openclaw onboard # 引导向导高级模式完整控制每个步骤 openclaw onboard --advanced # 重新运行引导向导重置配置凭据会话 openclaw onboard --reset # 交互式配置向导已安装后修改配置 openclaw configure # 查看版本 openclaw --version # 查看帮助 openclaw --help # 查看子命令帮助 openclaw config --helpA.2 配置管理config⚠️openclaw config不带子命令等同于openclaw configure打开交互式向导。config 仅支持get、set、unset、file、validate五个子命令。# 查看特定配置项 openclaw config get path openclaw config get gateway.port openclaw config get agents.defaults.workspace openclaw config get agents.list[0].id # 设置配置项值自动解析为JSON5否则视为字符串 openclaw config set path value openclaw config set gateway.port 19001 --strict-json openclaw config set agents.defaults.heartbeat.every 2h openclaw config set channels.whatsapp.groups [*] --strict-json # 删除配置项 openclaw config unset path openclaw config unset tools.web.search.apiKey # 查看配置文件路径 openclaw config file # 校验配置文件 openclaw config validate⚠️不存在的命令config list、config reset、config export、config import、config delete均不是有效子命令。查看全部配置请直接打开配置文件openclaw config file。重置配置请使用openclaw reset。A.3 Gateway与守护进程daemon⚠️ Gateway的启停通过daemon命令管理而非gateway start/stop。# 安装系统服务macOS: LaunchAgent / Linux: systemd openclaw daemon install # 启动守护进程 openclaw daemon start # 停止守护进程 openclaw daemon stop # 重启守护进程配置变更后执行 openclaw daemon restart # 查看守护进程状态 openclaw daemon status # 卸载系统服务 openclaw daemon uninstall # 查看守护进程日志 openclaw daemon logs # 直接运行Gateway前台模式适合调试 openclaw gateway # Gateway运行参数 openclaw gateway --port 18789 --verbose # 查询运行中的Gateway健康状态 openclaw gateway health # 查询Gateway详细状态 openclaw gateway status # 探测Gateway附加检查 openclaw gateway probe # 发现局域网内的GatewayBonjour/mDNS openclaw gateway discover # 调用Gateway RPC方法 openclaw gateway call method # 打开控制面板Web UI openclaw dashboardA.4 状态与诊断# 查看整体运行状态 openclaw status # 健康检查 openclaw health # 综合诊断与修复建议 openclaw doctor # 自动执行修复 openclaw doctor --yes # 非交互模式诊断 openclaw doctor --non-interactive # 深度扫描检查系统服务等 openclaw doctor --deep # 启动TUI终端界面 openclaw tui # 搜索官方文档 openclaw docs 关键词A.5 通道管理channels# 列出已配置的通道 openclaw channels list # 查看通道状态含连接健康检查 openclaw channels status # 通道状态附加探测 openclaw channels status --probe # 添加通道 openclaw channels add channel # 移除通道 openclaw channels remove channel # 通道登录 openclaw channels login channel # 通道登出 openclaw channels logout channel # 配对管理WhatsApp/Telegram DM配对 openclaw pairing list channel openclaw pairing approve channel codeA.6 模型管理models# 列出已配置的模型 openclaw models list # 查看模型状态 openclaw models status # 切换默认模型 openclaw models set model openclaw models set anthropic/claude-sonnet-4-5 # 设置图片模型 openclaw models set-image model # 添加认证API Key / OAuth / setup-token openclaw models auth add # 模型别名管理 openclaw models aliases list openclaw models aliases add alias model openclaw models aliases remove alias # 备用模型管理 openclaw models fallbacks list openclaw models fallbacks add model openclaw models fallbacks remove model openclaw models fallbacks clear # 图片模型备用 openclaw models image-fallbacks list openclaw models image-fallbacks add model openclaw models image-fallbacks remove model # 扫描可用模型 openclaw models scan # 认证优先级 openclaw models auth order get openclaw models auth order set providers...A.7 Skills管理⚠️ Skills的安装/卸载/更新通过clawhubCLI 完成而非openclaw skills命令。openclaw skills查看与检查# 列出所有Skills内置工作区托管 openclaw skills list # 仅列出符合条件可加载的Skills openclaw skills list --eligible # 查看Skills详情 openclaw skills info skill-name # 检查Skills依赖是否满足 openclaw skills checkclawhub安装/卸载/更新/搜索# 全局安装ClawHub CLI npm install -g clawhub # 搜索Skills clawhub search 关键词 clawhub search browser clawhub search --sort downloads # 安装Skills clawhub install slug clawhub install brave-search # 安装到指定目录 clawhub install slug --dir /path/to/skills # 查看Skills详情不安装 clawhub inspect slug # 列出已安装Skills clawhub list # 更新单个Skills clawhub update slug # 更新所有Skills clawhub update --all # 卸载Skills clawhub uninstall slug # 同步Skills clawhub syncA.8 插件管理plugins# 列出插件 openclaw plugins list # 查看插件详情 openclaw plugins info id # 安装插件 openclaw plugins install id # 启用插件需重启Gateway openclaw plugins enable id # 禁用插件 openclaw plugins disable id # 插件诊断 openclaw plugins doctorA.9 日志与会话# 查看日志 openclaw logs # 实时跟踪日志 openclaw logs --follow # JSON格式日志 openclaw logs --json # 纯文本日志 openclaw logs --plain # 限制日志行数 openclaw logs --limit 100 # 查看会话信息 openclaw sessionsA.10 定时任务cron# 添加一次性定时任务 openclaw cron add \ --name 发送提醒 \ --at 2026-03-15T18:00:00Z \ --session main \ --system-event 提醒提交费用报告 # 添加循环定时任务 openclaw cron add \ --name 早间状态 \ --cron 0 7 * * * \ --tz Asia/Shanghai \ --session isolated \ --message 总结今天的收件箱和日历 \ --deliver \ --channel whatsapp # 列出定时任务 openclaw cron list # 删除定时任务 openclaw cron remove job-idA.11 消息发送message# 发送消息 openclaw message send --channel channel --target target 消息内容 # 发送投票 openclaw message poll --channel discord --target channel:123 \ --poll-question 今晚吃什么 --poll-option 火锅 --poll-option 烧烤 # 其他消息操作 openclaw message react openclaw message edit openclaw message delete openclaw message pin openclaw message search # 运行单次Agent对话 openclaw agent --message 你好A.12 安全与备份# 安全审计 openclaw security audit # 深度安全审计 openclaw security audit --deep # 创建备份 openclaw backup create # 仅备份配置 openclaw backup create --only-config # 校验备份 openclaw backup verify backup-id或路径 # 列出备份 openclaw backup list # 恢复备份 openclaw backup restore 文件路径 # 管理密钥 openclaw secretsA.13 重置与卸载# 重置配置凭据会话 openclaw reset # 卸载 openclaw uninstall # 全自动卸载 openclaw uninstall --all --yes --non-interactive # 模拟卸载仅显示结果 openclaw uninstall --dry-run # 软件更新 openclaw update # 查看更新状态 openclaw update status # 更新到指定版本 openclaw update --tag 版本号 # 更新到指定通道 openclaw update --channel stable openclaw update --channel betaA.14 常用场景组合场景1初次安装后的配置# 1. 运行引导向导 openclaw onboard # 2. 安装守护进程 openclaw daemon install # 3. 启动 openclaw daemon start # 4. 打开控制面板 openclaw dashboard场景2切换模型# 1. 查看可用模型 openclaw models list # 2. 切换模型 openclaw models set anthropic/claude-sonnet-4-5 # 3. 重启守护进程 openclaw daemon restart场景3安装新Skills# 1. 搜索Skills clawhub search 截图 # 2. 安装Skills clawhub install peekaboo # 3. 确认已安装 openclaw skills list # 4. 重启守护进程 openclaw daemon restart场景4故障排查# 1. 查看运行状态 openclaw status # 2. 综合诊断 openclaw doctor # 3. 查看日志 openclaw logs --follow # 4. Gateway健康检查 openclaw gateway health # 5. 安全审计 openclaw security auditA.15 配置文件路径# 查看配置文件路径 openclaw config file # 主配置文件默认位置 ~/.openclaw/openclaw.json # Skills目录工作区级 workspace/skills/ # Skills目录全局级 ~/.openclaw/skills/ # 人设文件 ~/clawd/SOUL.md ~/clawd/USER.md ~/clawd/AGENTS.md # 记忆目录 ~/clawd/memory/ 相关资源OpenClaw CLI完整参考https://docs.openclaw.ai/cliClawHub CLI文档https://docs.openclaw.ai/tools/clawhub配置参考https://docs.openclaw.ai/gateway/configuration提示本速查表基于v2026.3.7版本验证。命令可能随版本更新而变化遇到报错请先运行openclaw update更新到最新版本或查阅官方文档。
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2413983.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!