{"slug": "claude-code-status-line-for-worktree-branch-context-and-quota", "title": "Claude Code status line for worktree, branch, context and quota", "summary": "Terminito, a new open-source tool by developer Artur Lima, adds a status line to Claude Code sessions showing the current worktree, branch, context usage, and quota remaining. The single bash file, installable via Homebrew or git clone, writes a statusLine key into ~/.claude/settings.json and requires no dependencies. It supports bash 3.2+, runs on Windows Git Bash, macOS, and Linux, and includes diagnostic and demo commands.", "body_md": "A Claude Code status line that tells you, at a glance, **which worktree and\nbranch this session is on**, and **how much context and quota you have left**.\n\n```\n  ⎇ northwind-service-roster  feat/source-roster-cursor  ◆ Opus\n  ctx ██████▌░░░ 68%    5h ████░░░░░░ 41% 2h13m    wk ██░░░░░░░░ 23% 4d\n```\n\nOne bash file, no dependencies, and the render path spawns nothing.\n\n```\nbrew install arturlimaaa/tap/terminito && terminito install\n```\n\nWithout Homebrew — and on Windows, where Git Bash is the target:\n\n```\ngit clone https://github.com/arturlimaaa/terminito ~/terminito && ~/terminito/terminito install\n```\n\n`install`\n\nwrites the `statusLine`\n\nkey into `~/.claude/settings.json`\n\nand keeps\na `.bak`\n\nbeside it. Claude Code picks it up on its next message — no restart.\n\nRe-running it is a no-op. If you already have a different status line it stops\nand tells you, rather than overwriting; `install --force`\n\nreplaces it, and\n`install --print`\n\ngives you the snippet to paste yourself.\n\nNothing appearing? `terminito doctor`\n\n. If everything there is green but the row\nis still missing, `terminito doctor --trace on`\n\nanswers the one question the\nchecks cannot: whether Claude Code is really invoking it.\n\n**Row 1 — where you are.** `⎇`\n\nfor a linked worktree, `◉`\n\nplus an amber name\nfor the main checkout, because the main checkout is where an accidental commit\ncosts most. The label is the directory basename; the repo name is added only\nwhen the directory doesn't already imply it. In the branch, the namespace\nrecedes and the leaf keeps full weight — `feat/`\n\ngrey, `source-roster-cursor`\n\nlit.\n\n**Row 2 — what you have left.** Coloured area is what you have *spent*, so a\nfresh session is quiet grey rather than thirty saturated cells announcing that\nnothing has happened. Half cells (`▌`\n\n) double the resolution inside ten\ncolumns, so 95% and 100% are not the same picture at the end of the scale where\nyou actually act.\n\nThe countdown is what makes the quota bar mean anything: `91% 4m`\n\nis fine, wait\nit out — `91% 4h51m`\n\nmeans stop and switch model. Same bar, opposite decisions.\n\nThe two rows join into one when the terminal is wide enough to hold them.\n\n| Command | Purpose |\n|---|---|\n`terminito` |\nThe status line. Reads the payload JSON on stdin. |\n`terminito install` |\nWrite the `statusLine` key into `settings.json` (`--print` , `--force` ) |\n`terminito doctor` |\nDiagnose a status line that isn't appearing |\n`terminito doctor --trace on|off` |\nRecord real renders, to prove Claude Code is invoking it |\n`terminito ls` |\nEvery session with its worktree, branch and status (`--verify` checks each PID is alive) |\n`terminito demo` |\nThe full colour ramp and every degradation state |\n\n| Variable | Effect |\n|---|---|\n`TERMINITO_COLOR` |\n`truecolor` | `256` | `none` |\n`TERMINITO_NOW` |\nepoch seconds; freezes the reset countdowns |\n`TERMINITO_CEILING` |\nstop the upward `.git` walk at this directory |\n`TERMINITO_CLOCK` |\npin a rung of the clock ladder (`date` , `printf` ) |\n`TERMINITO_MAX_WIDTH` |\nrow 1 column budget; `0` disables truncation (default 78) |\n`TERMINITO_NO_TRACE` |\nnever write the invocation trace |\n`NO_COLOR` |\nany non-empty value disables colour |\n`CLAUDE_CONFIG_DIR` |\noverrides `~/.claude` |\n\n`bash`\n\n3.2+. That is the whole list — no `jq`\n\n, no Node, no Python, and `git`\n\nis\nnever invoked (it reads `.git/HEAD`\n\nitself).\n\nRuns on Windows Git Bash, macOS (both stock `/bin/bash`\n\n3.2.57 and Homebrew\nbash 5), and Linux. CI runs the same golden files on all three, and asserts\nthat bash 3.2 and bash 5 emit byte-identical output.\n\nOn Windows, use forward slashes or\n\n`~`\n\nin the settings path. Git Bash treats unquoted backslashes as escape characters, so`C:\\Users\\…`\n\narrives with its separators stripped and fails with no visible error at all.\n\n```\nbash tests/run.sh          # goldens, and every command's contract\nbash tests/portability.sh  # bash 3.2 scan, BASH_COMPAT=32, the clock ladder\nbash tests/perf.sh         # the 300ms debounce budget\n```\n\nEvery non-obvious decision here — the spawn-free render path, the baked colour\nramp, the CP437 glyph subset, the locked lane widths, the 78-column budget —\nhas a measurement or a failure behind it. Those are in\n[DESIGN.md](/arturlimaaa/terminito/blob/main/DESIGN.md), with the benchmarks in [ bench/](/arturlimaaa/terminito/blob/main/bench).\n\nMIT.", "url": "https://wpnews.pro/news/claude-code-status-line-for-worktree-branch-context-and-quota", "canonical_source": "https://github.com/arturlimaaa/terminito", "published_at": "2026-08-22 19:40:41+00:00", "updated_at": "2026-08-22 20:14:14.615298+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Terminito", "Artur Lima", "Claude Code", "Homebrew", "Git Bash"], "alternates": {"html": "https://wpnews.pro/news/claude-code-status-line-for-worktree-branch-context-and-quota", "markdown": "https://wpnews.pro/news/claude-code-status-line-for-worktree-branch-context-and-quota.md", "text": "https://wpnews.pro/news/claude-code-status-line-for-worktree-branch-context-and-quota.txt", "jsonld": "https://wpnews.pro/news/claude-code-status-line-for-worktree-branch-context-and-quota.jsonld"}}