cc-statusline
English · 繁體中文
A comprehensive statusline dashboard for Claude Code. See everything at a glance — no slash commands needed.

What it shows
| Section | Info |
|---|
| session summary | Auto-generated whole-session summary (Claude rewrites it every ~10 messages with built-in compression so it stays under ~120 chars) |
| directory | Current working directory + +added -removed lines |
| repo + branch | owner/repo (parsed from git remote) + branch + (N changed) |
| cost | cost $TOTAL (<window>) · $SESSION (this session) — all-session spend rendered as parallel parenthetical annotations. Window defaults to all time; set aggWindowDays in ~/.claude/cc-statusline-rows.json for a rolling view (e.g. 7 / 30 / 90). |
| model | Active model name + effort level with 5-tier color ladder (low dim / medium green / high yellow / xhigh orange / max red) |
| duration | Active session time — sum of every turn's wall-clock duration (UserPromptSubmit → Stop). Inter-turn idle is naturally excluded, no idle threshold needed. Shares the model row area visually but toggles independently (/cc-statusline:rows hide duration). |
| tokens / context / compact | tokens TOTAL (SESSION this session) (same all+session dual display as cost) · context window % · compact count (compact 1 time / compact N times) |
| 5h-quota | Color-coded bar (green → yellow → red) + auto-rolling resets Xh Ym countdown. Auto-zeros when resets_at passes real-world time (payload is stale until next message). |
| 7d-quota | Color-coded bar + auto-rolling resets Xd Yh countdown with same rollover behavior |
| agents | Subagents that ran in this session — critic ✓ 5m ago, parallel runs collapse to critic ○×3 (running) or critic ✓×2 5m ago (done) |
| memory | Which CLAUDE.md scopes are loaded (global / project / rules) |
| mcp | MCP server health probed via claude mcp list — count of active + each unhealthy server with its state (✘ failed, △ needs auth) |
| edited | Recently edited files in this session, newest first (long names front-truncated with …) |
| history | Right column showing the last messages (▶ you, ◀ Claude), grows to fill terminal width |
Install
Option A — plugin install (recommended)
claude plugin marketplace add NYCU-Chung/cc-statusline
claude plugin install cc-statusline@cc-statusline
Hooks are registered automatically (via the plugin's own hooks/hooks.json), so you can skip the Hook wiring section below.
Then add the statusLine block to ~/.claude/settings.json — Claude Code doesn't allow plugins to set this for you:
{
"statusLine": {
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/statusline.js",
"refreshInterval": 30
}
}
Option B — manual install (for hacking on the script)
Pick the block that matches your shell. ~ is expanded by bash/zsh before git sees it, but PowerShell and cmd don't expand it — using ~ there makes git clone create a literal ~ folder (reported in #6). Use $HOME / %USERPROFILE% instead.
bash / zsh / Git Bash on Windows
git clone https://github.com/NYCU-Chung/cc-statusline ~/cc-statusline
mkdir -p ~/.claude/hooks
cp ~/cc-statusline/statusline.js ~/.claude/statusline.js
cp ~/cc-statusline/hooks/*.js ~/.claude/hooks/
PowerShell
git clone https://github.com/NYCU-Chung/cc-statusline "$HOME/cc-statusline"
New-Item -ItemType Directory -Force "$HOME/.claude/hooks" | Out-Null
Copy-Item "$HOME/cc-statusline/statusline.js" "$HOME/.claude/statusline.js"
Copy-Item "$HOME/cc-statusline/hooks/*.js" "$HOME/.claude/hooks/"
Windows cmd
git clone https://github.com/NYCU-Chung/cc-statusline "%USERPROFILE%\cc-statusline"
mkdir "%USERPROFILE%\.claude\hooks" 2>nul
copy "%USERPROFILE%\cc-statusline\statusline.js" "%USERPROFILE%\.claude\statusline.js"
copy "%USERPROFILE%\cc-statusline\hooks\*.js" "%USERPROFILE%\.claude\hooks\"
Then add this statusLine block to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "node ~/.claude/statusline.js",
"refreshInterval": 30
}
}
Hook wiring (Option B only — plugin install does this automatically)
Add these to your ~/.claude/settings.json hooks section to enable all statusline features: