New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

openclawwechat

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openclawwechat

OpenClawWeChat - OpenClaw WeChat MiniProgram channel plugin

latest
Source
npmnpm
Version
1.3.2
Version published
Weekly downloads
463
-3.74%
Maintainers
1
Weekly downloads
 
Created
Source

OpenClawWeChat

Version Downloads License OpenClaw

概述

OpenClawWeChat 是一个 OpenClaw channel 插件,用于将 OpenClaw 与 ClawChat 微信小程序连接起来,实现通过微信小程序与 OpenClaw 进行个人对话和群聊交互。

当前版本已完成新版 OpenClaw 插件系统对齐,支持以下能力:

  • 文本消息收发
  • 图片 / 文档 / 语音消息发送
  • 群消息链路
  • 多账户独立轮询

兼容要求

  • OpenClaw 宿主版本>=2026.3.24
  • 运行前提:OpenClaw Gateway 已安装并运行

获取 ClawChat API Key

  • 打开微信小程序 ClawChat
  • 进入"我的"页面 → Bot 管理
  • 复制目标 Bot 的 API Key(格式:bot_id:secret

安装

npm 安装(推荐)

# npm 安装(推荐)
openclaw plugins install openclawwechat

github 安装

# 本地安装(开发 / 调试)
cd ~/.openclaw/extensions
git clone https://github.com/hillghost86/OpenClawWeChat.git openclawwechat

配置

安装完成后,需要配置 ClawChat API Key 才能使用。API Key 从微信小程序 ClawChat → 我的 → Bot 管理中获取,格式为 bot_id:secret

方式 1:OpenClaw 配置向导(推荐)

openclaw configure --section channels

在通道列表中选择 OpenClawWeChat(微信小程序 ClawChat),按提示依次填写:

  • ClawChat API Key — 格式 bot_id:secret,从微信小程序 ClawChat 获取
  • 默认轮询间隔 — 单位毫秒,默认 5000,通常无需修改
  • 调试日志 — 是否开启详细日志,默认关闭
  • default.sessionKey — 可留空,默认 agent:main:main

完成后选择 Finished 即可,向导会自动写入所有配置。

当前向导仅支持 default 账户的初始化。多账户管理请使用方式 2。

方式 2:CLI 配置工具 (推荐)

适用于多账户管理、旧配置迁移、或向导不可用的场景:

macOS / Linux

cd ~/.openclaw/extensions/openclawwechat
npm run config-init

Windows(CMD)

cd %USERPROFILE%\.openclaw\extensions\openclawwechat
npm run config-init

Windows(PowerShell)

cd "$env:USERPROFILE\.openclaw\extensions\openclawwechat"
npm run config-init

支持:

  • 初始化/更新 ApiKey — 配置或修改默认账户
  • 新增 ApiKey — 添加额外账户(多 Bot 场景)
  • 删除 ApiKey — 移除指定账户

方式 3:手动编辑配置文件 (备用)

编辑 ~/.openclaw/openclaw.json(Windows: %USERPROFILE%\.openclaw\openclaw.json),最小配置:

{
  "plugins": {
    "entries": {
      "openclawwechat": {
        "enabled": true,
        "config": {
          "accounts": {
            "default": {
              "apiKey": "YOUR_BOT_ID:YOUR_SECRET_KEY"
            }
          }
        }
      }
    }
  },
  "channels": {
    "openclawwechat": { "mode": "polling" }
  }
}

完整配置项、多账户示例及字段说明参见 CONFIG.md

启动与验证

配置完成后重启 gateway:

openclaw gateway restart

验证步骤

# 1. 校验配置
openclaw config validate

# 2. 查看插件状态(预期:openclawwechat 为 loaded)
openclaw plugins list

# 3. 查看运行状态(预期:OpenClawWeChat 为 ON / OK)
openclaw status --deep

# 4. 查看日志
openclaw logs --follow

正常日志示例:

Starting WeChat MiniProgram polling service
Polling response: ok=true, result.length=0

小程序侧验证

在 ClawChat 小程序中检查:

  • Bot 是否在线(链接状态为绿色)
  • 发送文本消息,确认能正常收到回复

升级

# 自动升级
openclaw plugins update openclawwechat
openclaw gateway restart

卸载

使用插件卸载脚本

cd ~/.openclaw/extensions/openclawwechat
npm run uninstall

手动卸载

  • 删除插件目录:
rm -rf ~/.openclaw/extensions/openclawwechat
  • 编辑 ~/.openclaw/openclaw.json,删除以下配置项:
  • plugins.entries.openclawwechat
  • plugins.installs.openclawwechat
  • channels.openclawwechat
  • 重启 gateway:
openclaw gateway restart

常见问题

问题排查方法
插件未加载openclaw plugins list 确认状态;检查 apiKeychannels.openclawwechat.mode 是否存在
小程序离线openclaw logs --follow 检查是否有轮询日志;确认 API Key 正确且 gateway 已重启
多账户不生效default 账户必须有唯一 sessionKey;修改后需重启 gateway

相关文档

许可证

MIT

Keywords

openclaw

FAQs

Package last updated on 31 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts