Skip to content

VigDevelopment/cc-statusline

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cc-statusline

πŸš€ Transform your Claude Code experience with a beautiful, informative statusline

cc-statusline in action

Real-time directory, git branch, model info, costs, and session time tracking

npm version License: MIT Node.js

⚑ 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

Demo of cc-statusline setup

✨ 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:

  1. πŸ“„ Loads your actual statusline script
  2. πŸ§ͺ Runs it with realistic mock data
  3. πŸ“Š Shows exactly what the output will look like
  4. ⚑ 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

  1. 🎯 Smart Configuration - Two intuitive questions configure everything
  2. πŸ—οΈ Intelligent Generation - Creates optimized bash script tailored to your needs
  3. βš™οΈ Auto-Installation - Seamlessly integrates with Claude Code settings
  4. πŸ”„ 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

  1. Restart Claude Code after installation
  2. Verify settings - Check .claude/settings.json contains the configuration above
  3. 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) or apt 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

GitHub stars GitHub forks npm downloads

πŸ”— 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

About

Transform your Claude Code experience with a beautiful, informative statusline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%