A statusline for Claude Code.
One bash script. It shows your folder and branch, the model, how full the context window is, and how much of your 5-hour, 7-day and Fable limits you have used — as bars, under the prompt, while you work.
> Install the statusline from https://github.com/alp82/claude-statusline for me.
Run: curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash
Then check that bash, jq and curl are present, confirm ~/.claude/settings.json
points statusLine at ~/.claude/statusline.sh, and tell me what to do next.
Usage against time
The top half of each cell is how much of the window you have used. The bottom half is how much of the window has gone by. The distance between the two is the number to read. Spend ahead of the clock and you run out before it resets, so drop an effort level. Spend behind it and you can afford to think harder.
The row underneath is the record: which effort level you were on across each tenth of the window. Here it runs high, crosses the clock, then drops to low and the clock catches back up.
Context window
Turns yellow at 25% and red at 50% — sooner than the limit bars, because a full context window stops you working right away. The bar fills in eighths of a character, so it moves before the number does.
When a window resets
At the end of a 5-hour window both halves drop back to zero, the colour goes back to green, and the countdown starts again at 5h0m.
The Fable window
Fable has its own weekly quota. Spend it early and nothing gives it back before the week is over, so the blue half is the useful one: it tells you how long the wait is. The window resets with the 7-day one, which is why it shows no ↻ of its own.
Claude Code does not send this one. The script reads it from ~/.claude.json and only asks the API for a fresh value in the background, at most every ten minutes.
What is on the line
The context window, then the 5-hour, 7-day and Fable windows — each one a label, a bar and a number. Your folder, branch and model sit further left, at the start of the line.
Install
Paste one prompt into Claude Code. It installs the script, wires Claude Code up to it, and checks the result.
> Install the statusline from https://github.com/alp82/claude-statusline for me.
Run: curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash
Then check that bash, jq and curl are present, confirm ~/.claude/settings.json
points statusLine at ~/.claude/statusline.sh, and tell me what to do next.
$ curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash
statusline.sh
into ~/.claude/, makes it executable and points
settings.json at it — backing up anything it replaces. Re-run it to
upgrade. --no-settings installs the script only; --help has
the rest.$ curl -fsSL https://raw.githubusercontent.com/alp82/claude-statusline/main/statusline.sh \
-o ~/.claude/statusline.sh
$ chmod +x ~/.claude/statusline.sh
// ~/.claude/settings.json { "statusLine": { "type": "command", "command": "~/.claude/statusline.sh" } }
--no-settings.Needs bash, jq and curl. Claude Code sends the script JSON on stdin; the Fable number is the only thing the script fetches itself, in the background and throttled to once every ten minutes.
The same prompt in reverse. It removes the script and the
statusLine entry, and leaves a backup of each.
> Uninstall the statusline from https://github.com/alp82/claude-statusline for me.
Run: curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash -s -- --uninstall
Then confirm ~/.claude/statusline.sh is gone and ~/.claude/settings.json no longer
has a statusLine entry, and show me which .bak files it left behind.
$ curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash -s -- --uninstall
~/.claude/statusline.sh and drops the
statusLine entry from settings.json, backing up both as
.bak first, and clears the cached usage numbers. It touches nothing
else in settings.json, and leaves the entry alone if it points at
someone else's statusline. --no-settings removes the script only.Nothing else to undo — the only state the statusline keeps is the Fable
number it caches under ~/.claude/cache/, and that goes with it. Delete the
.bak files once you are sure you want them gone.