Ultra-fast Rust implementation of Claude Code usage statusline.
High-performance statusline for Claude Code that displays real-time usage metrics, billing blocks, and burn rates. Written in Rust for sub-millisecond response times with intelligent caching.
- Ultra-fast performance - 15x faster than Node.js implementation (8ms vs 120ms warm)
- Live API integration - Real-time 5-hour and 7-day utilization via Claude Code OAuth
- Update notifications - Checks for Claude Code updates with configurable channels (stable/latest)
- Time remaining - Shows time left in billing block with clock emoji easter egg
- Interactive configuration - Menu-based UI to enable/disable statusline elements
- Interactive mode - Works as standalone tool or piped statusline
- OAuth authentication - Uses Claude Code's native OAuth tokens from ~/.claude/.credentials.json
- Accurate cost tracking - Fetches daily pricing from LiteLLM, supports tiered pricing
- Smart caching - XDG_RUNTIME_DIR-based caching with 24-hour pricing cache
- 5-hour block tracking - Matches Claude's billing cycles exactly
- Deduplication - Prevents double-counting duplicate JSONL entries
- Burn rate monitoring - Real-time cost per hour with visual indicators
- Auto-install - Creates ~/.claude/settings.json if missing during install
This project is a Rust reimplementation of the statusline feature from ccusage by ryoppippi. The original TypeScript implementation provided the architecture and pricing logic that this Rust version optimizes for performance.
cargo build --release
sudo cp target/release/ccusage-statusline-rs /usr/local/bin/
ccusage-statusline-rs installThe install command will automatically configure ~/.claude/settings.json for you.
cargo build --releaseThe binary will be at target/release/ccusage-statusline-rs.
After building, simply run:
ccusage-statusline-rs installThis will automatically add the statusLine configuration to ~/.claude/settings.json. No manual editing, no bash dependencies required!
To remove the configuration:
ccusage-statusline-rs uninstallConfigure which elements to display:
ccusage-statusline-rs configThis opens an interactive menu where you can:
- Enable/disable individual elements (Model, Block cost, Time remaining, etc.)
- Choose update notification channel (stable/latest/off)
- Configuration persists in
~/.claude/ccusage-statusline-config.json
If you prefer to manually configure, add to your ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "/path/to/ccusage-statusline-rs"
}
}Replace /path/to/ with the actual path to the binary.
- Rust: ~8ms average (consistent across all runs)
- Node.js warm: ~120ms average (after JIT warmup)
- Speedup: 15x faster
- CI enforced: Unit tests verify <20ms execution time
MIT - See LICENSE file for details.

