for Claude Code ยท v2.0

See everything. Spend less.

A one-command setup for a richly decorated Claude Code statusline โ€” context, rate limits with a burn-rate warning, session cost, git status, five themes โ€” with Caveman mode baked in.

claudecode-statusline preview in Claude Code

Build your own bar

Start from Default (the compact classic line) or Install all, then toggle segments, reorder them with โ—€ โ–ถ and pick a theme. The matching SL_* env vars update below โ€” that is exactly what the installer writes.

Start from
Segments
Options
Theme

What you get

A compact line by default, color-coded by severity. Cards tagged extra are opt-in: pick Install all (or choose them in Custom) to get them.

๐Ÿชจ CAVEMAN

Caveman badge

Shows the active mode. Hidden when off.

๐Ÿ“ my-project ๐ŸŒฟ main โœŽ3 ?2 โ†‘1

Project + git status git status: extra

Folder, branch, changed / untracked files, ahead / behind, conflicts. One cheap git call.

๐Ÿค– Claude Opus 5.5

Model

Which model is answering right now.

CTX โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 42%

Context window

Usage bar going green โ†’ yellow โ†’ red.

โšก โ–„ MEDIUM

Effort level

Shown only when the model supports it.

5h โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 42% used ยท 58% rem โ†บ 1h 22m

5-hour limit

Spent, remaining, and time until reset.

7d โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 85% used ยท 15% rem โ†บ 3d 7h

Weekly limit

Both values colored independently by severity.

๐Ÿ”ฅ 5h full in ~1h 25m

Burn-rate warning extra

Shows up only when your current pace will hit a limit before it resets โ€” and tells you when.

๐Ÿ’ฐ $0.42 ยท โฑ 18m ยท +124 -37

Cost, time, lines extra

Session cost (API-equivalent on subscriptions), duration, and lines added / removed.

๐Ÿชจ ~42% tokens saved

Token savings

Optional live estimate of what Caveman saves.

Install

Needs Claude Code and Node.js 18 or newer. No bash, jq or python3 required. git is optional (branch and git status).

Already using it? Don't reinstall from scratch โ€” use Update. It keeps your segments, order and theme, so the line looks the same afterwards. Breaking changes.

git clone https://github.com/FahimFBA/claudecode-statusline.git
cd claudecode-statusline
chmod +x install.sh
./install.sh

Then restart Claude Code. Choose 1) Default (compact classic line), 2) Custom (type the component numbers in the order you want them, e.g. 2 3 4 6 7 10 13, or all) or 3) Install all (every segment plus git status). Each asks for a theme and shows a live preview before writing anything.

What the installer does

  1. Copies hook scriptsInto ~/.claude/hooks/, and removes a stale v1 caveman-statusline.sh.
  2. Merges settingsInto ~/.claude/settings.json โ€” existing file is backed up to settings.json.bak, only this project's entries are touched, your other hooks and config survive, re-running is safe.
  3. Installs the Caveman pluginVia claude plugins install caveman --marketplace caveman.

Update

Safe to run any time, and again after every git pull. The installer shows what is installed (Installed: v1.x โ†’ this version: v2.0.0), backs up settings.json first, and touches only this project's entries.

cd claudecode-statusline
git pull
./install.sh            # choose "4) Update" (the default)
./install.sh --update   # or: no questions asked

Then restart Claude Code. Check the installed version with node ~/.claude/hooks/caveman-statusline.js --version.

โœ… Keeps

Your SL_* settings (hidden segments, SL_ORDER, SL_THEME), your other hooks, permissions, model and every other key in settings.json.

๐Ÿ”„ Replaces

The scripts in ~/.claude/hooks/. A leftover v1 caveman-statusline.sh is removed. Running Update twice changes nothing.

๐Ÿ†• From 1.x

Nothing visible changes. The v2 extras โ€” git status, burn rate, cost, time, lines โ€” are off by default. Say y when asked to turn them on, or re-run and pick Install all later.

๐Ÿ›‘ Refuses

To touch a settings.json that is not valid JSON. It stops and changes nothing.

Rolling back

Two backups sit next to settings.json: .bak (before the latest run, overwritten each run) and .pre-v2.bak (written once when you first upgrade from 1.x, never overwritten).

# macOS / Linux
cp ~/.claude/settings.json.pre-v2.bak ~/.claude/settings.json
git checkout v1.0.1 && ./install.sh     # old scripts back

# Windows (PowerShell)
Copy-Item "$env:USERPROFILE\.claude\settings.json.pre-v2.bak" "$env:USERPROFILE\.claude\settings.json" -Force
git checkout v1.0.1; powershell -ExecutionPolicy Bypass -File install.ps1

Customize

Re-run the installer and pick option 2, or set env vars in the statusLine command of ~/.claude/settings.json.

Env varDefaultEffect
SL_ORDER=allunsetEverything: all 12 segments plus git status. What "Install all" writes
SL_ORDER=a,b,cunsetShow only these segments, in this order. Keys: caveman project model ctx effort 5h 7d burn cost time lines savings. Add git for git status markers
SL_BURN=1 SL_COST=1 SL_TIME=1 SL_LINES=1 SL_GIT=1offSwitch a single extra on without listing everything (ignored when SL_ORDER is set)
SL_THEME=norddefaultdefault ยท nord ยท gruvbox ยท light ยท mono
NO_COLOR=1unsetNo colors at all
SL_GIT=0Hide git status markers, keep the branch (skips git status)
SL_CAVEMAN=0onHide caveman badge
SL_PROJECT=0onHide project + branch + git status
SL_MODEL=0onHide model name
SL_CTX=0onHide context window bar
SL_EFFORT=0onHide effort level
SL_5H=0onHide hourly rate limit
SL_7D=0onHide weekly rate limit
SL_BURN=0onHide burn-rate warning
SL_COST=0onHide session cost
SL_TIME=0onHide session time
SL_LINES=0onHide lines changed
SL_SAVINGS=0onHide token savings

How they combine: no SL_ORDER โ†’ the classic set (extras only with their SL_<X>=1); SL_ORDER=all โ†’ everything; SL_ORDER=a,b,c โ†’ exactly those. Then any SL_<SEGMENT>=0 removes what it names.

Themes

Preview any combo without Claude Code

SL_THEME=gruvbox SL_ORDER=model,ctx,5h,burn \
  node ~/.claude/hooks/caveman-statusline.js --demo

Default Caveman mode:

export CAVEMAN_DEFAULT_MODE=lite   # lite | full | ultra | off

# or ~/.config/caveman/config.json
{ "defaultMode": "lite" }

Caveman mode

Terse replies, same technical substance. Powered by JuliusBrussee/caveman.

CommandEffect
/cavemanActivate full mode
/caveman liteFewer drops
/caveman ultraMax compression
/caveman offDeactivate
/caveman-statsSession usage + savings
/caveman-stats --allLifetime stats
LevelBehaviour
liteDrop articles and filler, keep sentence structure
fullFragments OK, short synonyms
ultraMinimal connectives

Uninstall

Run from your clone. Removes the hook files and only the settings.json entries this project added โ€” your other hooks, plugins and config stay (the old file is saved as settings.json.bak).

macOS / Linux

./uninstall.sh              # asks first
./uninstall.sh --keep-plugin # leave the caveman plugin entries

Windows (PowerShell)

powershell -ExecutionPolicy Bypass -File uninstall.ps1
powershell -ExecutionPolicy Bypass -File uninstall.ps1 -Yes -KeepPlugin

To also remove the plugin itself: claude plugins uninstall caveman.