A two-line statusline for Claude Code, with a per-account colour and tag so you always know which account a terminal is talking to.
~/projects/my-app ✦ ⎇ main ✦ ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 33% ✦ ⚡ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀ 92%
⏱ 28m48s ✦ 5h: 7% ↻ 4h10m ✦ ★ Sonnet 4.6 ★ ✦ high ✦ v2.1.202 ✦ -personal ✦ ⌘ 6f2c41ae
Line 1 — directory, git branch, context window %, cache hit rate % Line 2 — API duration, 5h rate limit, model, effort, version, tag, session ID
Every field is optional and reorderable, and the accent colour is per profile —
green -personal in one terminal, red -work in another.
Requires bash, jq, and git for the branch field.
git clone https://github.com/foxfollow/Statusline-CC-Script.git
cd Statusline-CC-Script
bash apply-statusline.shRestart Claude Code. Your settings.json is backed up first and every other key
is left alone.
Native Windows isn't supported (it's a bash script) — use WSL. Details in docs/install.md.
A tag is a Claude Code profile plus its statusline config: personal is
~/.claude, any other name X is ~/.claude-X.
bash main-statusline.shmain-statusline — Claude Code statusline manager
TAG DIRECTORY LABEL COLOUR STATE
---------- ---------------------- ------------ ------------------ ---------
personal ~/.claude -personal #42e66c green managed
work ~/.claude-work -work #e64747 red managed
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
Or non-interactively:
main-statusline --create --tag work --color red --label -work
main-statusline --edit --tag work --color '#7fdbca'
main-statusline --fields --tag work --line2 model,effort,label
main-statusline --adopt --tag work # keep an existing look, gain a config
main-statusline --aliases --write # claude-personal / claude-work wrappersFull flag reference: docs/manager.md.
One engine plus one small config per profile:
~/.claude/statusline.sh engine (identical in every profile)
~/.claude/statusline.conf tag, colour, and the field list for each line
STATUSLINE_LABEL="-work"
STATUSLINE_COLOR="red" # palette name or #rrggbb
STATUSLINE_LINE1="cwd,branch,context,cache"
STATUSLINE_LINE2="duration,rate5h,model,effort,version,label,session"The engine reads the config sitting next to it, so a profile can't pick up another profile's colour. Environment variables override the config, which makes previewing easy:
echo '{}' | STATUSLINE_COLOR=blue STATUSLINE_LABEL='-test' bash ~/.claude/statusline.shAvailable fields: cwd branch context cache duration rate5h model
effort version session label time — see
docs/configuration.md.
Each Claude account lives in its own CLAUDE_CONFIG_DIR with its own
credentials, settings and statusline colour:
main-statusline --create --tag work --color red --label -work
main-statusline --aliases --write
source ~/.zshrc
claude-work # logs into ~/.claude-work, strips the env vars that cause 401s
/login # once, in the browser, with the work accountThe full walkthrough — including why feeding CLAUDE_CODE_OAUTH_TOKEN to
interactive Claude Code causes endless 401 · Please run /login — is in
docs/dual-account.md.
statusline.sh in this repo is the source of truth. Edit it, then re-apply:
bash apply-statusline.sh # personal profile
main-statusline --apply --tag work # any other tagPrompts that work well when editing it with Claude Code:
add a field showing the 7-day rate limit next to the 5h one
make the bars 20 wide instead of 13
show the repo name alongside the git branch
dump the raw statusline JSON to /tmp so I can see what fields exist
- Written for bash 3.2 — the version macOS ships — so no associative arrays or
mapfile. - One
jqcall per render;gitruns only when thebranchfield is enabled. - A broken colour or an unknown field degrades gracefully instead of breaking the line.
statusline.confis gitignored: a label naming a real employer stays on your machine.
| Install | Requirements, WSL, PATH setup, uninstall |
| Configuration | Config keys, palette, fields, bars, JSON input |
| Manager reference | Every menu entry and flag |
| Two accounts | Personal + work side by side, 401 troubleshooting |
Not affiliated with Anthropic.