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

@uk-hot/ccline

v1.1.8

Published

CCometixLine fork — high-performance Claude Code statusline, with prompt cache hit-rate in the context window segment and a second status line showing session/weekly usage.

Readme

@uk-hot/ccline

基于 CCometixLine(作者 Haleclipse,MIT)的 fork。 在原版基础上增加了两项显示:上下文窗口段的 prompt 缓存命中率(cache hit-rate),以及显示套餐用量的第二行状态栏。 其余功能与上游一致。

CCometixLine 是用 Rust 编写的高性能 Claude Code 状态行(statusline)工具。

本 fork 额外提供两项显示功能,defaultcometix 主题默认开启:

🤖 Opus 4.8 | 📁 myproject | ⚡ 20.0% · 40.1k tokens · cache 96.4%
📊 Session 4% 🔄 17:20   Week 29% 🔄 6/21 23:00

✨ 与原版的区别

1. Prompt 缓存命中率

context window 段在原本的 百分比 · token 数 之后,追加显示全会话累计的缓存比例:

原版:  ⚡ 20.0% · 40.1k tokens
本版:  ⚡ 20.0% · 40.1k tokens · cache 96.4%
  • 比例定义:Σcache_read / Σ(input + cache_creation + cache_read),对 transcript 中所有 assistant 消息的 token 累加,反映整个会话的缓存利用率。
  • context 百分比 / tokens 仍取最近一条 assistant 消息(当前上下文占用),仅 cache 为会话累计。
  • 无缓存数据时显示 cache -;同时写入 segment metadata:cache_hit_ratecache_read_tokens

2. 第二行状态栏显示套餐用量

usage 段从 /api/oauth/usage 拉取套餐用量,显示当前 5 小时会话与 7 天周期的已用比例(与 Claude Code /usage 一致),并各带本地重置时间:

📊 Session 4% 🔄 17:20   Week 29% 🔄 6/21 23:00
  • 百分比按"还剩多少"着色:余量充足为绿,临近上限转黄 / 红。
  • 数据本地缓存于 ~/.claude/ccline/.api_usage_cache.jsondefaultcometix 主题默认 TTL 600 秒)。
  • 具备容错:接口不可用时复用上次缓存,若无缓存则仅隐藏第二行,绝不影响第一行。

多行布局由每个段的 line 选项控制(默认 1),写在 [segments.options] 下。把任意段放到第二行只需 line = 2

[[segments]]
id = "usage"
enabled = true
[segments.options]
line = 2

📦 安装

npm install -g @uk-hot/ccline

安装后会自动把对应平台的二进制放到 ~/.claude/ccline/ccline。在 Claude Code 的 ~/.claude/settings.json 中配置:

{
  "statusLine": { "type": "command", "command": "~/.claude/ccline/ccline", "padding": 0 }
}

中国大陆用户可用镜像加速:

npm install -g @uk-hot/ccline --registry https://registry.npmmirror.com

支持平台:macOS (x64/arm64)、Linux (x64/arm64,glibc 与 musl)、Windows x64 —— 与上游一致,由 GitHub Actions 跨平台编译发布。

🙏 致谢与许可

本 fork 仅增加 cache 命中率与套餐用量显示,未改动其它行为。如需上游原版,请使用 @cometix/ccline