Neon multi-line status line for Claude Code — session, model health, and account + Codex usage.
Opus 4.8 │ 101K/1.0M 10% │ fast │ 1h16m
.claude git:(main) +37,-30 · sskys18/claude-config
● claude │ 5h 29% (2h13m) │ 7d 6% (5d18h)
● codex │ 5h 15% (46m) │ 7d 17% (3d)
Line 1 — session
- model name, context tokens
used/total+%(autocompact-aware: adds the ~45K buffer CC reserves before it compacts) fastbadge when fast mode is on; output-style name when non-default- live session timer (
1h16m) — real wall-clock since the transcript was created, ticked byrefreshInterval(see Setup). Minute granularity.
Line 2 — project
- basename(cwd),
git:(branch),+ins,-delworking-tree diff,owner/repo
Line 3 — Claude
●service-health dot (Anthropic Statuspage indicator)5h/7daccount rate limits:used% (time-to-reset)from CC'srate_limitspayload
Line 4 — Codex
●service-health dot (OpenAI Statuspage indicator)5h/7dCodex usageused% (time-to-reset)from the ChatGPT backend usage endpoint (wham/usage), authed with the OAuth token in~/.codex/auth.json— fresh every probe. Falls back to the latest~/.codexsession rollout'srate_limitssnapshot when the call fails (offline / expired token), which is dimmed + markedstalepast 6h.
Health dot color: green = operational, gold = minor, red = major/critical, gray = unknown/not-yet-probed.
- Session/context/limits come from the JSON Claude Code feeds the status line on stdin (
context_window,cost,rate_limits,effort,fast_mode,workspace.repo,transcript_path). No API calls, no credentials. - Service health (Claude + Codex) and Codex usage are gathered by a detached probe (
dist/health-probe.js) that the status line spawns out-of-band when its cache is stale (120s TTL, shared across all sessions via$TMPDIR/claude-statusline-health.json, with a spawn-lock so concurrent sessions fire only one probe). The render only reads the cache — it never blocks on the network.- Claude:
https://anthropic.statuspage.io/api/v2/status.json - Codex:
https://status.openai.com/api/v2/status.json(Codex CLI runs on the OpenAI API) - Codex usage:
GET https://chatgpt.com/backend-api/wham/usage(Bearer from~/.codex/auth.json); fallback to newest~/.codex/sessions/**/rollout-*.jsonl→ lastrate_limitsevent
- Claude:
git clone https://github.com/sskys18/claude-mine.git ~/claude-mine
cd ~/claude-mine
bun install && bun run build # builds dist/index.js + dist/health-probe.jsNo bun?
npm install && npx tscworks, but the build script usesbun build; adjust to emit bothdist/index.jsanddist/health-probe.js.
Add to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "node ~/claude-mine/dist/index.js",
"refreshInterval": 60
}
}refreshInterval (seconds) re-runs the status line on a timer so the session clock and health dots stay current while idle. Use 60 for the minute timer; drop to 1 for a per-second clock. Without it, the line only updates on activity (new message / tool / keystroke). Settings reload on your next interaction — no restart needed.
Open or interact with a Claude Code session; the four lines appear below the input. The health dots are gray on the first frame, then populate once the probe writes its cache (~1s).
- Claude Code v2.1.132+ (provides
context_window+rate_limitson stdin) - Node.js 22+ (probe uses global
fetch,node:fsrecursive readdir) or Bun - Optional:
codexCLI on PATH for the Codex usage line
| Color | Usage |
|---|---|
| Neon green | 0–50% used / operational |
| Electric gold | 51–80% / minor |
| Hot red | 81–100% / major-critical |
| Gray | labels, separators, stale/unknown |
MIT