openclaw-wechat 是 OpenClaw 的微信渠道插件,用于将 OpenClaw AI 智能体连接到个人微信账号,实现自动收发消息、群聊交互和多账号管理。
主要能力:支持私聊与群聊;处理文本和图片消息;提供扫码登录认证;支持多微信机器人账号管理;通过 Webhook 接收消息;兼容云服务器部署。
安装与配置: openclaw plugins install @canghe/openclaw-wechat 更新:openclaw plugins update wechat 需配置 API Key、代理 URL 和 Webhook Host: openclaw config set channels.wechat.apiKey "wc_live_xxxxxxxxxxxxxxxx" openclaw config set channels.wechat.proxyUrl "http://your-proxy-server:3000" openclaw config set channels.wechat.webhookHost "your-server-ip" openclaw config set channels.wechat.enabled true 配置保存在 ~/.openclaw/openclaw.json。可选配置项包括 webhookPort(默认 18790)、webhookPath(默认 /webhook/wechat)和 deviceType(默认 "ipad",可选 "mac")。
首次登录运行 openclaw gateway start,终端显示二维码后用微信扫码认证;可用 openclaw gateway status 与 openclaw gateway logs 查看状态和日志。多账号配置在 channels.wechat.accounts 下,每个账号需使用不同 webhookPort 以避免冲突。
云部署:需开放 Webhook 端口(如 sudo ufw allow 18790/tcp),可配置 systemd 服务或使用 Docker 部署。
常见问题:收不到消息时检查 webhookHost、端口可达性与网关状态;二维码不显示时检查代理连通性与 API Key;登录过期可重启网关重新扫码;多账号端口冲突需改用不同端口。
常用命令包括 openclaw config list、gateway start/stop/restart、gateway logs、plugins uninstall wechat 等。
限制:资料未提供收费、价格与效果承诺信息;消息处理示例为概念性代码,实际 API 以官方为准。