Custom status line for Claude Code CLI, showing real-time session info in the terminal.
Install · What it shows · Settings · Development
ps/pgrep/stty flags)The cc-statusline bin is a tiny shell wrapper that picks bun if it's on PATH, else node. nib-ink uses Bun.stringWidth on its unicode width fallback path; under node, a built-in polyfill counts code points instead — works for all input but under-counts wide chars (CJK, emoji), which can cause off-by-one truncation. Install bun for pixel-perfect rendering when prompts contain wide chars; otherwise node is fine.
npm install -g @brenoxp/cc-statusline
Add to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "cc-statusline"
}
}
Requires Bun.
git clone https://github.com/brenoxp/claude-code-statusline.git
cd claude-code-statusline
bun install
bun run build
{
"statusLine": {
"type": "command",
"command": "bun /path/to/claude-code-statusline/dist/index.js"
}
}
settings.json in the project root:
| Setting | Default | Description |
|---|---|---|
maxLineWidth |
70 |
Cap line width (useful on wide terminals) |
cacheWrite |
true |
Show session cache write tokens on the model line |
minPromptLineWidth |
40 |
Minimum width for the prompt line |
debug |
false |
Timing info to stderr |
testMode |
false |
Read from example input instead of stdin |
log |
false |
Save each stdin JSON input to logs/ |
Env var overrides: STATUSLINE_DEBUG, TEST_MODE, STATUSLINE_LOG.
Rate limit data comes straight from the rate_limits field in the stdin JSON that Claude Code sends each render (no network, no token needed). The session/weekly bars only appear for Pro/Max subscribers, and only after the first API response of a session.
bun run build # build dist/index.js
bun run test # run test suite
bun run format # format code
bun run lint # lint
TEST_MODE=true bun dist/index.js # manual render check
bash benchmark/run.sh # performance benchmark
Built with nib-ink (Svelte 5 terminal UI renderer). Components in src/components/ use flexbox layout via Yoga, compiled and bundled via esbuild into a single dist/index.js with zero runtime dependencies.
src/
├── components/ Svelte 5 components (Statusline, Location, ContextBar, ...)
├── lib/
│ ├── data.ts Data gathering (git, processes, tasks, prompt, rate limits)
│ └── theme.ts Colors, utilities, cache helpers
└── index.ts Entry point (stdin → renderToString → stdout)
MIT