u/maxkordiyak

▲ 60 r/tmux

Claude Code usage in your tmux status bar — no API calls, it just reads the data Claude already gives the status line

I was keeping a browser tab with Claude usage page and checking it constantly. I usually have several projects going at once across multiple tmux windows, and the limits are shared across all of them anyway — so putting Claude's status line in every window felt redundant and just cluttered each pane. I wanted one clean place to see usage instead of duplicating the same number everywhere.

So I built a tmux plugin that puts it right in the status bar — progress bar, percent used, and time until reset, in a single spot.

The part I'm happiest with: it makes zero API calls. Claude Code already hands its status line official session data (including rate_limits) on every render. The plugin just taps that — a small "harvester" status-line command caches it and prints nothing (so no line appears in your panes), and a tiny bash segment reads the cache and draws the bar. No curl, no API key, no separate rate limits, no network at all. Pure bash + jq, and it refreshes live as you work.

Features:

  • Progress bar + percent + reset time in the status bar
  • Color thresholds, configurable
  • Resets to 0% the moment a limit window rolls over — no lingering on a stale leftover percentage
  • Optional staleness marker (off by default) for when usage happened elsewhere and the cached number isn't live yet

Requirements: tmux 3.0+, jq, and Claude Code (logged in).

Install via TPM:

set -g u/plugin 'docker-run/tmux-claude-usage'

set -g status-right '#{claude_usage}  %Y-%m-%d %H:%M'

Then prefix + I and run the one-time init.sh (it wires the status-line command into ~/.claude/settings.json, backing it up first).

Repo: https://github.com/docker-run/tmux-claude-usage

Thanks for taking a look, and I hope it saves someone else the constant tab-switching. Hope you find it useful!

u/maxkordiyak — 12 days ago