OpenClaw Command Center

龙虾指令集 - 开发者与管理员快速指南

更新与安装

指令 描述
npm install -g openclaw@latest
全局安装/更新至最新正式版 推荐
npm uninstall -g openclaw
全局卸载 OpenClaw
openclaw update --tag [版本号] --yes
回滚或安装特定版本 版本控制
npm view openclaw versions --json
检查 npm 库中龙虾的可用版本
npm config set registry https://registry.npmmirror.com
设置国内镜像源以加速安装

配置与初始化

指令 描述
openclaw setup
初始化配置 + 创建工作空间
openclaw configure
进入交互式配置向导
openclaw config get [路径]
查询指定配置项的值
openclaw config set [路径] [值]
设置或修改配置项
openclaw config unset [路径]
删除指定配置项
openclaw config validate
验证当前配置是否正确
openclaw config file
显示配置文件的绝对路径

频道管理

指令 描述
openclaw channels list
列出所有已配置的频道
openclaw channels status --probe
探测并查看频道实时状态
openclaw channels add --channel [类型] --account [ID] --name [名称] --token [T]
添加新频道 (支持 Telegram, Discord 等)
openclaw channels remove --channel [类型] --account [ID] --delete
移除频道并删除相关配置
openclaw channels login / logout
执行频道登录/登出 (如 WhatsApp Web)
openclaw channels logs --lines 100
查看频道运行日志 (最近100行)

网关控制

指令 描述
openclaw gateway run
前台运行网关 (调试模式)
openclaw gateway install
将网关安装为系统服务
openclaw gateway restart
快速重启网关服务 常用
openclaw gateway status --deep
深度检查网关运行状态
openclaw gateway health
执行系统健康检查
openclaw logs --follow
实时追踪网关输出日志

维护与修复

指令 描述
npm cache clean --force
强制清理 npm 缓存,解决安装报错
taskkill /f /im node.exe
强制杀掉所有 node 进程,清理环境 危险
curl -fsSL https://openclaw.ai/install.sh | bash
重新下载并安装 OpenClaw 文件夹
openclaw plugins disable bonjour
禁用 Bonjour 插件

快捷工作流 (组合指令)

场景 指令序列
标准更新流程
openclaw gateway stop && npm cache clean --force && openclaw update && openclaw gateway health
强制修复更新
openclaw gateway stop && npm cache clean --force && npm install -g openclaw@latest && openclaw gateway health
指令已复制到剪贴板!