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

@metatronwings/claude-code-zenmux-status

v0.3.0

Published

Zenmux usage monitor for Claude Code status bar

Readme

claude-code-zenmux-status

English

在 Claude Code 状态栏显示 Zenmux 订阅用量、会话 token 统计和 Git 状态。

默认模式:

💎 ultra | 5h 8.1% $2.13/$26.27 ↻4h 20m | 7d 81.3% $165.13/$202.98 ↻23h 22m
📁~/project 🌿(main) ✗ ~3 ?1

进度条模式(ZENMUX_PROGRESS_BAR=1):

[Sonnet 4.6] 💎 ▓░░░░░░░░░ 8.1% | 7d ████████░░ 81.3% | ↑9.0M ↓56k
📁~/project 🌿(main) ✗ ~3 ?1

第一行 — 订阅用量

  • 档位 emoji:💎 Ultra / 🔥 Max / ⭐ Pro / 🌱 Free
  • 5h — 5 小时滚动窗口
  • 7d — 7 天滚动窗口(仅在用量超过 70% 时显示
  • 进度条模式下额外显示:当前模型名 [Sonnet 4.6]、会话累计 token ↑input ↓output
  • 账号状态异常时自动附加标记,如 [monitored]

第二行 — 工作区状态

  • 📁 当前工作目录(~ 缩写)
  • 🌿(branch) Git 分支
  • 有未提交变更时显示,后跟各类变更数:+新增(绿)~修改(黄)?未跟踪(红)

凭证获取

  1. 前往 ZenMux 控制台
  2. 创建一个 Management API Key
  3. 复制 Key 备用

安装方式

方式一:npm 全局安装

npm install -g @metatronwings/claude-code-zenmux-status

.claude/settings.local.json 里配置:

{
  "statusLine": {
    "type": "command",
    "command": "ZENMUX_MANAGEMENT_API_KEY=your_key_here claude-code-zenmux-status"
  }
}

开启进度条模式:

{
  "statusLine": {
    "type": "command",
    "command": "ZENMUX_PROGRESS_BAR=1 ZENMUX_MANAGEMENT_API_KEY=your_key_here claude-code-zenmux-status"
  }
}

也可以在 ~/.zshrc / ~/.bashrcexport ZENMUX_MANAGEMENT_API_KEY=...,command 直接写 claude-code-zenmux-status

方式二:本地克隆运行

git clone https://github.com/Metatronwings/claude-code-zenmux-status.git
cd claude-code-zenmux-status
npm install

.claude/settings.local.json 里:

{
  "statusLine": {
    "type": "command",
    "command": "ZENMUX_MANAGEMENT_API_KEY=your_key_here /path/to/node_modules/.bin/tsx /path/to/src/index.ts"
  }
}

环境变量

| 变量 | 必填 | 说明 | |------|------|------| | ZENMUX_MANAGEMENT_API_KEY | ✅ | Management API Key | | ZENMUX_PROGRESS_BAR | 否 | 设为 1 启用进度条模式 | | ZENMUX_CACHE_TTL | 否 | 缓存秒数,默认 60 |

缓存

Claude Code 状态栏在每次 AI 回复后触发刷新,频繁对话时每分钟可能执行多次。为避免触达 API 限流,工具内置文件缓存:

  • 默认 TTL 60 秒,缓存命中时响应 < 30ms
  • 缓存文件:/tmp/czs-<key_hash>.cache(key 的 sha256 前 16 位,不含明文)
  • Git 状态、当前目录、会话 token 每次实时读取,不走缓存

时间计算

所有倒计时以 API 响应的 Date 头作为当前时间基准,不依赖本地系统时钟,在任何时区和时钟偏差环境下均能正确显示。