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

@takibeiy/moltbot_cn

v2026.2.5

Published

WhatsApp gateway CLI (Baileys web) with Pi RPC agent

Readme

Moltbot CN

本仓库是 OpenClaw/Moltbot 的 Fork,添加了 QQ 私聊支持,通过 NapCatQQ + OneBot v11 协议实现。

⚠️ 安全说明: 本插件仅支持私聊,不支持群聊。因为群聊会将你的电脑环境暴露给所有群成员,存在安全风险。

为什么采用这种方式?

我们考虑过两种方案:

| 方案 | 架构 | 优缺点 | |------|------|--------| | 内置扩展 (本方案) | NapCat → moltbot_cn | ✅ 架构简单,只需两个组件✅ 功能完整(图片、输入状态等)✅ 安装简单 | | 独立桥接 | NapCat → bridge → moltbot | ❌ 需要额外维护桥接服务❌ 架构复杂度高 |

最终选择内置扩展方案,因为它最简单、最易维护。

安装

# 安装本 Fork(包含 QQ 支持)
npm install -g @takibeiy/moltbot_cn@latest

# 或使用 beta 版本
npm install -g @takibeiy/moltbot_cn@beta

配置 NapCatQQ

  1. 下载安装 NapCatQQ

  2. 启动 NapCat 并登录 QQ

    # Linux/macOS
    ./NapCat
    
    # Windows
    NapCat.exe
  3. 配置 OneBot WebSocket 反向连接

    在 NapCat 的 WebUI (通常是 http://127.0.0.1:6099) 中配置:

    • 打开 网络配置添加配置
    • 类型选择 WebSocket 反向
    • 地址填写:ws://127.0.0.1:3001 (或你指定的端口)
    • 保存并启用

配置 Moltbot

编辑配置文件 ~/.moltbot/moltbot.json

{
  "gateway": {
    "port": 18789,
    "auth": "your-secret-token"
  },
  "channels": {
    "qq": {
      "enabled": true,
      "wsUrl": "ws://127.0.0.1:3001",
      "dmPolicy": "open",
      "allowFrom": ["*"]
    }
  }
}

配置说明:

| 配置项 | 说明 | |--------|------| | wsUrl | OneBot WebSocket 地址,需与 NapCat 配置一致 | | dmPolicy | 私聊策略:open(开放)、pairing(需配对)、allowlist(白名单) | | allowFrom | 允许的私聊用户 QQ 号,["*"] 表示所有人(需 dmPolicy: "open") |

启动服务

# 1. 确保 NapCat 已启动并登录

# 2. 启动 moltbot gateway
moltbot gateway run

# 3. 检查 QQ 连接状态
moltbot channels status

功能支持

  • ✅ 私聊消息收发
  • ✅ 图片发送(自动 base64 转换)
  • ✅ 输入状态指示器(显示"对方正在输入...")
  • ✅ 消息撤回
  • ⬜ 语音消息(计划中)
  • ❌ 群聊(出于安全考虑不支持)

常见问题

Q: 连接失败怎么办?

  • 检查 NapCat 是否已启动并登录
  • 检查 WebSocket 端口是否一致
  • 查看 moltbot gateway run --verbose 输出

Q: 图片发送失败?

  • 本 Fork 会自动将图片转换为 base64 格式
  • 确保图片 URL 可访问

Q: 为什么不支持群聊?

  • 群聊会将你的电脑环境(通过 AI agent 的工具调用)暴露给所有群成员
  • 任何群成员都可以让 bot 执行命令,存在严重安全风险
  • 如需群聊功能,请自行评估风险并修改代码

上游同步

本 Fork 会定期从上游 OpenClaw 同步更新。

License

MIT