新教育
105.83M · 2026-03-23
开始之前,确保你满足以下条件:
openclaw 命令在 PATH 中)sk-... 格式)kimi-claw 插件包含一个原生 Node.js 模块(node-pty),需要编译。先安装构建工具:
sudo apt-get install -y build-essential
这会安装 gcc、g++、make 等必要工具。
常见错误:
npm build error: not found: make
解决方案:运行上面的 apt-get 命令安装构建工具。
运行官方安装脚本,传入你的 bot token:
bash <(curl -fsSL ) --bot-token <YOUR_BOT_TOKEN>
将 <YOUR_BOT_TOKEN> 替换为你的 token(如 sk-XXXXXXXXXXXX)。
安装脚本会执行:
~/.openclaw/extensions/kimi-clawnpm install 编译原生依赖~/.openclaw/openclaw.json成功输出示例:
[install-oss] downloading package
[install-oss] staging main plugin
[install-oss] installing dependencies in staging dir
[install-oss] registering plugin
[install-oss] plugin config updated
[install-oss] prompt timeout set to 1800000ms
[install-oss] main plugin installed successfully
[install-oss] restarting gateway
[install-oss] done
安装完成后,kimi-claw 插件会注册为本地 gateway 的一个设备并等待批准。如果跳过这步,插件会反复报错 handshake rejected: pairing required。
检查待批准的配对请求:
openclaw devices list
你应该看到一个名为 kimi-bridge-connector 的 Pending 条目:
Pending (1)
┌──────────────────────────────────────┬────────────────────────────┬──────────┐
│ Request │ Device │ Role │
├──────────────────────────────────────┼────────────────────────────┼──────────┤
│ c9fb9b18-0dad-498e-b530-1caba20d8156 │ kimi-bridge-connector │ operator │
└──────────────────────────────────────┴────────────────────────────┴──────────┘
使用请求 ID 批准:
openclaw devices approve c9fb9b18-0dad-498e-b530-1caba20d8156
批准配对后,重启 gateway 让插件用新 token 重新连接:
openclaw gateway restart
验证连接日志:
tail -30 /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep kimi-bridge
你应该看到:
[kimi-bridge] [gateway] handshake complete
[kimi-bridge] local gateway connected url=ws://127.0.0.1:18789 (acp adapter mode)
[kimi-bridge] [bridge-acp] connected
[kimi-bridge] bridge ACP connected url=wss://www.kimi.com/api-claw/bots/agent-ws
成功标志:消息从你的本地网关处理,而不是 Kimi 云端。
| 路径 | 说明 |
|---|---|
~/.openclaw/extensions/kimi-claw/ | 插件安装目录 |
~/.openclaw/openclaw.json | OpenClaw 配置(token 存储在此) |
~/.kimi/kimi-claw/kimi-claw-config.json | 本地同步配置(如有) |
~/.kimi/kimi-claw/log/ | 安装失败日志 |
/tmp/openclaw/openclaw-<date>.log | 实时 gateway 日志 |
原因:设备 token 在 gateway 启动前未批准。
解决方案:
openclaw devices list # 找到 pending 请求 ID
openclaw devices approve <REQUEST_ID>
openclaw gateway restart
not found: make原因:缺少构建工具。
解决方案:
sudo apt-get install -y build-essential
然后重新运行安装脚本。
tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep kimi-bridge
安装脚本是幂等的——重新运行会覆盖安装插件,同时保留现有配置:
bash <(curl -fsSL ) --bot-token <YOUR_BOT_TOKEN>
| 命令 | 说明 |
|---|---|
openclaw gateway status | 检查 gateway 运行状态 |
openclaw gateway restart | 重启 gateway 服务 |
openclaw plugins list | 列出所有插件及状态 |
openclaw devices list | 列出已配对和待批准的设备 |
openclaw devices approve <id> | 批准待批准的配对请求 |
openclaw devices remove <id> | 移除已配对设备 |
~/.openclaw/openclaw.json 包含敏感 token,确保文件权限为 600/tmp/openclaw/openclaw-*.log 查看异常连接openclaw gateway status 监控内存和 CPU 使用~/.openclaw/openclaw.json~/.openclaw/extensions/kimi-claw/ 到安全位置配置完成后,你可以:
clawhub search)openclaw cron add)版本信息:
参考资料:
遇到问题?在评论区留言,我会尽快回复!