One bash script. Each limit bar shows two things: how much you have used, and how much time has passed. If usage is ahead of time, drop an effort level. If it is behind, you can raise it. Your folder, branch, model, effort and context window sit on the same line, under the prompt.
One prompt does both. Paste it into Claude Code the first time to install the statusline, and paste the same prompt again any time you want the latest version. Claude installs or replaces the scripts, updates the settings, and checks the result.
Install or update 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 subagentStatusLine at
~/.claude/subagent-statusline.sh, and tell me what to do next.
Claude reads the installer before it runs it and tells you what changed.
Or run the installer yourself
The same script without the agent. It installs the statusline, and updates it if you already have it:
curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bashIt puts statusline.sh and subagent-statusline.sh into ~/.claude/, makes
them executable, and points settings.json at them. It copies anything it
replaces to <file>.bak first. Run it again to upgrade. --no-settings
installs the scripts only. --help lists all options.
Or install it by hand
Two files, nothing else:
curl -fsSL https://raw.githubusercontent.com/alp82/claude-statusline/main/statusline.sh \
-o ~/.claude/statusline.sh
curl -fsSL https://raw.githubusercontent.com/alp82/claude-statusline/main/subagent-statusline.sh \
-o ~/.claude/subagent-statusline.sh
chmod +x ~/.claude/statusline.sh ~/.claude/subagent-statusline.shThen add this to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh",
"refreshInterval": 5
},
"subagentStatusLine": {
"type": "command",
"command": "~/.claude/subagent-statusline.sh"
}
}refreshInterval re-runs the line every five seconds on top of the usual
event-driven updates. Without it the file and line counts go stale whenever a
subagent writes to the tree while the session is idle, and the ↻ countdowns
only move when something else happens. Raise it on a large repository, where
git status is the slowest part of a render.
The same prompt in reverse:
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 and ~/.claude/subagent-statusline.sh are gone,
confirm ~/.claude/settings.json has no statusLine or subagentStatusLine entry,
and show me which .bak files it left behind.
Or run it yourself
curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash -s -- --uninstallIt removes both scripts from ~/.claude/, the statusLine and
subagentStatusLine entries in settings.json, and the cache under
~/.claude/cache/. It backs up the scripts and settings.json as .bak
first. It changes nothing else, and it leaves an entry alone if it points at
another statusline. --no-settings removes the scripts only.
Two rows, with a blank row between them. The first is the checkout and what has changed in it. The second is the model and the bars.
The first row is laid out space-between: the checkout on the left, what changed pushed right so that its edge lines up with the end of the second row.
claude-statusline ⎇ main 3 mod │ +182 -47
★ Opus 5 1M · max │ Ctx ███░░░░░░░ 28% 90k │ 5h … │ 7d … │ Fable ▀▀░░░░░░░░ 8%
-
dir ⎇ branch — the directory name and the git branch. In a linked git worktree the glyph is an amber
⎇+:claude-statusline ⎇ main ← the main checkout claude-statusline-fix ⎇+ fix/bar ← a linked worktreeThe two share whatever the first row has left after the file and line groups, which on a normal terminal is most of the width. While both fit, neither is shortened. When they do not fit, the branch loses its namespace first, then its tail, then the directory is cut:
claude-statusline ⎇ f/context-win… ← feature/context-window-bar-redesign acme-platform-web… ⎇ a/issue-214… ← alp82/issue-214-truncate-long-namesClaude Code passes the terminal width in
COLUMNS, which requires v2.1.153 or later. Without it the budget is a fixed 64 columns minus the groups. It never falls below 24 columns, however narrow the terminal. To pin it to a fixed number, setSTATUSLINE_LOC_MAX, which overrides both. Widths are measured in terminal columns: a CJK or emoji glyph counts as two. -
3 mod — how many files changed, by kind:
add,mod,del, and?for untracked. The count carries the weight and the color; the label stays gray, so a row of counts reads as numbers first. Staged and unstaged both count. A kind with no files is left out, so a few ordinary edits read3 mod, and a clean tree shows the directory alone. A new directory counts as one untracked entry, the waygit statusreports it. -
+182 -47 — lines added and lines removed against the last commit. Untracked files have no line counts, so a tree holding nothing but new files shows the file kinds and no line counts.
- ★ Model · effort — the active model, shortened (
Opus 5 (1M context)becomesOpus 5 1M), and the reasoning effort:low,med,high,xhi, ormax. A model without an effort setting shows the name alone. - Ctx — how full the context window is, 0–100%, and the token count in thousands
- 5h / 7d — the 5-hour and 7-day rate-limit windows: usage, elapsed time,
and
↻the time until the reset - Fable — the same for the Fable weekly quota. It resets with the 7-day
window, so it shows no
↻of its own
The top half of each bar shows usage. The bottom half shows elapsed time. When the bar turns red, lower the effort level.
At the reset, both halves drop to zero and the countdown restarts at 5h0m.
The bar color compares usage with elapsed time:
- 🟩 quota to spare: raise model or effort
- 🟨 on pace: keep as is
- 🟥 runs out early: lower model or effort
The number color shows usage: 🟩 under 50% · 🟨 50–80% · 🟥 over 80%
The bar turns yellow at 25% and red at 50%. Start a new session at yellow. Answers get worse as the window fills.
Claude Code lists running subagents below the prompt. Each subagent shows its own context bar, model, and effort.
On a narrow panel, the effort column drops first and the model column second. Requires Claude Code v2.1.205 or later.
Fable has its own weekly quota. The limit is usually lower than for other
models, so it gets a glance instead of a track: two columns, your usage beside
the week's clock, and the exact number in the percentage. Fable resets with
the 7-day window, so it shows no ↻ of its own.
Claude Code does not send this value. The script reads it from ~/.claude.json
and refreshes it from the API in the background, at most every ten minutes.
On macOS the refresh reads the OAuth token from the Keychain, because Claude
Code stores it there instead of in ~/.claude/.credentials.json. The first
read can open a Keychain dialog. Click Always Allow once and it stops
asking. To skip the Keychain, set CLAUDE_STATUSLINE_NO_KEYCHAIN=1. The Fable
bar then uses only the CLI's own cache.
The first row answers what you are working on and what you have done to it: the folder and the branch on the left, then how many files changed by kind and how many lines, pushed right so that its edge lands where the second row ends. Long folder and branch names are cut to fit; the counts keep their room.
bashjq— parses the statusline JSON from stdincurl— only for refreshing the Fable weekly quota
Claude Code sends JSON to the script on stdin
(docs). Everything except the
Fable window comes from that payload. For the Fable quota the script reads the
CLI's cached copy in ~/.claude.json. When that copy is stale, it calls
/api/oauth/usage in the background, at most every ten minutes.
The agent panel works the same way: Claude Code sends the visible subagent
rows to subagent-statusline.sh as one JSON object, and the script answers
with one replacement row per agent.
The main line uses the model's display name from the payload. The panel receives a model id and derives the short name from it. Effort also comes from the payload, on the versions that send it and for the models that support it. Without it, the line shows the model name alone.
Changes are listed in the changelog.
MIT





