A high-performance Claude Code status line tool maintained by fishxcode, 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 from the public npm registry (works on all platforms and is the recommended option for most users):
# Install globally
npm install -g @fishxcode/ccline
# Or using yarn
yarn global add @fishxcode/ccline
# Or using pnpm
pnpm add -g @fishxcode/cclineUse npm mirror for faster download:
npm install -g @fishxcode/ccline --registry https://registry.npmmirror.comFishXCode CCLINE is published through multiple distribution channels:
- npmjs: recommended for normal users and direct global installation
- GitHub Packages: useful if you prefer GitHub-hosted package distribution
- GitHub Releases: direct binary downloads for manual installation
Install from GitHub Packages:
npm config set @fishxcode:registry https://npm.pkg.github.com
npm install -g @fishxcode/cclineIf the package is private in your GitHub Packages setup, you will also need a GitHub token with package read access.
After 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:
Cross-Platform (Recommended)
{
"statusLine": {
"type": "command",
"command": "~/.claude/ccline/ccline",
"padding": 0
}
}Note for Windows users: Starting from Claude Code v2.1.47+, Unix-style path parsing is supported on Windows. The
~symbol is automatically expanded to your user home directory. Do not use%USERPROFILE%- it no longer works reliably in v2.1.47+.
- Recommended:
~/.claude/ccline/ccline(works on all platforms)- Alternative:
"ccline"(requires npm global installation)
Fallback (npm installation):
{
"statusLine": {
"type": "command",
"command": "ccline",
"padding": 0
}
}Use this if npm global installation is available in PATH
npm update -g @fishxcode/cclineIf you installed from GitHub Packages, keep the same scoped registry when updating:
npm config set @fishxcode:registry https://npm.pkg.github.com
npm update -g @fishxcode/cclineManual Installation (Click to expand)
Alternatively, download from Releases:
mkdir -p ~/.claude/ccline
wget https://github.com/fishxcode/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/fishxcode/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/fishxcode/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/fishxcode/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/fishxcode/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/fishxcode/CCometixLine.git
cd ccline
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"# 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.js# Show daily successful request counts and totals for the current project
ccline --requests-history
# Show only the most recent 30 days
ccline --requests-history --requests-history-days 30This command reads Claude project history for the current working directory and resolves request stats config in this order:
- nearest ancestor
.claude/settings.json ~/.claude/settings.json- legacy
~/.claude/ccline/config.tomlfallback
The output shows the resolved project root and the config source actually used.
Displays: 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.
FishXCode CCLINE 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, Cost, Session, OutputStyle, Update
The Session segment can now show successful request counts as either its primary or secondary metric, with configurable timezone-aware reset windows.
The recommended place for request stats rules is Claude Code settings JSON instead of ccline TOML:
{
"ccline": {
"requestStats": {
"scope": "project_window",
"resetHour": 8,
"resetMinute": 0,
"timezoneOffsetMinutes": 480
}
}
}You can place that in the current project's .claude/settings.json or in ~/.claude/settings.json.
[[segments]]
id = "session"
enabled = true
[segments.icon]
plain = "⏱️"
nerd_font = ""
[segments.colors]
icon = { c16 = 2 }
text = { c16 = 2 }
[segments.styles]
text_bold = false
[segments.options]
primary_metric = "duration"
secondary_metric = "successful_requests"Available values:
primary_metric/secondary_metric:duration,line_changes,successful_requests,none- JSON request stats config
scope:sessionorproject_window - JSON request stats config
timezoneOffsetMinutes: timezone offset in minutes, so UTC+8 is480
Location: ~/.claude/ccline/models.toml (auto-created on first run)
This file configures how model IDs are displayed and their context window limits. Claude models (Sonnet, Opus, Haiku) are automatically recognized with version extraction — you only need this file for overrides or third-party models.
# Model entries: simple substring matching on the model ID
# These take priority over built-in Claude model recognition
[[models]]
pattern = "glm-4.5"
display_name = "GLM-4.5"
context_limit = 128000
[[models]]
pattern = "kimi-k2"
display_name = "Kimi K2"
context_limit = 128000
# Context modifiers: matched independently and composable with model entries
# Overrides context_limit and appends display_suffix to the display name
# e.g., model "Opus 4" + modifier " 1M" = "Opus 4 1M"
[[context_modifiers]]
pattern = "[1m]"
display_suffix = " 1M"
context_limit = 1000000- 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. The upstream project remains MIT-licensed, so this fork keeps the required copyright and license notice.
