ccbar renders a compact two-line status line under your Claude Code prompt:
- Line 1 — an optional org/label badge, the model name, the current effort level, the workspace directory, and (optionally) the running session cost.
- Line 2 — colored usage bars for your context window, 5-hour rate limit, and 7-day rate limit, plus an optional overage bar for pay-as-you-go spending, each with a countdown to when it resets.
Bars turn 🟢 green → 🟡 yellow → 🔴 red as they fill, so you can see at a glance how much headroom you have left.
A few extras help you manage usage beyond the core bars:
- Idle 5-hour window — before you've sent your first message the 5-hour window hasn't started, so ccbar shows
5h idle to signal the clock isn't running. (Claude's 5-hour limit is a rolling window anchored to your first message — sending a quick throwaway prompt while idle starts the window early and shortens any eventual wait.)
- Burn-rate warning — when your current pace projects to exhaust a limit before it resets, ccbar appends a
⚠ <time> estimate to that bar. On by default; disable it in ccbar config.
- Overage bar (opt-in) — a separate
over bar tracking pay-as-you-go/extra-usage spending, independent of the 5-hour and 7-day plan quotas (a Pro/Max account can carry both at once). Off by default; enable it in ccbar config.
Beyond the status line, ccbar gives you two terminal commands: ccbar stats for an expanded usage panel, and ccbar history for 7-day usage trends.
Install
npx ccbar-cli
Or with curl:
curl -fsSL https://raw.githubusercontent.com/lakpriya1s/ccbar/main/install.sh | bash
The installer will:
- Install the
ccbar script to ~/.local/bin/ccbar.
- Wire it into
~/.claude/settings.json as your status line (backing up the file first).
- Run an interactive setup wizard so you can pick your label, segments, theme, and bar style.
Then start a new Claude Code session (or restart it) to see your status line.
Prefer not to pipe to bash? See Manual install.
As a Claude Code plugin
ccbar is also available as a Claude Code plugin. Inside Claude Code:
/plugin marketplace add lakpriya1s/ccbar
/plugin install ccbar@ccbar
Then run the setup command to wire ccbar into your status line:
/ccbar-setup
That copies the bundled ccbar script to ~/.local/bin/ccbar and adds the statusLine entry to ~/.claude/settings.json (merging, never clobbering, with a .bak backup). Run ccbar config to customize, then start a new session.
Claude Code plugins can't register a status line on their own, so /ccbar-setup performs that one-time wiring for you.
Requirements
- bash (macOS's built-in 3.2 is fine) and coreutils
date
- jq — used to read Claude Code's status JSON and to safely edit your settings
- macOS:
brew install jq
- Debian/Ubuntu:
sudo apt-get install jq
- Fedora:
sudo dnf install jq · Arch: sudo pacman -S jq · Alpine: sudo apk add jq
Configuration
Run the wizard anytime:
ccbar config
It writes a plain, hand-editable file at ~/.config/ccbar/config: