A two-line, pace-aware statusline for Claude Code. Pure Bash — no jq, no Node, no daemon, no network calls, zero external commands on the hot path.
Opus 4.8 (200K) high | my-project (main) 7f +180 -59
███████░░░ 78% 200K | 5h 42% ⇣18% 2h 7d 66% ⇡9% 3d
Line 1 — model · context-window size · reasoning effort (plus ⚡ when fast mode is on) · project · branch · git stats (files changed, lines added/removed, including untracked files).
Line 2 — context-use bar · percent used · window size · then your 5-hour and 7-day quota windows.
The quota sections are the point. Each shows:
- used %, colored green / yellow (≥70%) / red (≥90%);
- a pace delta —
⇡means you're burning quota faster than the window is elapsing,⇣means you have surplus.⇡4%means you're 4 points ahead of where even consumption would put you; - a countdown to the window reset (
3d,2h,45m).
So 5h 42% ⇣18% 2h reads: 42% of the 5-hour window used, 18 points under an even burn rate, resets in 2 hours. You're comfortable. 5h 88% ⇡31% 3h means slow down.
Both lines align their | divider regardless of model name length.
If Claude Code doesn't report rate-limit data in a given session, the quota sections show -- and line 2 appends session cost instead.
If CLAUDE_CODE_AUTO_COMPACT_WINDOW is set, the bar measures distance to compaction rather than to the model's full context window, and the label changes to match — so the bar reflects when you'll actually get compacted.
Bash. That's it. Tested on Linux; targets macOS and Windows Git Bash.
A statusline renders constantly, so every subprocess counts — especially on
Windows Git Bash, where each fork costs tens of milliseconds. This script runs
zero external commands on the warm path: stdin is read with the builtin
read, the JSON payload is parsed with bash ERE regexes, timestamps come from
$EPOCHSECONDS, and git-stat cache freshness is an epoch embedded in the cache
record rather than a stat call. Git commands only run when the 5-second
per-repo cache is stale, and untracked-file line counts are batched into one
wc call instead of one per file. A warm render is ~4ms of wall clock on a
modest Linux box.
The no-jq parser is deliberately scoped: the payload is machine-generated by
Claude Code, extractions are anchored to their parent JSON blocks (three
different used_percentage fields exist), and every miss degrades to a
placeholder (--, ?) rather than an error. test/statusline-test.sh covers
the payload variants; the parser was verified byte-for-byte against the jq
implementation it replaced.
/plugin marketplace add dromsak/claude-statusline
/plugin install claude-statusline@claude-statusline
Then run /statusline. It copies the script to ~/.claude/statusline-pace.sh and points your statusLine setting there.
The copy is deliberate: the plugin cache directory is content-hashed, so its path changes on every marketplace update. Pointing statusLine into it would break on the next update. After a /plugin marketplace update claude-statusline, re-run /statusline to pick up the newer script.
If you'd rather skip the plugin system, copy skills/statusline/statusline.sh anywhere, chmod +x it, and add to ~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "/absolute/path/to/statusline.sh",
"padding": 0
}The path must be absolute and ~-expanded — the command runs raw, with no shell expansion.
Point statusLine.command back at whatever it was before, or delete the statusLine block from ~/.claude/settings.json.
- Git stats are cached under
${XDG_RUNTIME_DIR:-~/.cache}/claude-statusline, per repo, with a short TTL. The directory is deliberately not shared with upstream claude-pace — the record formats differ, and co-installed versions would corrupt each other's caches. Caching is disabled entirely if no user-owned, non-symlinked directory is available rather than falling back to shared/tmp. - Everything is measured in display columns, not bytes, so the bar and divider stay aligned in non-UTF-8 locales.
Forked from claude-pace v0.9.1 by yuhan (Astro-Han), MIT-licensed. This fork has diverged — Windows alignment and project-name fixes, fewer subprocess forks per render, corrected git-stat scoping, and a safer cache path. It is not an official claude-pace release; please report issues here rather than upstream.
MIT — see LICENSE for both copyright notices.