OpenClaw 常用命令速查
OpenClaw 常用命令速查笔记:从入门到高效排错
初次接触 OpenClaw,最容易遇到的困扰往往不是“能不能用”,而是“命令太多,该从哪儿下手”。别担心,这篇文章为你梳理了一份聚焦日常高频场景的速查笔记。我们不绕弯子,直接按使用场景分类,把那些真正实用、能解决实际问题的命令放在你手边。
一、初始化
万事开头难,搞定初始化就成功了一半。这几个命令帮你打好基础。
openclaw onboard
# 启动初始化向导(首次安装必用)
openclaw onboard --install-daemon
# 初始化 + 安装为系统服务(开机自启)
openclaw configure
# 重新进入配置(修改 API Key / 模型等)
二、排错诊断
遇到问题别慌张,这套“诊断组合拳”是你的第一道防线。
openclaw doctor
# 健康检查(出问题优先执行)
openclaw doctor --fix
# 自动修复常见问题
openclaw status
# 查看运行状态(网关 / 端口)
openclaw status --deep
# 深度检测(网络 / 连接)
openclaw logs
# 查看运行日志(排错核心)
三、基础操作
这些是日常使用频率最高的命令,就像工具箱里的螺丝刀和锤子,得心应手。
openclaw --version
# 查看当前版本
openclaw --help
# 查看所有命令帮助
openclaw tui
# 启动终端图形界面(推荐)
openclaw dashboard
# 打开 Web 控制台
openclaw restart
# 重启服务(改配置后执行)
openclaw stop
# 停止服务
openclaw update
# 更新到最新版本
四、模型管理
大模型是核心生产力,管好模型才能让 OpenClaw 发挥最大效能。
openclaw models list
# 查看已配置模型列表
openclaw models set <模型名>
# 设置默认模型
openclaw models fallbacks add <模型名>
# 设置其他备用模型
openclaw models auth login --provider <提供商>
# OAuth 登录模型(如 GPT / Claude)
openclaw models auth paste-token --provider <提供商>
# 手动输入 API Key 认证
五、网关管理
网关是通信的枢纽,它的状态直接决定了服务是否可用。
openclaw gateway
# 启动网关服务
openclaw gateway --port 18789
# 指定端口启动网关
openclaw gateway --verbose
# 输出详细日志(调试用)
openclaw gateway restart
# 重启网关
openclaw gateway --token
# 带认证启动网关
六、Channel 通道管理
想让 AI 助手在 Telegram、飞书上为你服务?通道管理命令是关键。
openclaw channels status
# 查看所有通道状态
openclaw channels list
# 查看已配置通道
openclaw channels add
# 交互式添加通道
openclaw channels add --channel telegram --token
# 添加 Telegram 通道
openclaw channels add --channel feishu
# 添加飞书通道
openclaw channels remove --channel <名称>
# 删除指定通道
openclaw channels logs
# 查看通道日志
openclaw channels login
# 登录通道(如扫码)
openclaw channels logout
# 登出通道
七、插件管理
插件能极大扩展功能边界,用好它们,让你的 OpenClaw 更强大。
openclaw plugins list
# 查看插件列表
openclaw plugins enable <插件名>
# 启用插件
openclaw plugins disable <插件名>
# 禁用插件
openclaw plugins install <插件名>
# 安装插件
openclaw plugins doctor
# 检查插件问题
最常用组合
最后,分享几个经过验证的高效命令组合,能覆盖绝大多数使用场景:
openclaw onboard # 初始化
openclaw doctor # 检查问题
openclaw logs # 看错误
openclaw tui # 交互界面
openclaw restart # 重启服务
希望这份按场景梳理的速查笔记,能帮你更快地上手 OpenClaw,把时间花在创造上,而不是记忆命令上。
