
openclaw dashboard# 单条提问(非交互式) openclaw agent --agent main --message "用Python写一个快速排序" # 查看当前使用的模型 openclaw models status # 切换模型 openclaw models set moonshot/kimi-k2.5 # 使用本地模式 openclaw agent --agent main --message "你好" --local# 查看配对码 openclaw pairing list # 批准配对 openclaw pairing approve telegram # 之后直接在Telegram里@机器人说话即可# 安装飞书插件 openclaw plugins install @m1heng-clawd/feishu # 或使用新版 openclaw plugins install feishu-openclawopenclaw config set channels.feishu.appId "cli_你的AppID" openclaw config set channels.feishu.appSecret "你的AppSecret" openclaw config set channels.feishu.enabled true openclaw config set channels.feishu.connectionMode websocket# 启动Gateway openclaw gateway start # 查看日志确认连接成功 tail -f ~/.openclaw/logs/gateway.log | grep feishu平台 | 国内可用性 | 说明 |
飞书 (Feishu) | ⭐⭐⭐⭐⭐ | 最推荐,服务器在国内,连接稳定 |
钉钉 (DingTalk) | ⭐⭐⭐⭐ | 可通过Webhook或插件接入 |
企业微信 (WeCom) | ⭐⭐⭐ | 支持,但配置较复杂 |
Telegram | ⭐⭐ | 需要特殊网络环境,功能最全 |
Discord | ⭐ | 国内访问困难 |
网页版 | ⭐⭐⭐⭐⭐ | 无需任何聊天软件 |
终端 | ⭐⭐⭐⭐⭐ | 直接命令行交互 |
# 让AI读取文件并分析 openclaw agent --agent main --message "请分析 ~/Documents/report.txt 的内容" # 让AI帮你写代码并保存 openclaw agent --agent main --message "写一个 Docker Compose 文件并保存到 ~/docker-compose.yml"# 查看Gateway实时日志 tail -f ~/.openclaw/logs/gateway.log # 检查配置是否正确 openclaw doctor # 自动修复配置问题 openclaw doctor --fix# 临时切换API Key(不修改配置文件) export MOONSHOT_API_KEY="sk-新的key" openclaw gateway restart# 解释报错 openclaw agent --agent main --message "解释这个错误:Traceback: FileNotFoundError..." # 重构代码 openclaw agent --agent main --message "帮我把这个函数重构得更Pythonic:[粘贴代码]"# 总结PDF openclaw agent --agent main --message "总结 ~/Downloads/paper.pdf 的要点" # 批量重命名建议 openclaw agent --agent main --message "我有一堆照片 IMG_001.jpg 到 IMG_100.jpg,帮我写个脚本按日期重命名"# 创建定时任务 openclaw agent --agent main --message "每天早上9点检查邮件并总结发给我"命令 | 用途 |
openclaw models status | 查看当前模型配置 |
openclaw models set moonshot/kimi-k2.5 | 设置默认模型 |
openclaw gateway install | 安装Gateway服务 |
openclaw gateway start/stop/restart | 控制Gateway |
openclaw gateway status | 查看Gateway状态 |
openclaw agent --agent main --message "内容" | 发送消息 |
openclaw dashboard | 打开Web界面 |
openclaw auth list | 查看认证配置 |
openclaw health --deep | 深度健康检查 |
openclaw doctor | 诊断配置问题 |
问题 | 解决方法 |
“未建立长连接”提示 | 确保OpenClaw Gateway已启动 |
发消息没反应 | 检查权限是否全部申请并开通 |
401错误 | App ID或App Secret填错了,重新复制 |
群聊@机器人没反应 | 确认添加了im:message.group_at_msg:readonly权限 |
概念 | 说明 |
Gateway | 后台服务,管理所有连接和状态,必须保持运行 |
Agent | AI代理,相当于一个工作助手,main是默认代理 |
Session | 对话会话,每次对话有唯一ID,可以恢复历史 |
Provider | AI服务提供商(如Moonshot、OpenAI) |
Skills | 代理的能力(文件操作、代码执行、网络请求等) |