Package Exports
- @chongdashu/cc-statusline
- @chongdashu/cc-statusline/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chongdashu/cc-statusline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cc-statusline
๐ Transform your Claude Code experience with a beautiful, informative statusline

Real-time directory, git branch, model info, costs, and session time tracking
โก Quick Start
One command. Two questions. Beautiful statusline. โจ
npx @chongdashu/cc-statusline init
That's it! Answer 2 simple questions, restart Claude Code, and enjoy your new statusline.
๐ฏ Setup with just 1 command

โจ What You Get
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
๐๏ธ Features Overview
๐ฅ Default Features (Pre-selected)
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%) |
๐ Optional Power Features
Feature | Description | Example |
---|---|---|
๐ Token Stats | Total tokens consumed | 45,230 tok |
โก Burn Rate | Tokens per minute | 847 tpm |
๐จ Example Outputs
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)
๐ ๏ธ Advanced Usage
Preview Your Statusline
Test your statusline before restarting Claude Code:
cc-statusline preview .claude/statusline.sh
What 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
Custom Installation
# 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
๐ง How It Works
The Magic Behind The Scenes
- ๐ฏ 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
Technical Architecture
- โก Bash-First - Native shell execution for maximum speed
- ๐จ TTY-Aware - Automatically detects terminal capabilities
- ๐ Environment Respect - Honors
NO_COLOR
and other conventions - ๐ฆ Zero Dependencies - Self-contained script with graceful fallbacks
- ๐ Secure - No network requests except ccusage integration
๐ Requirements
โ Required (You Already Have These!)
- Claude Code - The tool you're already using
- jq - JSON processing (pre-installed on most systems)
๐ Optional Enhancements
- git - For branch display (you probably have this)
- ccusage - For usage stats (works via
npx
- no install needed)
Quick Compatibility Check
command -v jq && echo "โ
Ready to go!"
๐ File Structure
After installation, you'll have a clean setup:
.claude/
โโโ statusline.sh # ๐ฏ Your generated statusline script
โโโ settings.json # โ๏ธ Auto-updated Claude Code configuration
Manual Configuration (Backup Plan)
If auto-configuration fails, simply add this to .claude/settings.json
:
{
"statusLine": {
"type": "command",
"command": ".claude/statusline.sh",
"padding": 0
}
}
๐ง Troubleshooting
๐ซ Statusline Not Showing
- Restart Claude Code after installation
- Verify settings - Check
.claude/settings.json
contains the configuration above - Check permissions - Ensure script is executable:
chmod +x .claude/statusline.sh
๐ Performance Issues
- Test performance:
cc-statusline preview .claude/statusline.sh
- Optimize features: Disable heavy features if execution > 500ms
- Disable ccusage: Remove usage tracking if not needed
๐งฉ Missing Features
- 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
๐ Performance
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
๐ค Contributing
We love contributions! ๐
Quick Start:
git clone https://github.com/chongdashu/cc-statusline
cd cc-statusline
npm install && npm run build
Contribution 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.
๐ Stats
๐ Related Projects
- ccusage - Claude Code usage analytics (would not be possible with it!)
- Claude Code - Official documentation
๐ Changelog
See CHANGELOG.md for detailed release history.
๐ License
MIT License - see LICENSE file for details.
Made by Chong-U @ AIOriented