Claude Code Statusline

A smart status bar that shows everything you need at a glance. No dependencies. One command install.

$ curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bash
Annotated Example
Opus 4.7 · high · refactor-auth
▓▓▓░░░░░░░ 33% · 326K tokens · $54.57 · 1h33m · 4K/m · +156 -23 · 5hr: 23% ↻16:30 · 7d: 41% ↻Mon
…darshan/Personal/projects/ccm · main · v1.0.80
personal (darshan@gmail.com) · 3 accounts ·
1
Model
Display name of the active model (e.g. Opus 4.7). Hidden when Claude Code does not report a model.
2
Reasoning Effort
Current /effort level: low (dim), medium (green), high (yellow), xhigh/max (red). Hidden when the model does not support reasoning effort.
3
Session Name
Custom session name set via --name or /rename. Disambiguates parallel sessions. Hidden when no custom name is set.
4
Context Window
Visual bar + percentage. Green <70%, yellow 70-89%, red 90%+. Shows how full your context is.
5
Token Count
Total tokens in context (input + cache). Matches Claude Code's own token display. Formatted as K/M.
6
Session Cost
Cumulative USD cost for this session. Resets when you start a new conversation.
7
Session Duration
How long this session has been running. Formatted as Xs, Xm, or XhXm.
8
Burn Rate
Average tokens consumed per minute. Helps predict when you'll hit rate limits or need to compact.
9
Lines Added / Removed
Total lines of code added (green +) and removed (red -) by the session. Hidden until the session has actually changed code.
10
5-Hour Rate Limit
Pro/Max plan rolling window usage. Shows reset time. Color-coded: green <60%, yellow 60-79%, red 80%+.
11
7-Day Rate Limit
Max plan weekly cap. Only appears for Max subscribers. Shows when the window resets.
12
Project Directory
Current working directory, truncated to 30 chars with ~ for home. Quick project identification.
13
Git Branch
Current branch name. Essential for multi-branch workflows and code review.
14
Claude Code Version
Running version of Claude Code. Useful for debugging or checking if an update is needed.
15
Active Account
Shows alias + email when you have 2+ managed accounts via CCM. Hidden for single-account users.
16
Account Health
Green ● healthy, yellow ● degraded, red ● unhealthy. Quick credential status check.
Adaptive Scenarios
Single account user (2 lines)
Opus 4.7 · high · refactor-auth
▓▓▓▓░░░░░░ 45% · 200K tokens · $3.21 · 30m · 7K/m · +156 -23
~/Projects/my-app · feat/auth · v1.0.80
No account line — clean 2-line display. No rate limits for API key users.
Pro/Max user with rate limits (2 lines)
Opus 4.7 · high · refactor-auth
▓▓▓░░░░░░░ 31% · 326K tokens · $54.57 · 1h33m · 4K/m · +156 -23 · 5hr: 23% ↻16:30 · 7d: 41%
…darshan/Personal/projects/ccm · main · v1.0.80
Rate limits appear automatically for Pro/Max plans. Green = safe, yellow = caution, red = near limit.
Context warning — consider compacting (2-3 lines)
Opus 4.7 · high · refactor-auth
▓▓▓▓▓▓▓▓░░ 82% · 1.4M tokens · $23.45 · 2h15m · 10K/m · +156 -23 · 5hr: 82% ↻17:00
…rs/darshan/AI/sozo-ai-chatbot · main · v1.0.80 · ⚠ /compact
At 80%+ context, a ⚠ /compact warning appears. Quality degrades before auto-compact at ~85%.
Critical — near limits (3 lines, multi-account)
Opus 4.7 · high · refactor-auth
▓▓▓▓▓▓▓▓▓░ 92% · 1.8M tokens · $67.89 · 4h0m · 8K/m · +156 -23 · 5hr: 91% ↻18:30 · 7d: 73%
…rs/darshan/AI/sozo-ai-chatbot · main · v1.0.80 · ⚠ /compact
work (darshan@company.com) · 3 accounts ·
Everything red. Time to /compact, switch accounts, or wait for the 5hr window to reset at 18:30.
Install / Uninstall
# Install (one command)
$ curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bash
# Uninstall
$ rm ~/.claude/ccm-statusline.sh
Requires: jq, bash. Works on macOS, Linux, WSL. Restart Claude Code after install.