💡 建议收藏: 收藏本文,OpenClaw 常用命令一查就有!建议在电脑端打开或复制到笔记软件中使用。
🛠️ 一、飞书渠道配置
1. 快速配置(推荐方式)
openclaw channels add# 选择 Feishu,按向导输入 App ID 和 App Secret
2. 命令行直接配置
openclaw channels add --channel feishu --account main --app-id您的_APP_ID --app-secret您的_APP_SECRET# 请将 您的_APP_ID 和 您的_APP_SECRET 替换为您在飞书开放平台获取的实际值。
3. 查看状态与日志
openclaw channels status#查看所有频道的状态openclaw gateway status# 查看网关服务的状态openclaw logs --follow# 实时查看系统日志(按 Ctrl+C 退出)4. 用户配对批准
openclaw pairing list feishu# 查看待批准的配对请求openclaw pairing approve feishu <CODE># 批准配对,将 <CODE> 替换为请求中的代码
🤖 二、自定义模型 API 配置
1. 查看模型信息
openclaw models status# 查看当前设置的主模型和图片模型状态openclaw models list# 列出已配置且可用的模型openclaw models list --all# 列出所有支持的模型(包括未配置的)
2. 设置默认模型
# 设置对话主模型openclaw models set <提供商/模型ID># 示例:openclaw models set anthropic/claude-3-sonnet-20240229# 设置生成图片的模型openclaw models set-image <提供商/模型ID># 示例:openclaw models set-image openai/dall-e-3
3. 使用模型别名
# 添加别名openclaw models aliases add <别名> <提供商/模型ID># 示例:openclaw models aliases add sonnet anthropic/claude-3-sonnet-20240229# 查看所有别名openclaw models aliases list# 删除别名openclaw models aliases remove <别名>
4. 配置备用模型 (Fallbacks)
openclaw models fallbacks add <提供商/模型ID># 添加备用模型openclaw models fallbacks list# 查看备用模型列表openclaw models fallbacks remove <提供商/模型ID># 移除特定备用模型openclaw models fallbacks clear# 清空所有备用模型
5. 扫描并自动设置默认模型 (OpenRouter)
openclaw models scan# 扫描 OpenRouter 上的可用模型openclaw models scan --set-default --yes# 扫描并自动选择一个可用的模型设置为默认(无需确认)
🌐 三、Gateway 管理
openclaw gateway start# 在前台启动网关(关闭终端将停止服务)openclaw gateway stop# 停止后台运行的网关服务openclaw gateway restart# 重启网关服务openclaw gateway status# 查看网关运行状态openclaw gateway install# 将 OpenClaw 安装为系统服务(实现开机自启)openclaw gateway uninstall# 卸载 OpenClaw 系统服务
🩺 四、诊断与修复
openclaw status# 查看系统整体状态简报openclaw status --deep# 进行更深入的系统状态检查openclaw doctor# 诊断当前环境和配置问题openclaw doctor --fix# 诊断并尝试自动修复问题openclaw doctor --yes# 自动修复所有问题(非交互模式,慎用)openclaw doctor --deep# 执行深度诊断扫描openclaw logs --follow# 实时查看日志(排查问题的利器)
💬 五、聊天中切换模型
/model# 显示模型选择器界面,可交互选择/model list# 在聊天中列出可用的模型别名或名称/model <数字># 选择列表中的第 N 个模型(如 /model 3)/model <提供商/模型ID># 直接指定使用某个模型(如 /model anthropic/claude-3-opus-20240229)/model <别名># 使用设置好的别名(如 /model sonnet)/model status# 查看当前对话正在使用的模型
🧩 六、Skill (技能/插件) 管理
clawhub search <关键词># 在 ClawHub 搜索技能(需要先配置 ClawHub)clawhub install <技能名># 安装指定的技能clawhub list# 列出已安装的技能clawhub update <技能名># 更新指定的技能openclaw skills list# 列出在 OpenClaw 中可用的技能openclaw skills info <技能名># 查看特定技能的详细信息
⚙️ 七、配置管理
openclaw config file# 显示配置文件的绝对路径openclaw config get <路径># 读取特定的配置项(如 openclaw config get models.default)openclaw config set <路径> <值> # 设置特定配置项的值(慎用,建议使用专门的 add/set 命令)openclaw config unset <路径># 删除特定的配置项openclaw config validate# 验证配置文件语法是否正确
👥 八、Agent 管理
openclaw agents list# 列出所有已定义的 Agentopenclaw agents add <名称># 创建一个新的 Agentopenclaw agents bind --agent <ID> --bind <频道ID># 将 Agent 绑定到特定频道openclaw agents bindings# 查看所有 Agent 与频道的绑定关系
⏰ 九、Cron 定时任务
openclaw cron list# 列出所有定时任务openclaw cron add --name "提醒任务" --every 1d --message "记得每天站会!"# 添加每天执行的任务openclaw cron rm <任务ID> # 删除指定的定时任务openclaw cron enable <任务ID># 启用指定的定时任务openclaw cron disable <任务ID># 禁用指定的定时任务
🖥️ 十、Node 节点管理
openclaw nodes list# 列出所有已配对的 Node 节点openclaw nodes status# 查看所有节点的状态openclaw nodes camera snap# 远程触发节点的摄像头拍照(需节点支持且授权)openclaw nodes screen record# 远程触发节点的屏幕录制(需节点支持且授权)
项目主页:
https://github.com/openclaw/openclaw
文档站点:
https://docs.openclaw.ai
夜雨聆风