npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openclawwechat

v1.3.2

Published

OpenClawWeChat - OpenClaw WeChat MiniProgram channel plugin

Readme

OpenClawWeChat

Version Downloads License OpenClaw

概述

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

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

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

兼容要求

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

获取 ClawChat API Key

  1. 打开微信小程序 ClawChat
  2. 进入"我的"页面 → Bot 管理
  3. 复制目标 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),按提示依次填写:

  1. ClawChat API Key — 格式 bot_id:secret,从微信小程序 ClawChat 获取
  2. 默认轮询间隔 — 单位毫秒,默认 5000,通常无需修改
  3. 调试日志 — 是否开启详细日志,默认关闭
  4. 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

手动卸载

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

常见问题

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

相关文档

许可证

MIT