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

cc2im

v0.2.4

Published

IM gateway for multiple local Claude Code instances

Readme

cc2im

English | 中文

微信 IM 网关,连接多个本地 Claude Code 实例。通过微信消息远程控制你的 AI agent。

架构

手机微信
  ↓ iLink Bot API (long-poll)
┌──────────────────────────────────┐
│  cc2im hub (launchd daemon)      │
│  · WeChat 连接(多账号支持)       │
│  · @mention 路由                  │
│  · Agent 生命周期管理              │
│  · Web Dashboard (:3721)         │
│  · Cron 定时任务调度               │
└──────────┬───────────────────────┘
           │ Unix socket
    ┌──────┴──────┐
    ↓             ↓
┌─────────┐  ┌─────────┐
│ Spoke 1 │  │ Spoke N │
│ (MCP)   │  │ (MCP)   │
│ CC #1   │  │ CC #N   │
│ ~/brain │  │ ~/proj  │
└─────────┘  └─────────┘

安装

npm install -g cc2im

环境要求: macOS, Node.js 22+, Claude Code CLI

快速开始

# 1. 微信扫码登录
cc2im login

# 2. 注册第一个 agent
cc2im agent register brain ~/brain

# 3. 安装为后台服务
cc2im install

# 完成!在微信里发消息即可。

命令

| 命令 | 说明 | |------|------| | cc2im login | 微信扫码登录 | | cc2im start | 启动 hub + 所有 autoStart agent | | cc2im hub | 仅启动 hub(调试用) | | cc2im web | 仅启动 Web Dashboard | | cc2im agent register <name> <dir> | 注册 agent | | cc2im agent list | 列出 agent 配置 | | cc2im agent start <name> | 前台启动 agent(调试用) | | cc2im install | 安装 launchd 后台服务 | | cc2im uninstall | 卸载 launchd 服务 | | cc2im status | 查看运行状态 | | cc2im logs | 查看实时日志 |

微信指令

  • 消息 — 发送到默认 agent
  • @agent 消息 — 路由到指定 agent
  • @agent 重启 — 重启 agent(清空上下文)

管理指令由默认 agent 的 Claude 通过自然语言处理:

  • 启动/停止 <agent> — 管理 agent 生命周期
  • 状态 — 列出所有 agent 及状态
  • 注册 agent 叫 X,目录是 /path — 注册新 agent

Web Dashboard

启动后访问 http://127.0.0.1:3721,可查看:

  • 实时消息流和 agent 状态
  • Token 用量和费用统计
  • 多微信账号管理(扫码登录/断开)
  • Cron 定时任务管理
  • 实时日志

多微信账号

支持同时登录多个微信账号。在 Dashboard 的 Channels 页面添加新 channel,扫码登录即可。每个 channel 可以绑定默认 agent,消息会根据来源 channel 路由。

配置

所有状态存储在 ~/.cc2im/

~/.cc2im/
├── hub.sock           Unix socket
├── agents.json        Agent 注册表
├── channels.json      Channel 配置
├── cc2im.db           消息持久化 + Cron 数据(SQLite)
├── hub.log            Hub 日志
└── agents/
    └── <name>/
        └── spoke.log  Spoke 日志

微信凭证存储在 ~/.weixin-bot/(每个 channel 独立文件)。

已知限制

cc2im 为单用户场景设计(一个人通过微信控制自己的多个 agent)。多用户并发时,权限审批和回复路由可能出现竞争。

更新日志

v0.2.4 (2026-04-21)

  • fix: 新注册的 agent 没有历史 session 时,claude --continue 立即 exit 1,之前会连续 5 次重启失败被标记阵亡;现在检测到快速非零退出会在下次重启时自动跳过 --continue 用新会话启动

v0.2.3 (2026-04-20)

  • feat: 启动 CC 实例时默认注入 --permission-mode auto --allowedTools '*' --effort max,让 agent 在微信场景下自主执行不卡权限审批。per-agent claudeArgs~/.cc2im/agents.json)仍可按 flag 名覆盖

v0.2.2 (2026-04-20)

  • fix: CC 启动时若 --continue 触发 "Resume from summary" 会话选择器,expect 脚本现在会自动选第一项;新增 60s 连接超时兜底,卡住时自动 kill 并用新会话重试
  • fix: 每个微信 channel 使用独立凭证文件(credentials-{channelId}.json),不再互相覆盖,解决新增第二个账号导致第一个掉线的问题

v0.2.1 (2026-04-07)

  • 新用户首次启动引导文案优化
  • 休眠/唤醒后自动重连微信,连续 poll 超时时触发重连
  • Hub 启动时清理孤儿 agent 进程
  • 重启后通过 --continue 恢复 agent 的最近 session

License

MIT