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

claude-cmux-retry

v0.1.0

Published

cmux 用户专用的 Claude Code 限额自动重试工具

Readme

claude-cmux-retry

cmux 用户专用的 Claude Code 限额自动重试工具。

解决什么问题

用 Claude Code 跑大任务时额度经常见底,等 5 小时刷新后如果人不在电脑前,这个窗口就白白浪费了。

这个工具在后台监控终端输出,检测到限额消息后自动等待重置,重置后自动发送 "continue" 继续工作。不用人盯着。

安装

npm i -g claude-cmux-retry

使用

方式一:cmux hook 自动启动(推荐)

claude-cmux-retry install

装完后每次在 cmux 里启动 Claude Code,监控会自动开启。

方式二:手动启动

# 在 cmux 终端里启动 Claude 后,开启监控
claude-cmux-retry start

# 查看状态
claude-cmux-retry status

# 查看日志
claude-cmux-retry logs

# 停止
claude-cmux-retry stop

工作原理

  1. 每 5 秒读取 cmux 终端内容(cmux read-screen
  2. 检测限额消息("limit reached"、"resets at XX:XX" 等)
  3. 解析重置时间,等到时间到了 + 60 秒余量
  4. cmux send 发送 "continue" 继续工作
  5. 最多重试 5 次(可配置)

配置(可选)

创建 ~/.claude-cmux-retry.json

{
  "maxRetries": 5,
  "pollIntervalSeconds": 5,
  "marginSeconds": 60,
  "retryMessage": "Continue where you left off.",
  "customPatterns": []
}

命令

| 命令 | 说明 | |------|------| | install | 安装 cmux hook,Claude 启动时自动监控 | | uninstall | 卸载 hook | | start | 手动启动监控 | | stop | 停止监控 | | status | 查看状态 | | logs | 查看今天的日志 | | version | 版本号 |

和 claude-auto-retry 的区别

claude-auto-retry 是 tmux 用户的方案,依赖 tmux capture-pane / tmux send-keys

本工具是 cmux 用户的方案,用 cmux read-screen / cmux send 实现同样的功能。

| | claude-auto-retry | claude-cmux-retry | |---|---|---| | 终端 | tmux | cmux | | 会话保活 | tmux session | cmux 自带 | | 启动方式 | wrapper 劫持 claude 命令 | CLI 或 cmux hook |

关于会话保活

tmux 的 server 是独立后台进程,退出终端 app 进程也不受影响。cmux 的进程跑在 cmux app 内部,两者有区别:

| 场景 | tmux | cmux | |------|------|------| | 关闭终端窗口 | 进程继续跑 | 进程继续跑 | | 退出 app | 进程继续跑 | 进程中断(重启后可恢复会话) | | Mac 休眠(合盖) | 暂停,唤醒后继续 | 暂停,唤醒后继续 |

日常使用中只要 Mac 不休眠、cmux 不退出,监控进程就一直在跑。睡觉时让 Claude 自动继续干活完全没问题。

卸载

claude-cmux-retry uninstall
npm uninstall -g claude-cmux-retry

依赖

零 npm 依赖,只用 Node.js 内置模块。

License

MIT