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
Fable 5 · 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. Fable 5). 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)
Fable 5 · 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)
Fable 5 · 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)
Fable 5 · 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)
Fable 5 · 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.
Codex CLI
Why there is no Codex statusline
Claude Code lets you point statusLine at any command and renders its stdout. Codex has no equivalent — its tui.status_line is an ordered list of built-in footer identifiers, not a script to run, so nothing can inject custom content into the Codex footer. CCM reads Codex's own session rollout files instead and surfaces the same data as a command. It never writes to ~/.codex.
$ ccm codex status
Codex Usage
  Plan:        plus
  Model:       gpt-5.6-sol
  Rate limit:  42.5% used (10080 min window)
  Resets at:   2026-08-13 12:15
  Context:     163K / 258K (63%)
  Session:     194.6M (cumulative, incl. cache reads)
  Credits:     390.47
Context is the last turn measured against the model's window — what actually fills it. Session is cumulative spend for the whole session and is dominated by cache reads, so it routinely exceeds the context window. Conflating the two is the easy mistake here.
Where else Codex shows up
$ ccm watch status
  ...
  Codex
    Rate limit: 42.5% used (plan: plus)
$ ccm doctor
  [ok] Codex CLI               Detected — rate limit 42.5% used
Both stay completely silent when Codex isn't installed, and the doctor line never counts toward the issue total — a busy Codex plan is not a CCM health problem.
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.