Claude Codev2.1.294
Opus 5 with high effort · Claude Max
~/dev/projects/claude-statusline
Using Opus 5 (from .claude/settings.json) · /model

A statusline for Claude Code.

One bash script. It shows your folder, branch and model, how full the context window is, and your 5-hour, 7-day and Fable limits as bars under the prompt.

The prompt for Claude Code
> 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.
Paste it into Claude Code and press return. The same prompt installs it, and updates it later. Install it by hand GitHub ↗
01

Usage against time

The top half of each bar shows usage. The bottom half shows elapsed time. If usage is ahead of time, you run out before the reset, so drop an effort level. If usage is behind, you can raise it.

The row under the bar records the effort level for each tenth of the window. In this loop, effort is high until usage passes the clock, then low.

bar color · usage vs time quota to spare: raise model or effort on pace: keep as is runs out early: lower model or effort number color · usage under 50% 50–80% over 80%
02

Context window

The bar turns yellow at 25% and red at 50%. The thresholds are lower than on the limit bars, because a full context window stops you at once. The bar fills in eighths of a character, so it moves before the number changes.

03

When a window resets

When a 5-hour window ends, both halves drop to zero and the countdown restarts at 5h0m. The top half stays green here, because usage trails the clock the whole time.

04

The Fable window

Fable has its own weekly quota. It refills only at the weekly reset, so the blue half tells you how long the wait is. It 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.

05

What is on the line

The context window, then the 5-hour, 7-day and Fable windows. Each one is a label, a bar and a number. Your folder, branch and model sit at the start of the line.

06

The agent panel

When subagents run, Claude Code lists them below the prompt. A second script, subagent-statusline.sh, gives each row its own context bar, with the same thresholds as Ctx. A red row returns a thin answer, and the bar tells you before the answer arrives.

The main line barely moves while they work: each agent burns its own window, and your context stays clean.

Install or update

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.

01Paste this into Claude Code
> 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.
02Or run the installer yourself
$ curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash
The same script without the agent, and the same either way: it puts statusline.sh and subagent-statusline.sh into ~/.claude/ and points settings.json at them, with a backup of anything it replaces. Run it again whenever you want the latest version. --no-settings installs the scripts only. --help lists all options.
03Or install it by hand
$ 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.sh
Two files, nothing else. Then add the settings below yourself.
04Point Claude Code at it
// ~/.claude/settings.json
{ "statusLine": { "type": "command",
    "command": "~/.claude/statusline.sh" },
  "subagentStatusLine": { "type": "command",
    "command": "~/.claude/subagent-statusline.sh" } }
The prompt and the installer write this for you. You need it only after a manual install or --no-settings.

Needs bash, jq and curl. Claude Code sends the data on stdin. The script fetches only the Fable number itself, in the background, at most every ten minutes.

The same prompt in reverse. It removes both scripts and their settings entries, and leaves a backup of each.

01Paste this into Claude Code
> 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.
Claude runs it and tells you where the backups are.
02Or run it yourself
$ curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash -s -- --uninstall
Removes both scripts from ~/.claude/, the statusLine and subagentStatusLine entries in settings.json, and the cached usage numbers. 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.

The only other state is the cached Fable number under ~/.claude/cache/, and the uninstall removes it too. Delete the .bak files when you no longer need them.

⏵⏵ bypass permissions on (shift+tab to cycle) · ← for agents