A two-line statusline for Claude Code showing context window usage, rate-limit bars, git status, token counts, and active task — all color-coded by severity.
Line 1: ModelName │ [active task] │ dirname │ CTX ████░░░░ nn% · 5H ████░░ nn% ↺HH:MM · 7D ████░░ nn%
Line 2: GIT branch · ~n · ↑n · TOK IN nn.nk · OUT nn.nk
- CTX — context window usage (normalized to the usable range, hitting 100% at autocompact threshold)
- 5H / 7D — claude.ai subscription rate-limit bars with reset times (hidden when not applicable)
- GIT — branch name, dirty file count, unpushed commit count
- TOK — cumulative session input/output token counts
- Active task — current in-progress todo from Claude Code's task list (bold amber)
- GSD badge —
⬆ /gsd:updateshown when a GSD plugin update is available
Color ramp on all bars: green → amber → orange → red → blinking red (at 92%+)
- Node.js (any modern version — uses only built-in modules)
- Claude Code CLI
curl -fsSL https://raw.githubusercontent.com/bradsec/ccstatusline/main/install.sh | bashOr with wget:
wget -qO- https://raw.githubusercontent.com/bradsec/ccstatusline/main/install.sh | bashThis will:
- Create
~/.claude/hooks/if it doesn't exist - Download
statusline-enhanced.jsinto that directory - Make it executable
- Print the
settings.jsonsnippet to add
mkdir -p ~/.claude/hooks
curl -fsSL https://raw.githubusercontent.com/bradsec/ccstatusline/main/hooks/statusline-enhanced.js \
-o ~/.claude/hooks/statusline-enhanced.js
chmod +x ~/.claude/hooks/statusline-enhanced.jsOpen PowerShell (run as your normal user — no admin required):
# Create hooks directory
New-Item -ItemType Directory -Force -Path "$HOME\.claude\hooks" | Out-Null
# Download the statusline script
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/bradsec/ccstatusline/main/hooks/statusline-enhanced.js" `
-OutFile "$HOME\.claude\hooks\statusline-enhanced.js"
Write-Host "Installed to $HOME\.claude\hooks\statusline-enhanced.js"After installing, add (or merge) the following into your settings.json:
| Platform | Settings file location |
|---|---|
| macOS / Linux | ~/.claude/settings.json |
| Windows | %USERPROFILE%\.claude\settings.json |
{
"statusLine": {
"type": "command",
"command": "node \"/home/YOUR_USERNAME/.claude/hooks/statusline-enhanced.js\""
}
}Replace YOUR_USERNAME with your actual username. The ~ shorthand does not work in the command string — use the full absolute path.
To get the correct path automatically, run:
echo "node \"$(echo ~/.claude/hooks/statusline-enhanced.js)\""{
"statusLine": {
"type": "command",
"command": "node \"C:\\Users\\YOUR_USERNAME\\.claude\\hooks\\statusline-enhanced.js\""
}
}Replace YOUR_USERNAME with your Windows username. To get the correct escaped path, run in PowerShell:
"node `"$($HOME -replace '\\','\\')\.claude\hooks\statusline-enhanced.js`""Pull the latest version directly from the repo:
curl -fsSL https://raw.githubusercontent.com/bradsec/ccstatusline/main/hooks/statusline-enhanced.js \
-o ~/.claude/hooks/statusline-enhanced.js && echo "ccstatusline updated."Or with wget:
wget -qO ~/.claude/hooks/statusline-enhanced.js \
https://raw.githubusercontent.com/bradsec/ccstatusline/main/hooks/statusline-enhanced.js \
&& echo "ccstatusline updated."Invoke-WebRequest -Uri "https://raw.githubusercontent.com/bradsec/ccstatusline/main/hooks/statusline-enhanced.js" `
-OutFile "$HOME\.claude\hooks\statusline-enhanced.js"
Write-Host "ccstatusline updated."After updating, restart Claude Code to pick up the changes.
Close and reopen Claude Code (or start a new session) after any install or update to pick up the new statusline.
hooks/
statusline-enhanced.js — the statusline script
install.sh — macOS/Linux installer
settings-snippet.json — the settings.json fragment to add
README.md — this file
Tip: If you use the GSD plugin, the statusline will automatically show an update badge when a new version is available. No extra configuration needed.
