OpenClaw Docs CN

附录资源 / 常用命令手册

快捷命令合集

这页是“实操时随手查”的版本。你不需要一次背完所有命令,只要按场景找到对应区块,复制执行即可。

使用建议

先执行只读命令(doctor / status / logs),确认问题后再执行会改变状态的命令(restart / update / reset)。

1. 首次安装与初始化

# 官方安装脚本(以官方文档为准)
curl -fsSL https://get.openclaw.ai | bash

# 首次引导
openclaw onboard

# 安装后快速检查
openclaw doctor
openclaw version

2. 日常运行(最常用)

# 打开控制台
openclaw dashboard

# 服务状态
openclaw status
openclaw status --deep
openclaw gateway status

# 常见重启操作
openclaw restart
openclaw gateway restart

3. 渠道接入与检查

# 添加渠道(飞书/钉钉/Telegram/Discord 等)
openclaw channels add

# 查看已接入渠道
openclaw channels list
openclaw channels status --probe

# 渠道配对(按页面提示替换参数)
openclaw pairing approve <channel> <code>

4. Skills 与 ClawHub

# 搜索技能
clawhub search keyword

# 安装 / 更新 / 发布
clawhub install skill-name
clawhub update
clawhub publish

5. 备份、升级、回滚前动作

# 升级前先备份
openclaw backup create --verify

# 执行升级
openclaw update

# 升级后验收
openclaw doctor
openclaw status --deep
openclaw channels status --probe

6. 排障三连(先看再动)

# 1) 健康检查
openclaw doctor

# 2) 服务与网关状态
openclaw status
openclaw gateway status

# 3) 实时日志
openclaw logs --follow

7. 重置 / 卸载(谨慎)

# 重置环境(会影响现有配置)
openclaw reset

# 卸载
openclaw uninstall
高风险提醒

resetuninstall、覆盖式升级前,务必先做备份并确认备份可恢复。

延伸阅读:常用命令速查表升级 / 重装 / 卸载官方 CLI Reference