A rich, colorful status line for Claude Code that shows context usage, model info, version update alerts, and more — right in your terminal.
| Section | Example | Description |
|---|---|---|
| Version | 1.0.30 |
Current version with icon; turns red with →1.0.31 suffix when outdated |
| Model | Claude 4.6 Opus |
Active model display name |
| Context bar | ⣿⣿⣿⣿⣀⣀⣀⣀ |
Braille progress bar with amber→orange→rust truecolor gradient |
| Usage | 42% 84K/200K | Context window percentage and token counts |
| Working dir | ~/Projects/myapp |
Shortened cwd (home → ~) |
| Session | a1b2c3d4 |
First 8 chars of session ID |
- Truecolor gradient progress bar using braille characters (
⣿filled,⣀empty) - Version update check — polls npm registry every 30 min (cached in
/tmp) - Compact token display — shows
84K/200Kinstead of raw numbers - Zero dependencies beyond
bashandjq
-
Save
statusline.shto~/.claude/statusline.shand 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 tokenscontext_window.current_usage— input, cache creation, and cache read tokensmodel.display_name/model.id— active modelversion— current CLI versioncwd— working directorysession_id— current session
The gradient is computed in pure bash arithmetic — no external color libraries needed.
- Bar width: Change
bar_width=8to make the progress bar wider/narrower - Colors: Edit the
r1,g1,b1/r2,g2,b2/r3,g3,b3RGB values for a different gradient - Cache duration: Adjust
cache_max_age=1800(seconds) for version check frequency