A powerline-style statusline for Claude Code, themed with Catppuccin Macchiato. Backgrounds are darkened for dark terminals; the accent foregrounds stay bright so they read well.
It shows the directory, git status, model, context-window usage, session cost, rate-limit budget, turn count, and time. Each sits in its own colored segment, and the usage segments change color as they fill up.
jqis required. The script parses Claude Code's JSON input withjq. Without it the statusline renders blank.- macOS:
brew install jq. Debian/Ubuntu:apt install jq.
- macOS:
- A Nerd Font is recommended. The segment icons are Material Design Icon glyphs from the Nerd Font range. Without a Nerd Font the statusline still works (text, colors, and percentages are all correct), but the icons show as missing-glyph boxes (□). Install any Nerd Font and select it in your terminal, or turn the icons off (see below).
Set STATUSLINE_ICONS=0 for a plain-text fallback with no glyphs and no boxes. The segments whose meaning isn't obvious get short text labels instead (ctx 82%, 5h 51%, turns 14); the rest read fine on their own. Add it to the command in settings.json:
{
"statusLine": {
"type": "command",
"command": "STATUSLINE_ICONS=0 bash /Users/you/.claude/statusline.sh"
}
}From a clone of this repo, run the installer. It copies the script into your Claude config directory and merges the statusLine block into settings.json without touching your other settings:
./install.shBefore overwriting anything, it backs up the file with a timestamped .bak copy: both settings.json and any existing statusline.sh at the destination. It also validates settings.json first and refuses to overwrite a different statusLine you already have unless you pass --force. Use --no-icons if your terminal has no Nerd Font, or --dir DIR for a non-default config directory. Run ./install.sh --help for details.
-
Save
statusline.shsomewhere, e.g.~/.claude/statusline.sh, and make it executable:chmod +x ~/.claude/statusline.sh -
Add the
statusLineblock to your~/.claude/settings.json, pointing at wherever you saved the script. Use an absolute path:{ "statusLine": { "type": "command", "command": "bash /Users/you/.claude/statusline.sh" } } -
Submit any input in Claude Code. The statusline re-runs every turn and picks up the change.
| Segment | Meaning |
|---|---|
name |
Current directory (basename) |
branch |
Git branch. + means staged changes, * means unstaged or untracked. |
model |
Active model, with the version suffix stripped |
NN% |
Context-window used. Green below 50, yellow from 50, red from 80. |
$N.NN |
Session cost in USD |
⏱ NN% |
5-hour rate-limit budget used. Blue, yellow from 50, red from 80. |
N |
Conversation turn count |
HH:MM |
Current time |
Percentages are truncated, not rounded (82.9% shows as 82%), so a value never crosses a color threshold before it actually does.
- Colors sit near the top of the script as
fg_*andbg_*RGB triples (Catppuccin Macchiato). Swap them for another palette. - Thresholds for the context and rate-limit colors are the
-ge 80and-ge 50tests. - Icons are Material Design Icon glyphs, defined in the
i_*variables near the bottom of the script. Replace any glyph there, or setSTATUSLINE_ICONS=0to drop them all for plain text.
MIT
