QuotchiGet Quotchi

Free tool · Claude Code

Claude Code status line generator

Tick what you want to see, from your 5-hour limit to a reset countdown. Get a tested bash + jq script and the settings.json snippet, ready to paste.

Runs in your browser. Nothing you enter is uploaded.

Quotchi the sloth typing at a terminal with a colorful status bar

Build your status line

Pick what to show. The preview and script update as you go.

Show
Reset shown as
Colors
Separator
Preview with sample data

> refactor the billing module

⏺ On it. Reading src/billing…

Sample data only: the folder and branch are examples. Missing fields disappear, exactly as in the real script.

1. Save as ~/.claude/statusline.sh

  1. Make it executable: chmod +x ~/.claude/statusline.sh

2. Add to ~/.claude/settings.json

Put the statusLine key inside the top-level object, next to your other settings.

3. Test it (optional)

Or flip one switch in Quotchi, which also adds Codex. It previews the change, backs up settings.json, keeps your current status line and restores it when you turn it off.

How it works

How Claude Code status lines work

Claude Code runs a command you choose and shows whatever it prints in a row at the bottom of the screen. The command gets the session’s details as JSON on standard input: model, folder, context window, cost and, for Pro and Max subscribers, the five-hour and weekly rate limits. This generator writes that command for you as a small bash script.

Per Anthropic’s docs, the script runs when a session starts, after each new assistant message, when you change the command, and when a rate-limit window it last saw reaches its resets_at time. Updates are debounced by 300 ms, and a new update cancels a run still in progress. The optional refreshInterval setting also re-runs it every N seconds. The generator adds 30 seconds when you choose the countdown, so it keeps ticking while you read.

Output can include ANSI colors, and each printed line becomes a row. The generated script prints a single line.

The fields it uses

Every value comes from a field documented on Anthropic’s status line page. Nothing is guessed or scraped.

Documented stdin fields
ItemFieldNotes
Modelmodel.display_nameFor example “Opus”.
Folderworkspace.current_dirFalls back to cwd; the script prints the last folder name.
5-hour %rate_limits.five_hour.used_percentage0 to 100. Pro and Max only, after the first response.
Weekly %rate_limits.seven_day.used_percentageSame conditions; each window can be absent on its own.
Resetrate_limits.five_hour.resets_atUnix epoch seconds.
Context %context_window.used_percentageCan be null early in a session. Counts input tokens only.
Costcost.total_cost_usdAn estimate at list price, not your bill. Resets on /clear.

The git branch isn’t in Claude Code’s data (only worktree sessions get a worktree.branch field), so the script asks git directly: git -C "$DIR" symbolic-ref --short -q HEAD, falling back to the short commit hash when HEAD is detached.

Inside the generated script

  • One jq call. All fields are read at once and printed as shell assignments quoted by jq’s @sh, then loaded with eval. Folder names with spaces or quotes are safe, and the script starts quickly.
  • Missing means empty. Every field has a fallback, so an absent rate_limits, a null context percentage or invalid input just leaves that item out.
  • Rounding happens in jq. Percentages arrive as decimals like 72.4; jq rounds them, so bash compares whole numbers with -ge. Cost is formatted in jq too, which keeps a comma-decimal locale from breaking printf.
  • bash 3.2 friendly. No associative arrays, no mapfile and no ${var,,}. Those need bash 4, and macOS ships bash 3.2.
  • Countdown without date. The countdown uses jq’s now, so it needs no date at all. The clock style uses BSD date -r on macOS and falls back to GNU date -d @ on Linux.
  • Thresholds. With colors on, a percentage is green below your yellow threshold, yellow from it, and red from your red threshold. The defaults are 70% and 90%, as in Anthropic’s example.

A worked example

With the default choices and this input (shortened):

{"model": {"display_name": "Opus"},
 "workspace": {"current_dir": "/Users/you/code/my-app"},
 "rate_limits": {"five_hour": {"used_percentage": 72.4, "resets_at": <now + 2h14m>},
                 "seven_day": {"used_percentage": 41.2}},
 "context_window": {"used_percentage": 34}}

the script prints Opus | my-app | ⎇ main | 5h 72% | ↻ 2h14m | 7d 41% | ctx 34%. 72% is yellow because it passed 70%, and the other percentages are green. Run the same script before Claude’s first reply, or with an API key, and rate_limits is absent, so you get Opus | my-app | ⎇ main | ctx 34%. No errors, no empty brackets.

What it can’t know

  • How much you have left in absolute terms. Claude Code reports percentages of your limits. Anthropic doesn’t publish the allowances behind them, so the script shows what Claude Code sends and nothing more.
  • Codex. Claude Code’s data only covers Claude. Codex has its own status line, set up with /statusline in the Codex CLI.
  • Your real bill. Session cost is Claude Code’s own estimate at list price.

Tips

  • Test before you restart: paste the test command from step 3 into Terminal. You should see the same line as the preview, with colors.
  • Seeing nothing at all? Check the script is executable, the path in settings.json is right, and which jq finds jq.
  • Prefer to describe it in words? Claude Code’s /statusline command can write a script for you from a description.
  • More background is in our guide, Your usage limits, in the Claude Code status line.

Want your limits outside the terminal too? Quotchi keeps Claude Code and Codex limits and reset times in your Mac menu bar, and the same app can add both to the status line. It’s Free.

See how Quotchi works

FAQ

Why are my 5-hour and weekly numbers missing?

Claude Code only sends rate_limits to Claude Pro and Max subscribers, and only after the first response in a session. Each window can be missing on its own, and a window is dropped once its reset time passes. The script leaves missing items out.

Does the script work on macOS’s built-in bash?

Yes. It’s written for bash 3.2, which ships with macOS, and we test it there. It reads every field in one jq call, so bash only handles plain integers and text.

Do I need jq?

Yes. Check with which jq. Recent macOS versions include it; otherwise install it with brew install jq. Without jq, the script prints a one-line reminder instead of failing.

Why does the countdown version add refreshInterval?

Claude Code re-runs the status line on events, such as a new message. refreshInterval also re-runs it every 30 seconds, so the countdown keeps moving while you’re idle.

Is session cost my bill?

No. Claude Code’s docs describe cost.total_cost_usd as an estimate computed at list price, which may differ from your actual bill.

Can it show Codex too?

Not from Claude Code’s data, which only covers Claude. Quotchi’s optional status line switch adds Codex to the same line, using the reading it already shows in your menu bar.

Sources

Read on October 9, 2026. If anything here disagrees with them, they win.