🦞 OpenClaw 实战命令速查表
大家好,我是若风。
这份速查表不是从文档复制的,而是直接从我过去的 zsh history 中提取的真实使用记录。
我统计了最近配置 「OpenClaw」 + 「飞书」 过程中每个子命令的使用次数,按频率排序。高频命令就是最常用的命令。
命令使用频率统计
46 次 - openclaw gateway
33 次 - openclaw config
27 次 - openclaw node
22 次 - openclaw tui
13 次 - openclaw pairing
12 次 - openclaw dashboard
10 次 - openclaw devices
9 次 - openclaw onboard
8 次 - openclaw status
8 次 - openclaw plugins
8 次 - openclaw channels
6 次 - openclaw models
6 次 - openclaw doctor
5 次 - openclaw logs
一、网关管理(46 次 - 最常用)
网关是 OpenClaw 的核心,几乎所有操作都离不开它。
启动网关(详细日志)
openclaw gateway --verbose
重启网关(配置修改后必须执行)
openclaw gateway restart
启动/停止网关
openclaw gateway start
openclaw gateway stop
使用场景:
- 每次修改配置后必须重启
- 网关异常时重启排查
- 启动时加
--verbose查看详细日志
二、配置管理(33 次)
配置是日常操作最多的部分。
查看配置
openclaw config get channels.feishu.appId
openclaw config get channels.feishu.appSecret
openclaw config get gateway.bind
设置配置
# 飞书配置(真实使用记录)
openclaw config set channels.feishu.appId "cli_xxx"
openclaw config set channels.feishu.appSecret "xxx"
openclaw config set channels.feishu.enabled true
# UI 主题配置
openclaw config set ui.theme dark
配置文件位置:
~/.openclaw/openclaw.json
真实场景: 每次接入新渠道或更换 API Key 都要用 config 命令。
三、节点/设备管理(27 次)
管理移动设备和远程节点。
查看设备列表
openclaw devices list
openclaw node list
批准设备配对
openclaw pairing approve <设备代码>
设备目录
~/.openclaw/extensions
四、TUI 终端界面(22 次)
日常对话主要入口。
启动 TUI
openclaw tui
使用频率: 22 次,说明大部分对话是在 TUI 中进行的。
五、配对管理(13 次)
主要用于飞书等渠道的用户配对。
批准配对
openclaw pairing approve feishu <配对码>
场景: 飞书新用户添加 OpenClaw 机器人时的配对流程。
六、Dashboard(12 次)
Web 控制台入口。
打开控制台
openclaw dashboard
访问地址: http://127.0.0.1:18789/
七、设备管理(10 次)
openclaw devices list
openclaw devices approve
openclaw devices revoke
八、初始化配置(9 次)
快速开始
openclaw onboard --flow quickstart
标准初始化
openclaw onboard
场景: 首次安装或重新配置时使用。
九、状态查看(8 次)
整体状态
openclaw status
诊断检查
openclaw doctor
场景: 排查问题时首先用这两个命令诊断。
十、插件管理(8 次)
安装飞书插件(真实记录)
openclaw plugins install @m1heng-clawd/feishu
查看插件
openclaw plugins list
十一、渠道管理(8 次)
查看渠道状态
openclaw channels list
查看渠道能力
openclaw channels capabilities
添加渠道
openclaw channels add --channel feishu
登录渠道
openclaw channels login
十二、模型管理(6 次)
openclaw models list
openclaw models set <模型>
openclaw models fallbacks add <模型>
十三、日志查看(5 次)
openclaw logs
openclaw gateway logs
十四、其他实用命令
检查版本
openclaw -v
openclaw --version
帮助信息
openclaw -help
openclaw --help
安全审计
openclaw security audit
安装
curl -fsSL https://openclaw.ai/install.sh | bash
npm i -g openclaw
我的常用工作流
工作流 1:首次安装配置
# 1. 安装
curl -fsSL https://openclaw.ai/install.sh | bash
# 2. 初始化
openclaw onboard --flow quickstart
# 3. 启动网关
openclaw gateway --verbose
工作流 2:配置飞书接入
# 1. 安装飞书插件
openclaw plugins install @m1heng-clawd/feishu
# 2. 配置飞书凭证
openclaw config set channels.feishu.appId "你的App ID"
openclaw config set channels.feishu.appSecret "你的App Secret"
openclaw config set channels.feishu.enabled true
# 3. 重启网关(重要!)
openclaw gateway restart
# 4. 检查状态
openclaw status
工作流 3:日常使用
# 启动 TUI 对话
openclaw tui
# 或打开 Web 控制台
# 默认地址:http://127.0.0.1:18789/
openclaw dashboard
工作流 4:排查问题
# 1. 查看状态
openclaw status
# 2. 运行诊断
openclaw doctor
# 3. 查看日志
openclaw gateway --verbose
# 4. 安全检查
openclaw security audit
工作流 5:重置/重新安装
# 删除配置重新开始
rm -rf ~/.openclaw
# 重新安装
npm i -g openclaw
openclaw onboard
配置文件位置速查
~/.openclaw/ # 主配置目录
├── openclaw.json # 主配置文件
├── credentials/ # 凭证存储
├── extensions/ # 插件目录
├── workspace/ # 工作区
└── OPENCLAW_COMMANDS.md # 命令参考
实用小技巧
-
配置后必重启:任何 config 修改后都要
openclaw gateway restart -
权限设置:凭证目录需要正确权限
chmod 700 ~/.openclaw/credentials -
直接编辑配置:有时候直接用编辑器改 JSON 更方便
code ~/.openclaw/openclaw.json -
查看安装位置
where openclaw -
检查 zsh 配置
grep "openclaw" ~/.zshrc
基于真实数据的结论
从我个人的使用记录来看:
- gateway 操作最多(46次):说明网关稳定性很重要,经常需要重启
- config 操作很多(33次):配置调整是日常操作
- tui 使用频繁(22次):TUI 是主要对话入口
- 飞书插件使用很多:plugins install feishu 出现多次
这说明日常使用主要是:
- 启动和重启网关
- 调整配置
- 使用 TUI 对话
- 配置飞书渠道
希望这份基于真实使用记录的速查表对你有帮助!
- 统计来源: 我的
~/.zsh_history文件- 统计时间: 基于 2026 年的实际使用记录
评论互动