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

wechat-bridge-opencode

v0.3.3

Published

Bridge WeChat to OpenCode

Readme

WeChat OpenCode

中文 | English

将微信私聊消息桥接到 OpenCode,支持文本、图片、文件、音视频的双向传输。

功能

  • 文本消息 — 微信与 OpenCode 之间的双向文本传输
  • 图片传输 — 支持发送/接收图片,支持微信 CDN 下载
  • 文件传输 — 支持任意类型文件收发
  • 音视频传输 — 完整的音频和视频消息支持
  • 二维码登录 — 终端渲染二维码,扫码登录微信
  • 独立会话 — 每个微信用户拥有独立 ACP 会话
  • 后台模式 — 使用 --daemon 参数后台运行
  • send-wechat 工具 — Agent 可直接发送文件/图片到微信

安装

方式一:一键运行(推荐)

无需安装,npx 会自动下载并运行:

npx wechat-bridge-opencode --agent opencode

方式二:全局安装

npm install -g wechat-bridge-opencode

安装完成后,可使用简写命令:

wbo --agent opencode

使用

cd /path/to/your/project
wbo --agent opencode
# 或直接使用 npx:
# npx wechat-bridge-opencode --agent opencode

首次运行会:

  1. 终端显示二维码
  2. 扫码登录微信
  3. 保存登录令牌到 ~/.wechat-bridge-opencode
  4. 开始轮询微信私信

选项

| 参数 | 说明 | |------|------| | --agent <预设\|命令> | 内置预设或自定义命令 | | --cwd <目录> | 工作目录 | | --login | 强制重新登录 | | --daemon | 后台运行 | | --config <文件> | JSON 配置文件 | | --idle-timeout <分钟> | 会话空闲超时(默认 0 = 无限) |

微信命令

工作区(/workspace/ws

| 命令 | 说明 | |------|------| | /workspace list | 列出所有目录 | | /workspace switch <n\|路径> | 按序号或路径切换(自动加载最近会话) | | /workspace add /路径 [名称] | 添加目录 | | /workspace status | 显示当前目录 |

会话(/session/s

| 命令 | 说明 | |------|------| | /session list | 列出最近 10 个会话 | | /session list --cwd | 列出当前工作区下的会话 | | /session list <路径\|n> | 按工作区路径或索引筛选会话 | | /session switch <n\|slug> | 按序号或 slug/标题切换 | | /session new | 新会话(清除上下文) | | /session status | 显示当前会话 |

Agent(/agent/a

| 命令 | 说明 | |------|------| | /agent list | 列出可用 Agent 模式,带序号和当前标记 | | /agent switch <名称\|n> | 按名称或序号切换 Agent 模式 | | /agent status | 显示当前 Agent 模式 |

Model(/model

| 命令 | 说明 | |------|------| | /model list | 列出所有模型提供商及其模型数量 | | /model list <provider> | 列出指定提供商下的模型(带序号) | | /model switch <provider/model\|n> | 按完整模型名或序号切换模型(最后查询的提供商) | | /model status | 显示当前模型 |

Reasoning(/reasoning

| 命令 | 说明 | |------|------| | /reasoning list | 列出可用推理级别 | | /reasoning switch <level> | 切换推理级别 | | /reasoning status | 显示当前推理级别 |

状态(/status

| 命令 | 说明 | |------|------| | /status | 查看当前会话,工作区、Agent、模型、推理级别和上下文使用情况 |

停止(/stop

| 命令 | 说明 | |------|------| | /stop | 停止正在运行的 Agent(相当于按 ESC) | | /restart | 重启 Agent(保留当前状态) | | /upgrade | 更新 OpenCode 后重启 |

版本(/version

| 命令 | 说明 | |------|------| | /version | 查看当前版本和最新版本 |

思考(/thinking

| 命令 | 说明 | |------|------| | /thinking on | 开启思考与工具调用显示(暂时禁用) | | /thinking off | 关闭思考与工具调用显示 | | /thinking status | 查看当前显示设置 |

环境要求

  • Node.js 20+
  • 微信 iLink 机器人 API 访问权限
  • OpenCode 本地安装或通过 npx 运行

数据存储

运行时数据存储在 ~/.wechat-bridge-opencode

  • 登录令牌
  • 认证令牌
  • 临时文件(下载的媒体)
  • 守护进程 PID / 日志
  • 桥接状态(.wechat-bridge-state.json

注意事项

  • 仅支持私信(群聊会被忽略)
  • 权限请求自动批准
  • send-wechat 工具自动安装到 ~/.config/opencode/tools/send-wechat.ts

致谢

本项目基于 wechat-acp(作者 formulahendry)二次开发,感谢原作者的贡献!

许可证

MIT