cc-hud
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Uyari
- process.env — Environment variable access in dist/balance.js
- network request — Outbound network request in dist/balance.js
- process.env — Environment variable access in dist/glm.js
- network request — Outbound network request in dist/glm.js
- process.env — Environment variable access in dist/index.js
- process.env — Environment variable access in dist/mmx.js
- network request — Outbound network request in dist/mmx.js
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Compact Claude Code statusline — zero-dep, crash-free on Windows · 精简 Claude Code 状态栏
CC-HUD
A compact, single-line statusline plugin for Claude Code
Crash-free, zero-dependency status bar — model · context · agents · rate limits · reset countdown
Model → Context → Agents → Rate Limits
everything you need, nothing you don't.
Why CC-HUD?
The ProblemClaude Code's native installer bundles Bun, which has a known memory allocator bug on Windows (oven-sh/bun#25082), causing frequent The SolutionCC-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),频繁触发 解决方案CC-HUD 是不会崩溃的替代方案 — 纯 Node.js、零依赖、无状态调用、~60ms 执行、2s 硬超时。让状态栏稳定运行,不拖垮 Claude Code。 |
[!TIP]
Windows users: Usenpm i -g @anthropic-ai/claude-codeinstead of the native installer to avoid Bun crashes entirely.Windows 用户: 建议用
npm i -g @anthropic-ai/claude-code代替原生安装器,彻底规避 Bun 崩溃。
Features
█▌Context Bar1/8-precision blocks 80-level granularity |
◧ColorCatppuccin Mocha dual-tone gradient |
◐AgentsRunning subagents with type & model |
%Rate Limits5h / 7d usage + reset countdown |
0DependenciesZero. Node.js built-ins only |
Install
Inside Claude Code:
/plugin marketplace add WaterTian/cc-hud
/plugin install cc-hud@cc-hud
/reload-plugins
/cc-hud:setup # only if no statusLine is configured yet
Done — no restart needed; /reload-plugins hot-loads the HUD.
[!NOTE]
/cc-hud:setupwrites thestatusLineentry into~/.claude/settings.json. Skip it if you already have astatusLineconfigured (e.g. viacc-bot, an older install, or hand-edited settings).
Upgrade
/plugin marketplace update cc-hud
/reload-plugins
Via npm (manual)
npm i -g cc-hud
Add to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "npx cc-hud",
"padding": 2
}
}
From source
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 /absolute/path/to/cc-hud/dist/index.js",
"padding": 2
}
}
How It Works
Claude Code ─── stdin JSON ──→ cc-hud ──→ stdout ──→ status bar
│ (model, context, rate_limits.resets_at)
↘ 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 |
Balance Display (DeepSeek)
When using DeepSeek as the backend (ANTHROPIC_BASE_URL set to https://api.deepseek.com/anthropic), cc-hud automatically shows your account balance — zero configuration required.
[DeepSeek V4 Pro] ██░░░░░░░░ 20% │ ¥13.44
Balance is cached locally for 5 minutes. On cache miss, cc-hud fetches the latest balance from DeepSeek's API. Works with dscode, deepseekcode, or any launcher that sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN.
For other backends (GLM, custom endpoints), set CC_HUD_EXTRA_FILE env var to a file whose first line is the text to display. See scripts/ds-balance-cache.sh for a reference cache implementation.
Quota Display (MiniMax)
When using MiniMax M3 as the backend (ANTHROPIC_BASE_URL set to https://api.minimaxi.com/anthropic), cc-hud automatically shows your Token Plan quota — zero configuration required.
[MiniMax M3] █▎░░░░░░░░ 13% │ 5h:17% (1.1h) │ 7d:2% (6.4d)
Token Plan usage (5h interval + weekly) is fetched from MiniMax's /v1/token_plan/remains endpoint, cached locally for 5 minutes. Model names are beautified automatically: MiniMax-M3 → MiniMax M3, MiniMax-M3[1m] → MiniMax M3 (1M), abab-6.5s-chat → ABAB 6.5s Chat.
Works with mmcode or any launcher that sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN.
Balance Display (GLM)
When using GLM as the backend (ANTHROPIC_BASE_URL set to https://open.bigmodel.cn/api/anthropic or https://api.z.ai/api/anthropic), cc-hud automatically shows your account balance — zero configuration required.
[GLM 5.2] ████▏░░░░░ 41% (1M) │ ¥88.50
Balance is cached locally for 5 minutes. On cache miss, cc-hud fetches the latest balance from GLM's account API. Works with glmcode, ZCode, or any launcher that sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN.
Model names are beautified automatically: glm-5.2 → GLM 5.2, glm-5.2[1m] → GLM 5.2 (1M), glm-5-turbo → GLM 5 Turbo, glm-4.5-air → GLM 4.5 Air.
Development
npm run build # compile
npm test # 57 tests
Star History
MIT License © Water
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi