Skip to content

WaterTian/cc-hud

Repository files navigation

cc-hud preview

CC-HUD

A compact, single-line statusline plugin for Claude Code
Crash-free, zero-dependency status bar — model · context · agents · rate limits

Model  →  Context  →  Agents  →  Rate Limits
everything you need, nothing you don't.

install   zero deps   node >= 18   MIT


Why CC-HUD?

The Problem

Claude Code's native installer bundles Bun, which has a known memory allocator bug on Windows (oven-sh/bun#25082), causing frequent pas panic crashes. Statusline plugins like jarrodwatts/claude-hud run on every tick, amplifying memory pressure and making crashes far more likely.

The Solution

CC-HUD is a crash-free alternative — pure Node.js, zero dependencies, stateless per-call, ~60ms execution, 2s hard timeout. Designed to keep your status bar running without taking Claude Code down.

为什么做 CC-HUD?

问题

Claude Code 原生安装器内嵌 Bun,在 Windows 上存在已知内存分配器 bug(oven-sh/bun#25082),频繁触发 pas panic 崩溃。而 jarrodwatts/claude-hud 等状态栏插件每次 tick 都会执行,加剧内存压力,使崩溃更加频繁。

解决方案

CC-HUD 是不会崩溃的替代方案 — 纯 Node.js、零依赖、无状态调用、~60ms 执行、2s 硬超时。让状态栏稳定运行,不拖垮 Claude Code。

Tip

Windows users: Use npm i -g @anthropic-ai/claude-code instead of the native installer to avoid Bun crashes entirely.

Windows 用户: 建议用 npm i -g @anthropic-ai/claude-code 代替原生安装器,彻底规避 Bun 崩溃。


Features

█▌

Context Bar
1/8-precision blocks
80-level granularity

🎨

Color
Catppuccin Mocha
4-stop gradient

Agents
Running subagents
with type & model

%

Rate Limits
5h / 7d usage
Pro / Max

0

Dependencies
Zero. Node.js
built-ins only

Install

Inside Claude Code, run 3 commands:

/plugin marketplace add WaterTian/cc-hud
/plugin install cc-hud
/cc-hud:setup

Restart Claude Code. Done.

Manual install
git clone https://github.com/WaterTian/cc-hud.git
cd cc-hud && npm install && npm run build

Add to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "node /path/to/cc-hud/dist/index.js",
    "padding": 2
  }
}

How It Works

Claude Code ─── stdin JSON ──→ cc-hud ──→ stdout ──→ status bar
             ↘ transcript JSONL (tail 64KB → active agents)
Stateless
Fresh process per call
zero memory leaks
Fast
~60ms execution
within 300ms debounce
Safe
2s hard timeout
all IO try-catch

Development

npm run build      # compile
npm test           # 13 tests


MIT License © Water

About

A compact, single-line statusline for Claude Code. 精简ClaudeCode状态栏

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors