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

@quukk/opencode-clawmessenger

v1.2.2-beta.8

Published

OpenCode ClawMessenger - 虾说桥接插件

Readme

OpenCode ClawMessenger

npm version License: MIT

接入 IM 消息到 OpenCode AI 会话,安装后即用。

核心特性

  • AI 自动回复:聊天消息自动转发给 OpenCode 处理,AI 响应实时推回
  • 自动注册:首次运行生成二维码,App 扫码绑定
  • 流式消息:SSE 流式响应,AI 回答实时到达
  • 消息已读回执:单聊和群聊均兼容
  • 设备管理:远程状态查询、启动/停止/重启等 P2P 命令
  • 无感运行opencode serve 时桥接服务自动跟随启停

安装

npm install -g @quukk/opencode-clawmessenger@latest
opencode-clawmessenger setup

setup 会自动判断当前平台并完成配置:

  1. Linux:检测发行版、安装系统依赖,其余同下
  2. Windows / macOS:配置桥接服务的自动启停
  3. 终端打印二维码 → App 扫码绑定

Linux 安装系统依赖需要 sudo 权限。如果只想注册节点:

opencode-clawmessenger setup --no-install

Linux / macOS 完成后重新加载 shell 配置:

source ~/.bashrc   # 或 source ~/.zshrc

Windows 重启终端后生效。

之后正常使用 opencode 即可:

opencode serve

其他选项

| 选项 | 说明 | |------|------| | --no-install | 跳过环境安装,仅注册节点和生成二维码 | | --install-service | 同时安装 systemd 服务,实现开机自启(需 root) |

sudo opencode-clawmessenger setup --install-service

独立 CLI 运行

如果希望手动管理桥接进程:

npm install -g @quukk/opencode-clawmessenger@latest
opencode-clawmessenger setup --no-install
opencode-clawmessenger start --daemon

Docker 运行

docker build -t opencode-clawmessenger .
docker run -d \
  --name clawmessenger \
  -v ~/.config/opencode:/root/.config/opencode \
  -e CLAW_OPENCODE_URL=http://host.docker.internal:19876 \
  opencode-clawmessenger

本地开发

从源码运行:

npm run install:local

构建项目并注册到本地,之后 opencode 即可加载最新代码。

CLI 命令

# 一键初始化
opencode-clawmessenger setup

# 跳过环境安装,仅注册节点
opencode-clawmessenger setup --no-install

# 同时安装 systemd 服务
sudo opencode-clawmessenger setup --install-service

# 启动服务(前台)
opencode-clawmessenger start

# 后台守护进程
opencode-clawmessenger start --daemon

# 查看状态
opencode-clawmessenger status

# 查看日志
opencode-clawmessenger logs -n 100

# 停止服务
opencode-clawmessenger stop

# 卸载恢复(npm uninstall 前必须先运行)
opencode-clawmessenger uninstall

# systemd 服务管理(若已安装)
sudo systemctl start opencode-clawmessenger
sudo systemctl status opencode-clawmessenger
sudo systemctl stop opencode-clawmessenger

环境变量

| 变量名 | 说明 | 默认值 | |--------|------|--------| | CLAW_TOKEN | 融云 Token | 自动注册生成 | | CLAW_ACCOUNT_ID | 节点 ID | 自动注册生成 | | DM_SERVER_URL | 注册服务器地址 | https://newsradar.dreamdt.cn/im | | CLAW_OPENCODE_URL | OpenCode 服务器地址 | http://127.0.0.1:19876 | | CLAW_OPENCODE_DIR | OpenCode 工作目录 | process.cwd() | | OPENCODE_SERVER_PASSWORD | OpenCode Basic Auth 密码 | - | | CLAW_LOG_LEVEL | 日志级别 | info | | DEBUG | 遗留调试开关 | - |

卸载

卸载前必须先运行 uninstall 命令恢复原始 opencode,否则 opencode 命令会找不到可执行文件:

opencode-clawmessenger uninstall
npm uninstall -g @quukk/opencode-clawmessenger

uninstall 会自动完成:

  • Windows:将 opencode-original.exe 重命名回 opencode.exe,删除包装器 .cmd
  • Linux / macOS:删除 npm bin 目录中的包装器脚本

许可证

MIT © quukk