CAP
Health Uyari
- License Γ’β¬β License: MIT
- Description Γ’β¬β Repository has a description
- Active repo Γ’β¬β Last push 0 days ago
- Low visibility Γ’β¬β Only 7 GitHub stars
Code Basarisiz
- fs module Γ’β¬β File system access in scripts/setup-statusline.sh
- rm -rf Γ’β¬β Recursive force deletion command in scripts/uninstall.sh
- fs module Γ’β¬β File system access in scripts/uninstall.sh
- execSync Γ’β¬β Synchronous shell command execution in scripts/usage-hud.mjs
- process.env Γ’β¬β Environment variable access in scripts/usage-hud.mjs
- network request Γ’β¬β Outbound network request in scripts/usage-hud.mjs
Permissions Gecti
- Permissions Γ’β¬β No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
π§’ CAP β Claude Allowance Pulse. Simple Claude Code HUD Plugin.
π§’ CAP
Claude Allowance Pulse
A lightweight Claude Code statusline plugin that displays
usage limits, context window, cost, and update alerts in real time.
Zero bloat. Zero dependencies. Just the statusline.
π Opus 4.6 β π§Ί 73%(4h32m) β π
Week: 45%(3d21h)
ποΈ 42% ctx β π° $0.47 β Update πΎ
What It Shows
| Segment | Description |
|---|---|
π Opus 4.6 |
Current model (Opus=π, Sonnet=βοΈ, Haiku=π¨) |
π§Ί 73%(4h32m) |
5-hour window utilization + time until reset |
π
Week: 45%(3d21h) |
7-day window utilization + time until reset |
ποΈ 42% ctx |
Context window usage |
π° $0.47 |
Session cost so far |
Update πΎ |
Shown only when a new version is available |
Line 1 displays model, 5-hour session usage (with reset countdown), and weekly usage.
Line 2 displays context window percentage, accumulated session cost, and update alerts.
Color Coding
Usage percentages change color as they increase:
| Utilization | Color |
|---|---|
| < 50% | π’ Green |
| 50β69% | π‘ Yellow |
| 70β84% | π‘ Yellow (Bold) |
| >= 85% | π΄ Red (Bold) |
Installation
Inside Claude Code:
/plugin marketplace add PeterCha90/CAP
/plugin install cap
Then apply the statusline with one of these methods:
- Run
/cap:setupinside Claude Code (recommended β works on all platforms) - Run
/reload-pluginsto reload plugins - Restart Claude Code
The HUD will appear at the bottom of your terminal.
Customization
Edit scripts/usage-hud.mjs:
| Setting | Default | Description |
|---|---|---|
USAGE_TTL |
60000 (60s) |
How long to cache Usage API responses. Increase to 120000 if you hit 429 rate limits. |
UPDATE_TTL |
21600000 (6h) |
How often to check for new versions |
| Color thresholds | 50/70/85% | Breakpoints for green/yellow/red color transitions |
Uninstall
Inside Claude Code:
/cap:uninstall
Or manually:
bash ~/.claude/plugins/cap/scripts/uninstall.sh
This will:
- Restore your previous
statusLinesetting (if a backup exists) - Remove all cache files
- Delete the plugin directory
Restart Claude Code after running the script.
Troubleshooting
| Problem | Solution |
|---|---|
| HUD not showing | Run /cap:setup to configure the statusline, then restart Claude Code |
HUD not showing after /reload-plugins (Windows) |
/reload-plugins may not configure the statusline on Windows. Run /cap:setup instead |
Usage shows -- |
OAuth token not found β verify with security find-generic-password -s "Claude Code-credentials" -w |
| Frequent 429 errors | Increase USAGE_TTL to 120000 or higher |
| Stale data | Delete cache files in ~/.claude/hud/ and restart |
Project Structure
cap/
βββ .claude-plugin/
β βββ plugin.json # Plugin manifest
β βββ marketplace.json # Marketplace manifest
βββ commands/
β βββ setup.md # /cap:setup
β βββ status.md # /cap:status
β βββ uninstall.md # /cap:uninstall
βββ hooks/
β βββ hooks.json # SessionStart hook
βββ scripts/
β βββ usage-hud.mjs # Main statusline script
β βββ setup-statusline.sh # Auto-config on session start
β βββ uninstall.sh # Clean uninstall script
βββ skills/
β βββ usage-hud/
β βββ SKILL.md # HUD configuration skill
βββ package.json
βββ LICENSE
License
Made by Peter Cha
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi