claude-statusline-pro
v1.2.0
Published
π¨ Beautiful customizable statusline for Claude Code β progress bars, icons, git, MCP tracking, usage limits, session stats
Maintainers
Readme
claude-statusline-pro
π¨ Beautiful, customizable statusline for Claude Code β progress bars, icons, git, MCP tracking, usage limits, and session stats.
π§ Opus 4.6 β’ π ββββββββββ 37% β’ β± ββββββββββ 23% β»2h 15m β’ π
ββββββββββ 41% β»2d 4h β’ π my-project β’ πΏ main
π€ 3 agents β’ π§ 326/724 tools β’ π 11 files β’ π 6 MCPs β’ β
94% ok β’ πΎ 138.5M cacheFeatures
- π¨ Configurable colors with thresholds (green / yellow / red based on usage)
- π Progress bars for context, 5h & 7d usage limits
- β³ Countdown timers to next reset (no more guessing when weekly resets)
- πΏ Git branch detection (walks up directories)
- π§ Tools tracking β used in project / unique tools available globally
- π€ Subagent counter (Task tool invocations)
- π Unique files edited (Edit/Write/MultiEdit, dedup)
- π Active MCP servers count
- β Success rate of tool calls
- πΎ Cache read tokens (see your caching savings)
- πΎ Persistent stats β aggregated across all sessions in a project
- π°οΈ Cached rate limits β keep showing 5h/7d even after terminal restart
- π Cross-platform β Windows, macOS, Linux (no external deps beyond Node)
Install
npx claude-statusline-pro installThen restart Claude Code.
To remove:
npx claude-statusline-pro uninstallCommands
claude-statusline-pro install # Wire into ~/.claude/settings.json
claude-statusline-pro uninstall # Remove from ~/.claude/settings.json
claude-statusline-pro init # Create default config at ~/.claude/statusline-pro.json
claude-statusline-pro preview # Preview with sample data
claude-statusline-pro help # Show helpCustomize
Run npx claude-statusline-pro init to create ~/.claude/statusline-pro.json.
You can also set CLAUDE_STATUSLINE_CONFIG=/path/to/your/config.json to use a custom location.
All options
{
// Which sections to show β toggle any off
"show": {
"model": true,
"context": true,
"usage5h": true,
"usage7d": true,
"directory": true,
"gitBranch": true,
"agents": true,
"tools": true,
"files": true,
"mcps": true,
"successRate": true,
"cache": true
},
// Color thresholds (%)
"thresholds": {
"warning": 60, // Yellow above this
"critical": 85 // Red above this
},
// Colors β any of: red, green, yellow, blue, magenta, cyan, gray, white
"colors": {
"normal": "green",
"warning": "yellow",
"critical": "red",
"model": "cyan",
"directory": "magenta",
"gitBranch": "green",
"agents": "blue",
"tools": "yellow",
"files": "cyan",
"mcps": "green",
"cache": "magenta",
"successGood": "green",
"successMid": "yellow",
"successBad": "red"
},
// Progress bar style
"bar": {
"width": 10,
"fillChar": "β",
"emptyChar": "β",
"emptyColor": "gray"
},
// Disable all icons, or customize each one
"iconsEnabled": true,
"icons": {
"model": "π§ ",
"context": "π",
"usage5h": "β± ",
"usage7d": "π
",
"directory": "π",
"gitBranch": "πΏ",
"agents": "π€",
"tools": "π§",
"files": "π",
"mcps": "π",
"successRate": "β
",
"cache": "πΎ",
"resetArrow": "β»"
},
// Separator between sections
"separator": " β’ ",
// Countdown format: "full" β "2d 4h", "short" β "2d", "hms" β "2d4h0m"
"countdownFormat": "full",
// Label shown before the countdown (e.g. "reset in ", "β»", "β ")
"resetLabel": "reset in ",
// Token format: "short" β "1.2k", "full" β "1,200"
"tokenFormat": "short",
// Stats aggregation: "project" (current project) or "global" (all projects)
"statsScope": "project",
// Responsive: hide sections progressively when terminal is too narrow.
// Items appearing LATER in `priority` are hidden FIRST.
// maxWidth: 0 = auto-detect, -1 = disable responsive, >0 = force width
"responsive": {
"enabled": true,
"priority": [
"model", "context", "usage5h", "usage7d", "directory", "gitBranch",
"agents", "tools", "files", "mcps", "successRate", "cache"
],
"maxWidth": 0, // 0 = auto-detect, -1 = disable
"rightReserve": 5 // chars reserved on the right for Claude Code UI
},
// Section order & visibility (sections not listed are hidden)
"line1": ["model", "context", "usage5h", "usage7d", "directory", "gitBranch"],
"line2": ["agents", "tools", "files", "mcps", "successRate", "cache"]
}Example: minimal single line
{
"show": { "agents": false, "tools": false, "files": false, "mcps": false, "successRate": false, "cache": false },
"line1": ["model", "context", "usage5h", "usage7d"],
"line2": []
}Example: powerline-style without icons
{
"iconsEnabled": false,
"separator": " β ",
"bar": { "fillChar": "β°", "emptyChar": "β±" }
}What the sections show
| Section | Meaning | |---|---| | π§ model | Current Claude model name | | π context | Context window usage % | | β± usage5h | Rolling 5h quota usage + countdown to reset | | π usage7d | Rolling 7d quota usage + countdown to reset (Pro/Max only) | | π directory | Current project folder | | πΏ gitBranch | Active git branch (walks up directories) | | π€ agents | Task tool invocations (subagents spawned) | | π§ tools | Tools invoked in project / unique tools known globally | | π files | Unique files edited (Edit/Write/MultiEdit) | | π mcps | Active MCP servers (configured across all sources) | | β successRate | Tool success ratio (errors vs OK) | | πΎ cache | Total cache read tokens (cumulative session tokens saved by cache) |
Troubleshooting
The statusline doesn't appear after install. Fully quit Claude Code and relaunch. A /reload won't pick up the new statusLine config.
Icons render as boxes. Your terminal needs an emoji-capable font. Windows Terminal and iTerm2 handle them by default. Or set iconsEnabled: false.
Output wraps over multiple lines on a narrow terminal. That's the terminal, not the statusline. Widen the window or hide some sections.
Stats reset after restarting Claude Code. They shouldn't β they aggregate across all .jsonl transcripts in ~/.claude/projects/<sanitized-cwd>/. If you're seeing resets, check that transcript_path points to the right place.
How it works
Claude Code invokes the statusline command after each assistant message, passing a JSON payload via stdin. The script reads:
- Live data from stdin (model, rate limits, context usage)
- Aggregated stats from
~/.claude/projects/<project>/JSONL transcripts - MCP configuration from
~/.claude.json,~/.mcp.json, and<project>/.mcp.json - Cached rate limits from
~/.claude/statusline-cache/rate-limits.json(for early-session display) - Git state by walking parent directories for
.git/HEAD
See the Claude Code statusline docs for the full input schema.
License
MIT Β© lemale237
