claudeers.
// Other

claude-statusline

One bash script for the Claude Code statusline: dir, branch, model, context window, and 5h / 7d / Fable rate-limit bars.

// Other[ cli ][ api ][ claude ]#claude#otherMIT$open-sourceupdated 24 days ago
Actively maintained
99/100
last commit 9 days ago
last release none
releases 0
open issues 0
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up claude-statusline (git-clone project) into my current project.
Found on https://claudeers.com/claude-statusline
Repo: https://github.com/alp82/claude-statusline
Homepage/docs: https://alp82.github.io/claude-statusline/
Detected install method: git-clone → git clone https://github.com/alp82/claude-statusline
Category: other. Platforms: cli, api.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
active; community-verified: false. Confirm the source before running anything.
// or clone
git clone https://github.com/alp82/claude-statusline

// compatibility

Platformscli, api
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageHTML

claude-statusline

Are you spending faster than the clock?


One bash script. Every limit window is a race between two things: the tokens you spend, and the time you have left. The bar draws both. When your spend pulls ahead of the clock, drop an effort level. When it falls behind, you can afford to think harder. Your folder, branch, model and context window sit on the same line, under the prompt, while you work.


The whole statusline from Ctx rightward, every window moving at once.

See it in motion → alp82.github.io/claude-statusline


Install

Paste this 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.

Claude reads the installer before it runs it, tells you what changed, and fixes anything missing. Re-paste it any time to upgrade.

Or run the installer yourself

Same script, no agent in the middle:

curl -fsSL https://alp82.github.io/claude-statusline/install.sh | bash

That drops statusline.sh into ~/.claude/, makes it executable, and points settings.json at it. Anything it replaces is copied to <file>.bak first — your own statusline.sh, a symlink to a clone, an existing settings.json. Re-run it any time to upgrade. --no-settings installs the script only (… | bash -s -- --no-settings); --help has the rest.

Or install it by hand

One file, nothing else:

curl -fsSL https://raw.githubusercontent.com/alp82/claude-statusline/main/statusline.sh \
  -o ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh

Then point Claude Code at it yourself, in ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh"
  }
}

Uninstall

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 is gone and ~/.claude/settings.json no longer
has a statusLine 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 -- --uninstall

Deletes ~/.claude/statusline.sh, drops the statusLine entry from settings.json and clears the cached usage numbers under ~/.claude/cache/ — backing up the script and settings.json as .bak first. Everything else in settings.json is left as it was, and if statusLine points at some other statusline it is left alone. --no-settings removes the script only.

What it shows

Left to right:

  • dir ⎇ branch — the current directory's name, and the git branch you are on. In a linked git worktree the glyph becomes an amber ⎇+, so a worktree never looks like the main checkout:

    claude-statusline ⎇ main          ← the main checkout
    claude-statusline-fix ⎇+ fix/bar  ← a linked worktree
    
  • ★ Model — the active model's display name

  • Ctx — how full the context window is, 0–100%, and the token count in thousands

  • 5h / 7d — your 5-hour and 7-day rate-limit windows: how much you have used, how much of the window has gone by, and the time until it resets. The distance between the two halves is the number to read

  • Fable — the same, for Fable's own weekly quota. It resets with the 7-day window, so it shows no of its own

How to read it

Usage against time

The 5h bar with both racers named and the gap between them read out: spend climbs past the blue elapsed-time half at high effort, then flattens once the effort drops. An effort row under the bar records which level was in force across each tenth of the window.

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.

If the top reaches further right than the bottom, you are spending faster than the clock and you will run out before the window resets. Drop an effort level and the spend rate falls with it, which is what the loop above shows: high effort until the gap opens, then low, and the clock catches back up. If the bottom reaches further right, you are leaving quota you will not get back, so you can afford to think harder.

Colour follows usage: green under 50%, yellow 50–80%, red above 80%.

Context window

The Ctx bar filling to 78%, turning yellow then red, then compacting back down to the summary.

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

The 5h bar with the gap read out, creeping up, dropping to zero the instant the window resets, then climbing back.

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

The Fable bar with the gap read out, at 100%, holding while the blue week-elapsed half runs to the reset.

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 .

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 — so it stays out of the TUI's way.

On macOS that refresh needs 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 read altogether, set CLAUDE_STATUSLINE_NO_KEYCHAIN=1 — the Fable bar then follows the CLI's own cache only.

Requirements

  • bash
  • jq — parses the statusline JSON from stdin
  • curl — only for refreshing the Fable weekly quota

How it works

Claude Code pipes a JSON blob to the script on stdin (docs). Everything but the Fable window comes straight from that payload. The Fable weekly quota isn't in it, so the script reads the CLI's own cached copy from ~/.claude.json and only hits /api/oauth/usage itself — in the background, throttled — when that copy is stale.

License

MIT

// faq

What is claude-statusline?

One bash script for the Claude Code statusline: dir, branch, model, context window, and 5h / 7d / Fable rate-limit bars.. It is open-source on GitHub.

Is claude-statusline free to use?

claude-statusline is open-source under the MIT license, so it is free to use.

What category does claude-statusline belong to?

claude-statusline is listed under other in the Claudeers registry of Claude-compatible tools.

1 views
15 stars
unclaimed
updated 24 days ago

// embed badge

claude-statusline on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-statusline.svg)](https://claudeers.com/claude-statusline)

// retro hit counter

claude-statusline hit counter
[![Hits](https://claudeers.com/api/counter/claude-statusline.svg)](https://claudeers.com/claude-statusline)

// reviews

// guestbook

0/500

// related in Other

🔓

符合nature论文学术表达和科研绘图的Skill

// otherYuan1z0825/Python36,535Apache-2.0[ claude ]
🔓

Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.

// othermanaflow-ai/Swift26,069NOASSERTION[ claude ]
🔓

Anti-AI-slop design skill for Claude Code, Cursor, and Codex.

// otherNutlope/CSS25,307MIT[ claude ]
🔓

Huashu Design · HTML-native design skill for Claude Code · Claude Code 里 HTML 原生的设计 skill · 高保真原型 / 幻灯片 / 动画 + 20 设计哲学 + 5 维评审 + MP4 导出 · Agent-agnostic

// otheralchaincyf/HTML23,151MIT[ claude ]
→ see how claude-statusline connects across the ecosystem