π Transform your Claude Code experience with a beautiful, informative statusline
Real-time directory, git branch, model info, costs, and session time tracking
One command. Two questions. Beautiful statusline. β¨
npx @chongdashu/cc-statusline initThat's it! Answer 2 simple questions, restart Claude Code, and enjoy your new statusline.
Transform your bland Claude Code terminal into an information-rich powerhouse:
- π Smart Directory Display - Current folder with
~abbreviation - πΏ Git Integration - Current branch name with clean styling
- π€ Model Intelligence - Shows which Claude model you're using
- π΅ Real-Time Cost Tracking - Live cost monitoring via ccusage integration
- β Session Management - Time remaining until usage limit resets with progress bars
- π Advanced Analytics - Optional token consumption and burn rate metrics
- π¨ Beautiful Colors - TTY-aware colors that respect your terminal theme
- β‘ Lightning Fast - Optimized bash script with <100ms execution time
| Feature | Description | Example |
|---|---|---|
| π Directory | Current working directory | ~/my-project |
| πΏ Git Branch | Active git branch | main |
| π€ Model | Claude model name & version | Opus 4.1 |
| π΅ Usage & Cost | Real-time costs with hourly rate | $2.48 ($12.50/h) |
| β Session Time | Time until reset with progress | 2h 15m until reset (68%) |
| Feature | Description | Example |
|---|---|---|
| π Token Stats | Total tokens consumed | 45,230 tok |
| β‘ Burn Rate | Tokens per minute | 847 tpm |
Minimal Setup:
π ~/my-app πΏ main π€ Claude Sonnet
Full Power Mode:
π ~/projects/ai-tools πΏ feature/statusline π€ Opus 4.1 β 2h 15m until reset (68%) [======----] π΅ $16.40 ($7.41/h) π 64,080 tok (850 tpm)
Test your statusline before restarting Claude Code:
cc-statusline preview .claude/statusline.shWhat preview does:
- π Loads your actual statusline script
- π§ͺ Runs it with realistic mock data
- π Shows exactly what the output will look like
- β‘ Reports performance metrics and functionality
# Generate to custom location
cc-statusline init --output ./my-statusline.sh
# Skip auto-installation (manual setup)
cc-statusline init --no-install
# Global installation for convenience
npm install -g @chongdashu/cc-statusline- π― Smart Configuration - Two intuitive questions configure everything
- ποΈ Intelligent Generation - Creates optimized bash script tailored to your needs
- βοΈ Auto-Installation - Seamlessly integrates with Claude Code settings
- π Real-Time Updates - Connects to ccusage for live usage statistics
- β‘ Bash-First - Native shell execution for maximum speed
- π¨ TTY-Aware - Automatically detects terminal capabilities
- π Environment Respect - Honors
NO_COLORand other conventions - π¦ Zero Dependencies - Self-contained script with graceful fallbacks
- π Secure - No network requests except ccusage integration
- Claude Code - The tool you're already using
- jq - JSON processing (pre-installed on most systems)
- git - For branch display (you probably have this)
- ccusage - For usage stats (works via
npx- no install needed)
command -v jq && echo "β
Ready to go!"After installation, you'll have a clean setup:
.claude/
βββ statusline.sh # π― Your generated statusline script
βββ settings.json # βοΈ Auto-updated Claude Code configuration
If auto-configuration fails, simply add this to .claude/settings.json:
{
"statusLine": {
"type": "command",
"command": ".claude/statusline.sh",
"padding": 0
}
}- Restart Claude Code after installation
- Verify settings - Check
.claude/settings.jsoncontains the configuration above - Check permissions - Ensure script is executable:
chmod +x .claude/statusline.sh
- Test performance:
cc-statusline preview .claude/statusline.sh - Optimize features: Disable heavy features if execution > 500ms
- Disable ccusage: Remove usage tracking if not needed
- Install jq:
brew install jq(macOS) orapt install jq(Ubuntu) - ccusage setup: Works automatically via
npx ccusage@latest - Git not found: Install git for branch display
| Metric | Target | Typical |
|---|---|---|
| Execution Time | <100ms | 45-80ms |
| Memory Usage | <5MB | ~2MB |
| CPU Impact | Negligible | <1% |
| Dependencies | Minimal | jq only |
Benchmarked on macOS with all features enabled
We love contributions! π
Quick Start:
git clone https://github.com/chongdashu/cc-statusline
cd cc-statusline
npm install && npm run buildContribution Areas:
- π Bug Fixes - Help make it more robust
- β¨ New Features - Add support for more runtimes/features
- π Documentation - Improve guides and examples
- π§ͺ Testing - Add test coverage and edge cases
See our Contributing Guide for detailed information.
- ccusage - Claude Code usage analytics (would not be possible with it!)
- Claude Code - Official documentation
See CHANGELOG.md for detailed release history.
MIT License - see LICENSE file for details.
Made by Chong-U @ AIOriented
