A rich, colorful status line for Claude Code that shows model info, context usage, git branch, and more — right in your terminal.
| Section | Example | Description |
|---|---|---|
| Model | Opus 4.6 (1M context) | Active model display name |
| Context bar | ⣿⣿⣿⣀⣀⣀⣀⣀ | Braille progress bar with amber→orange→rust truecolor gradient |
| Usage | 3% 34K/1000K | Context window percentage and token counts |
| Branch | main | Current git branch (read from .git/HEAD — no subprocess) |
- Truecolor gradient progress bar using braille characters (⣿ filled, ⣀ empty)
- Git branch displayed — reads .git/HEAD directly for zero-overhead detection
- Compact token display — shows 34K/1000K instead of raw numbers
- Zero dependencies beyond bash and jq
-
Save statusline.sh to ~/.claude/statusline.sh and make it executable: chmod +x ~/.claude/statusline.sh
-
Add this to your ~/.claude/settings.json: { "statusLine": { "type": "command", "command": "bash -c '$HOME/.claude/statusline.sh'" } }
-
Restart Claude Code — the status line appears at the bottom of the TUI.
Claude Code pipes a JSON blob to the status line command via stdin on every render. The script reads it with jq to extract:
- context_window.context_window_size — max context tokens
- context_window.current_usage — input, cache creation, and cache read tokens
- model.display_name / model.id — active model
- cwd — working directory (used for branch detection)
The git branch is detected by reading ${cwd}/.git/HEAD directly — a single file read with no subprocess overhead. The gradient is computed in pure bash arithmetic — no external color libraries needed.
- Bar width: Change bar_width=8 to make the progress bar wider/narrower
- Colors: Edit the r1,g1,b1 / r2,g2,b2 / r3,g3,b3 RGB values for a different gradient