Claude Code · statusline

Know which account
you're in, at a glance.

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.

personal profile
~/projects/app ✦ ⎇ main ✦ ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 33% ✦ ⚡ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀ 92% ⏱ 28m48s ✦ 5h: 7% ↻ 4h10m ✦ ★ Sonnet 4.6 ★ ✦ high ✦ v2.1.202 ✦ -personal ✦ ⌘ 6f2c41ae

One engine, one config per account

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.

✦ Per-account colour and tag

Green -personal here, red -work there. Ten palette names or any custom hex.

✦ Pick your own fields

Twelve fields, in whatever order you want, split across the two lines. Drop one and its separator goes with it.

✦ Interactive manager

main-statusline lists your tags, creates new ones, edits colours and layouts, and generates shell wrappers.

✦ Adopts what you already have

A hand-edited statusline in a profile? --adopt reads its colour and tag into a config — identical look, now editable.

✦ Fast and quiet

One jq call per render, git only when the branch field is on. A broken config degrades instead of breaking the line.

✦ Boring dependencies

bash 3.2 (the one macOS ships) and jq. Nothing to install, nothing to compile.

Install

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.

The manager

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

Two accounts, impossible to confuse

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.

claude-personal · ~/.claude
~/side-project ✦ ⎇ main ✦ ⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 21% ★ Sonnet 4.6 ★ ✦ -personal
claude-work · ~/.claude-work
~/monorepo ✦ ⎇ release ✦ ⣿⣿⣿⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀ 61% ★ Opus 4.8 ★ ✦ -work
# 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.

Fields

Put any of these on either line, in any order.

FieldLooks likeWhat it is
cwd~/projects/appWorking directory, ~ for home
branch⎇ mainCurrent git branch
context⣿⣿⣿⣿⣀⣀⣀⣀⣀ 33%Context window fill — green → yellow → red
cache⚡ ⣿⣿⣿⣿⣿⣿⣿⣿⣀ 92%Cache hit rate — red → yellow → green
duration⏱ 28m48sCumulative API time this session
rate5h5h: 7% ↻ 4h10m5-hour rate limit and time until reset
model★ Sonnet 4.6 ★Current model
efforthighEffort / thinking level
versionv2.1.202Claude Code version
session⌘ 6f2c41aeSession UUID — claude --resume <id>
label-workYour per-account marker
time⌚ 14:03Wall-clock time

Documentation