A two-line statusline for Claude Code — context fill, cache hit rate, rate limit, model, effort, version, session. One engine, one small config per profile, so every account gets its own colour and tag.
The colour and the tag are not in the code — they live in a four-line
statusline.conf inside each Claude profile directory. Adding an
account is a folder and a config, not a copy of the script.
Green -personal here, red -work there. Ten palette names or any custom hex.
Twelve fields, in whatever order you want, split across the two lines. Drop one and its separator goes with it.
main-statusline lists your tags, creates new ones, edits colours and layouts, and generates shell wrappers.
A hand-edited statusline in a profile? --adopt reads its colour and tag into a config — identical look, now editable.
One jq call per render, git only when the branch field is on. A broken config degrades instead of breaking the line.
bash 3.2 (the one macOS ships) and jq. Nothing to install, nothing to compile.
Needs bash, jq, and git for the branch field.
# clone anywhere you like
git clone https://github.com/foxfollow/Statusline-CC-Script.git
cd Statusline-CC-Script
bash apply-statusline.sh
Restart Claude Code and it's there. Your settings.json is backed
up first and every other key is left alone.
Run main-statusline with no arguments for a menu, or drive it
with flags. A tag is a Claude profile plus its statusline config:
personal is ~/.claude, any other name
X is ~/.claude-X.
main-statusline — Claude Code statusline manager TAG DIRECTORY LABEL COLOUR STATE ---------- ---------------------- ------------ ------------------ --------- personal ~/.claude -personal #42e66c green managed team ~/.claude-team -team #58a6ff blue managed work ~/.claude-work -work #e64747 red managed scratch ~/.claude-scratch -- -- no statusline l) list tags n) new tag (creates the profile folder) e) edit label + colour f) fields for line 1 / line 2 A) adopt an existing statusline into a config a) apply / re-apply r) remove statusline from a tag s) shell aliases q) quit choice:
# or non-interactively main-statusline --create --tag work --color red --label -work main-statusline --edit --tag team --color '#58a6ff' main-statusline --fields --tag work --line2 model,effort,label main-statusline --adopt --tag work main-statusline --aliases --write
Each Claude account lives in its own CLAUDE_CONFIG_DIR with its
own credentials, settings and statusline. Give them different colours and the
wrong-terminal mistake stops happening.
# create the second account's profile, colour and tag main-statusline --create --tag work --color red --label -work # generate claude-personal / claude-work wrappers main-statusline --aliases --write # log the new account in, once, through the browser claude-work /login
The wrappers also strip ANTHROPIC_API_KEY,
ANTHROPIC_AUTH_TOKEN and CLAUDE_CODE_OAUTH_TOKEN from
the environment — the usual cause of endless
401 · Please run /login. Full walkthrough in
the two-accounts guide.
Put any of these on either line, in any order.
| Field | Looks like | What it is |
|---|---|---|
cwd | ~/projects/app | Working directory, ~ for home |
branch | ⎇ main | Current git branch |
context | ⣿⣿⣿⣿⣀⣀⣀⣀⣀ 33% | Context window fill — green → yellow → red |
cache | ⚡ ⣿⣿⣿⣿⣿⣿⣿⣿⣀ 92% | Cache hit rate — red → yellow → green |
duration | ⏱ 28m48s | Cumulative API time this session |
rate5h | 5h: 7% ↻ 4h10m | 5-hour rate limit and time until reset |
model | ★ Sonnet 4.6 ★ | Current model |
effort | high | Effort / thinking level |
version | v2.1.202 | Claude Code version |
session | ⌘ 6f2c41ae | Session UUID — claude --resume <id> |
label | -work | Your per-account marker |
time | ⌚ 14:03 | Wall-clock time |