π Transform your Claude Code experience with intelligent cost tracking, real-time context monitoring, and beautiful themes
A comprehensive, modular statusline system that provides essential workflow information at a glance. Built for developers who want deep insights into their Claude Code usage with visual excellence and complete customization control.
ποΈ current directory β’ π³ (git branch) β’ β # (changed) β # (added) β # (deleted) β’ β
# of commits (time since commit)
πΎ c/c version β’ π€ model β’ π§ context usage % (utilized/total) β’ βοΈ MCP: #/# connected/total (status)
π° M:$ monthly W:$ weekly D:$ daily β’ π₯ tokens /min ($/hr) β’ β° RESET at <reset time>
Getting Started
Understanding the System
Development & Advanced Usage
curl -fsSL https://raw.githubusercontent.com/jakreymyers/awesome-claude-statusline/main/install.sh | bashThat's it! The installer will:
- β
Install to
~/.claude/statusline/(global for all your projects) - β Update your Claude Code config automatically
- β Set proper permissions
- β Backup your existing config
Restart Claude Code and enjoy your new statusline!
- Claude Code CLI installed and configured
- Bash 4.0+ (auto-detected and upgraded on macOS)
- jq recommended for config updates (optional but helpful)
If you prefer to install manually or customize the installation:
# Clone the repository
git clone https://github.com/jakreymyers/awesome-claude-statusline.git ~/.claude/statusline
# Run setup
cd ~/.claude/statusline
chmod +x statusline.sh install.sh
./install.sh# See your statusline in action
echo '{"workspace":{"current_dir":"'$(pwd)'"}}' | ~/.claude/statusline/statusline.shYou'll immediately see your current directory, Git Flow branch with colored file changes, cost tracking, and more - all beautifully formatted with the default Jak'd theme.
Never run out of context unexpectedly. The statusline monitors your Claude conversation in real-time:
- π’ Green (0-34%): Plenty of space, work freely
- π Orange (35-59%): Getting full, plan ahead
- π΄ Red (60%+): Consider using
/compactsoon
Track your Claude usage across multiple timeframes:
- Monthly/Weekly/Daily cost breakdowns
- Live burn rate (tokens/minute, $/hour)
- Billing block tracking with reset timers
- Projection analysis for current session
Stay connected to your codebase:
- Branch status with clean/dirty indicators
- Commit activity with time since last commit
- Submodule tracking for complex projects
- Smart path display (~/project instead of /Users/you/project)
- 4 Built-in themes: Jak'd (default), Classic, Garden, Catppuccin
- Consistent emoji system with perfect dimming
- Custom color support for personal branding
- Responsive layout adapting to your terminal
Understanding what information is available helps you customize effectively:
Line 1 - Project Context
ποΈ ~/current-directory ο½₯ πΏ (git branch) ο½₯ β0 β0 ο½₯ β# β# β# ο½₯ β
commits (time since last commit)
- Dynamic Git Flow icons (πΏ feature, π release, π₯ hotfix, π main, π develop)
- Sync status: βN (commits ahead of remote), βN (commits behind remote) - always visible, dimmed
- Colored file changes: yellow β modified, green β added, red β deleted - all dimmed
Line 2 - Active Session
πΎ c/c version ο½₯ π€ model ο½₯ π§ context usage % (utilized/total) ο½₯ βοΈ MCP: #/# active/total
Line 3 - Cost & Performance
π° M:$ monthly W:$ weekly D:$ daily β’ π₯ tokens/min ($/hr) β’ β° RESET at <reset time>
statusline.sh (main entry point)
βββ lib/core.sh (core functionality)
βββ lib/config.sh (configuration management)
βββ lib/display.sh (rendering and formatting)
βββ lib/components.sh (component registry)
βββ lib/cache.sh (caching system)
βββ lib/git.sh (git operations)
βββ lib/mcp.sh (MCP server detection)
βββ lib/cost.sh (cost tracking)
βββ lib/components/ (individual components)
βββ directory_info.sh
βββ gitflow_info.sh
βββ commits.sh
βββ version_info.sh
βββ model_info.sh
βββ mcp_status.sh
βββ cost_*.sh
-
directory_info - Current directory path with card index dividers emoji (ποΈ)
- Data: Current working directory path (shortened with ~)
- Color: Orange #E1BB8B
-
gitflow_info - Enhanced Git Flow information with dynamic branch type icons
- Data: Branch name, sync status, file changes
- Icons: πΏ feature, π release, π₯ hotfix, π main, π develop (dimmed)
- Sync status: βN βN showing commits ahead/behind remote (always visible, dimmed)
- File changes: Dimmed yellow β modified, green β added, red β deleted (always shows counts)
- Color: Brown #7F5632 for branch name
- Format: All icons and indicators properly dimmed
-
commits - Commit activity with check mark emoji (β )
- Data: Number of commits in last 24 hours + time since last commit
- Color: Green #4EB650 for commit data
- Format: Dimmed emoji
-
version_info - Claude Code version with alien monster emoji (πΎ)
- Data: Claude Code version (e.g., v1.0.117)
- Dependencies: core.sh
-
model_info - Claude model with robot emoji (π€)
- Data: Current Claude model name (e.g., "Opus")
- Format: Non-dimmed emoji (always bright)
-
context_usage - Context window usage with brain emoji (π§ )
- Data: Percentage used, tokens used/limit (e.g., "47% (95k/200k)")
- Color: Green/Orange/Red based on usage thresholds
- Format: Dimmed emoji with percentage and token counts
-
cost_monthly/weekly/daily - Time-period cost tracking with money bag emoji (π°)
- Data: Costs over different time periods (M:$X W:$Y D:$Z format)
- Format: Dimmed emoji with abbreviated period labels
-
burn_rate - Token burn rate analysis with fire emoji (π₯)
- Data: Tokens per minute and hourly cost projection
- Color: Red/orange for high burn rates
- Format: Dimmed emoji with rate and hourly cost
-
reset_timer - Block reset countdown with alarm clock emoji (β°)
- Data: Reset time and remaining duration (e.g., "RESET at 23:00 (2h 46m left)")
- Format: Dimmed emoji with time and countdown
- mcp_status - MCP server status with gear emoji (βοΈ)
- Data: Connected/total servers with server names in parentheses
- Format: "MCP: X/Y (server1, server2, ...)"
- Dependencies: mcp.sh
Additional Available Components:
- cost_repo - Repository-specific cost tracking
- cost_live - Live block cost tracking
- cost_usage - Detailed usage costs
- token_usage - Token consumption metrics
- context_usage - Covered above in Model & Context
- cache_efficiency - Cache performance metrics
- block_projection - Cost projection for current block
- time_display - Current time display
- submodules - Git submodule status
Every component must implement:
collect_${component_name}_data() # Data collection
render_${component_name}() # Display rendering
get_${component_name}_config() # Configuration accessComponents are registered using:
register_component "component_name" "Description" "dependencies" "enabled_status"The system uses TOML format for configuration with dot notation:
# Display Lines Configuration
display.line1.components = "directory_info gitflow_info commits"
display.line1.separator = " ο½₯ "
display.line2.components = "version_info model_info context_usage mcp_status"
display.line2.separator = " β’ "
display.line3.components = "cost_monthly cost_weekly cost_daily burn_rate reset_timer"
display.line3.separator = " β’ "
# Component-specific settings
components.mcp_status.show_server_list = true
components.context_usage.show_tokens = true
components.burn_rate.show_hourly_cost = true
components.reset_timer.show_remaining = true
# Theme selection
theme.name = "jakd" # Options: "jakd", "classic", "garden", "catppuccin", "custom"
# Cache settings
cache.enabled = true
cache.ttl = "5m"
# Timeouts
timeouts.mcp = "10s"
timeouts.version = "10s"- Consistent Usage: Each component has a dedicated emoji that remains constant
- Opacity Control: All emojis use 50% opacity (
${CONFIG_DIM}) while text remains full opacity - Component Format:
(emoji) <data>pattern throughout
- ποΈ Directory Info - Card index dividers (dim)
- π³ Git Branch - Deciduous tree (dim)
- β Commits - Check mark (dim)
- πΎ Version - Alien monster (dim)
- π€ Model - Robot (NOT dimmed - always full brightness)
- π§ Context Usage - Brain (dim)
- βοΈ MCP Status - Gear (dim)
- π° Cost Tracking - Money bag (dim)
- π₯ Burn Rate - Fire (dim)
- β° Reset Timer - Alarm clock (dim)
- Directory Path: #E1BB8B (custom warm beige)
- Git Branch: #7F5632 (brown)
- Commits: #4EB650 (green)
- Version: Purple tones
- Context Usage: Dynamic (green/orange/red based on percentage)
- Costs: Various colors per component
- Text: Full opacity for readability
- Emojis: 50% opacity for subtle visual hierarchy (except π€)
- Primary Separator:
ο½₯(middle dot with spaces) - Configurable: Can be changed per display line in Config.toml
statusline.sh- Main entry point, expects JSON input withworkspace.current_dirlib/core.sh- Core functionality, logging, error handlinglib/config.sh- TOML configuration parsinglib/security.sh- Security validation and sanitization
lib/git.sh- Git repository operations, branch detection, commit countinglib/mcp.sh- MCP server discovery and health monitoringlib/cache.sh- Caching system with project isolationlib/cost.sh- Cost calculation and tracking
lib/display.sh- Formatting functions, color managementlib/components.sh- Component registry and base functionalitylib/themes.sh- Theme definitions and color schemes
directory_info.sh β display.sh
gitflow_info.sh β git.sh, display.sh (uses Git Flow helper functions)
commits.sh β git.sh, display.sh
version_info.sh β core.sh
model_info.sh β display.sh
mcp_status.sh β mcp.sh
cost_*.sh β cost.sh
-
Create Component File:
lib/components/my_component.sh -
Implement Required Functions:
collect_my_component_data() { COMPONENT_MY_COMPONENT_DATA="your_data" } render_my_component() { echo "${CONFIG_DIM}π§${CONFIG_RESET} ${COMPONENT_MY_COMPONENT_DATA}" } get_my_component_config() { get_component_config "my_component" "$1" "$2" }
-
Register Component:
register_component "my_component" "Description" "dependencies" "true"
-
Add to Display Line: Update
Config.tomldisplay.line1.components = "directory_info my_component"
- Data Collection: Modify
collect_${component}_data()function - Display Format: Update
render_${component}()function - Configuration: Adjust
get_${component}_config()as needed - Dependencies: Update file dependencies if required
The cache system provides project-aware isolation:
# Cache git operations
if [[ "${STATUSLINE_CACHE_LOADED:-}" == "true" ]]; then
result=$(cache_git_operation "operation_key" "$duration" git command)
fiCache Key Sanitization: Paths with dots are automatically sanitized to prevent arithmetic errors.
-
Run Statusline:
echo '{"workspace": {"current_dir": "/your/path"}}' | ./statusline.sh
-
Debug Mode: Set environment variables for debugging:
export STATUSLINE_DEBUG=true -
Component Testing: Test individual components by sourcing them and calling functions
-
Feature Branches: Create feature branches for major changes
git checkout -b feature/new-component
-
Commit Messages: Follow conventional commit format:
β¨ feat: Add new component π fix: Fix cache issue π docs: Update README -
Testing: Test thoroughly before merging to main
- Default Values: Always provide sensible defaults in component functions
- Validation: Validate configuration values before use
- Backwards Compatibility: Maintain compatibility when changing config structure
- Documentation: Document new configuration options in Config.toml
- Caching: Use caching for expensive operations (git, network calls)
- Timeouts: Set appropriate timeouts for external commands
- Conditional Loading: Only load components when enabled
- Efficient Rendering: Minimize string operations in render functions
-
Missing Commit Count:
- Check cache key sanitization for paths with dots
- Verify git repository status
- Check
get_commits_today()function
-
MCP Status Unknown:
- Verify MCP servers are configured in project directory
- Check MCP detection is running from correct directory
- Validate timeout settings
-
Color/Formatting Issues:
- Check ANSI escape code syntax
- Verify theme configuration
- Test color support in terminal
-
Component Not Showing:
- Verify component is registered
- Check component is enabled in config
- Validate display line configuration
# Test individual components
source lib/components/component_name.sh
collect_component_data
render_component
# Check git operations
source lib/git.sh
get_commits_today
get_git_branch
get_git_flow_branch_type
get_git_file_changes
# Verify cache operations
source lib/cache.sh
show_cache_stats# Clear cache if issues persist
rm -rf ~/.cache/statusline/
# Check cache stats
echo '{"workspace": {"current_dir": "/path"}}' | STATUSLINE_DEBUG=true ./statusline.sh- Fork the repository
- Create a feature branch
- Make changes following the development guide
- Test thoroughly
- Submit a pull request with clear description
This project is part of the Claude Code ecosystem. See main Claude Code documentation for licensing information.
