A high-performance Claude Code statusline tool written in Rust with Git integration, usage tracking, interactive TUI configuration, and Claude Code enhancement utilities.
The statusline shows: Model | Directory | Git Branch Status | Context Window Information
- Git integration with branch, status, and tracking info
- Model display with simplified Claude model names
- Usage tracking based on transcript analysis
- Directory display showing current workspace
- Minimal design using Nerd Font icons
- Interactive main menu when executed without input
- TUI configuration interface with real-time preview
- Theme system with multiple built-in presets
- Segment customization with granular control
- Configuration management (init, check, edit)
- Context warning disabler - Remove annoying "Context low" messages
- Verbose mode enabler - Enhanced output detail
- Robust patcher - Survives Claude Code version updates
- Automatic backups - Safe modification with easy recovery
Install via npm (works on all platforms):
# Install globally
npm install -g @cometix/ccline
# Or using yarn
yarn global add @cometix/ccline
# Or using pnpm
pnpm add -g @cometix/cclineUse npm mirror for faster download:
npm install -g @cometix/ccline --registry https://registry.npmmirror.comAfter installation:
- ✅ Global command
cclineis available everywhere - ⚙️ Follow the configuration steps below to integrate with Claude Code
- 🎨 Run
ccline -cto open configuration panel for theme selection
Add to your Claude Code settings.json:
Linux/macOS:
{
"statusLine": {
"type": "command",
"command": "~/.claude/ccline/ccline",
"padding": 0
}
}Windows:
{
"statusLine": {
"type": "command",
"command": "%USERPROFILE%\\.claude\\ccline\\ccline.exe",
"padding": 0
}
}Fallback (npm installation):
{
"statusLine": {
"type": "command",
"command": "ccline",
"padding": 0
}
}Use this if npm global installation is available in PATH
npm update -g @cometix/cclineManual Installation (Click to expand)
Alternatively, download from Releases:
mkdir -p ~/.claude/ccline
wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-linux-x64.tar.gz
tar -xzf ccline-linux-x64.tar.gz
cp ccline ~/.claude/ccline/
chmod +x ~/.claude/ccline/cclineRequires: Ubuntu 22.04+, CentOS 9+, Debian 11+, RHEL 9+ (glibc 2.35+)
mkdir -p ~/.claude/ccline
wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-linux-x64-static.tar.gz
tar -xzf ccline-linux-x64-static.tar.gz
cp ccline ~/.claude/ccline/
chmod +x ~/.claude/ccline/cclineWorks on any Linux distribution (static, no dependencies)
mkdir -p ~/.claude/ccline
wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-macos-x64.tar.gz
tar -xzf ccline-macos-x64.tar.gz
cp ccline ~/.claude/ccline/
chmod +x ~/.claude/ccline/cclinemkdir -p ~/.claude/ccline
wget https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-macos-arm64.tar.gz
tar -xzf ccline-macos-arm64.tar.gz
cp ccline ~/.claude/ccline/
chmod +x ~/.claude/ccline/ccline# Create directory and download
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\ccline"
Invoke-WebRequest -Uri "https://github.com/Haleclipse/CCometixLine/releases/latest/download/ccline-windows-x64.zip" -OutFile "ccline-windows-x64.zip"
Expand-Archive -Path "ccline-windows-x64.zip" -DestinationPath "."
Move-Item "ccline.exe" "$env:USERPROFILE\.claude\ccline\"git clone https://github.com/Haleclipse/CCometixLine.git
cd CCometixLine
cargo build --release
# Linux/macOS
mkdir -p ~/.claude/ccline
cp target/release/ccometixline ~/.claude/ccline/ccline
chmod +x ~/.claude/ccline/ccline
# Windows (PowerShell)
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\ccline"
copy target\release\ccometixline.exe "$env:USERPROFILE\.claude\ccline\ccline.exe"If you're running a forked version with the latest changes, you'll need to rebuild and reinstall after pulling updates:
# Navigate to your forked repository
cd /path/to/your/CCometixLine
# Pull latest changes
git pull
# Rebuild the binary
cargo build --release
# Install to local directory (recommended for testing)
# Linux/macOS
cp target/release/ccometixline ~/.claude/ccline/ccline
# Or install to system location (if using Homebrew path)
# macOS
cp target/release/ccometixline /opt/homebrew/bin/ccline
# Or install to system location
# Linux
sudo cp target/release/ccometixline /usr/local/bin/ccline
# Verify version
ccline --versionAfter updating the binary, if you've added new segments or themes:
- Remove old theme cache:
rm -rf ~/.claude/ccline/themes - Reinitialize if needed:
ccline --init - Use TUI configurator to enable new segments:
ccline -c
Note: The binary name in the repository is ccometixline, but it's renamed to ccline for convenience.
# Initialize configuration file
ccline --init
# Check configuration validity
ccline --check
# Print current configuration
ccline --print
# Enter TUI configuration mode
ccline --config# Temporarily use specific theme (overrides config file)
ccline --theme cometix
ccline --theme minimal
ccline --theme gruvbox
ccline --theme nord
ccline --theme powerline-dark
# Or use custom theme files from ~/.claude/ccline/themes/
ccline --theme my-custom-theme# Disable context warnings and enable verbose mode
ccline --patch /path/to/claude-code/cli.js
# Example for common installation
ccline --patch ~/.local/share/fnm/node-versions/v24.4.1/installation/lib/node_modules/@anthropic-ai/claude-code/cli.jsDisplays: Directory | Git Branch Status | Model | Context Window
- Branch name with Nerd Font icon
- Status:
✓Clean,●Dirty,⚠Conflicts - Remote tracking:
↑nAhead,↓nBehind
Shows simplified Claude model names:
claude-3-5-sonnet→Sonnet 3.5claude-4-sonnet→Sonnet 4
Token usage percentage based on transcript analysis with context limit tracking.
Three usage tracking segments are available for monitoring Claude API usage:
Usage (Original) - Shows combined usage info:
- Displays 5-hour usage percentage
- Shows 7-day reset date in compact format
- Format:
24% · 10-7-2(24% used, resets Oct 7 at 2am)
Usage (5-hour) - Focused 5-hour window:
- Shows 5-hour usage percentage with reset time
- Format:
24% → 11am - Ideal for monitoring short-term API limits
Usage (7-day) - Weekly usage tracking:
- Shows 7-day usage percentage with full reset datetime
- Format:
12% → Oct 9:5am - Perfect for tracking weekly quota
All usage segments:
- Share the same API call and cache (efficient)
- Use dynamic circle icons that change with utilization level
- Are disabled by default (enable via config or TUI)
- Auto-convert reset times from UTC to local timezone
- Support threshold-based warning colors (see below)
CCometixLine supports full configuration via TOML files and interactive TUI:
- Configuration file:
~/.claude/ccline/config.toml - Interactive TUI:
ccline --configfor real-time editing with preview - Theme files:
~/.claude/ccline/themes/*.tomlfor custom themes - Automatic initialization:
ccline --initcreates default configuration
All segments are configurable with:
- Enable/disable toggle
- Custom separators and icons
- Color customization
- Format options
Supported segments: Directory, Git, Model, ContextWindow, Usage, Usage5Hour, Usage7Day, Cost, Session, OutputStyle, Update
Usage segments (Usage5Hour and Usage7Day) support dynamic color changes based on utilization thresholds. This allows you to get visual warnings when your API usage approaches limits.
Configuration example:
[[segments]]
id = "usage_5hour"
enabled = true
[segments.colors]
# Default colors (used when under warning threshold)
icon.c16 = 14 # Cyan
text.c16 = 14
[segments.options]
warning_threshold = 60 # Turn yellow at 60% usage
critical_threshold = 80 # Turn red at 80% usage
warning_color.c16 = 11 # Yellow (16-color palette)
critical_color.c16 = 9 # Red (16-color palette)How it works:
- < 60%: Uses default segment colors (cyan)
- ≥ 60%: Text changes to warning color (yellow)
- ≥ 80%: Text changes to critical color (red)
You can customize thresholds and colors for each usage segment independently. The colors can be specified using:
c16: 16-color ANSI palette (0-15)c256: 256-color palette (0-255)- RGB values (e.g.,
{r = 255, g = 165, b = 0})
Common color codes:
- Yellow:
c256 = 226orc16 = 11 - Red:
c256 = 196orc16 = 9 - Orange:
c256 = 208orc256 = 214
- Git: Version 1.5+ (Git 2.22+ recommended for better branch detection)
- Terminal: Must support Nerd Fonts for proper icon display
- Install a Nerd Font (e.g., FiraCode Nerd Font, JetBrains Mono Nerd Font)
- Configure your terminal to use the Nerd Font
- Claude Code: For statusline integration
# Build development version
cargo build
# Run tests
cargo test
# Build optimized release
cargo build --release- TOML configuration file support
- TUI configuration interface
- Custom themes
- Interactive main menu
- Claude Code enhancement tools
Contributions are welcome! Please feel free to submit issues or pull requests.
- tweakcc - Command-line tool to customize your Claude Code themes, thinking verbs, and more.
This project is licensed under the MIT License.
