🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?
Claim this page →
tmux-claude-usage
Claude usage in tmux status bar
git clone https://github.com/docker-run/tmux-claude-usage

Your Claude usage — progress bar, percent, and reset time — right in the tmux status bar. It uses the official usage data Claude Code already receives — no API calls, no tokens, no rate limits — and updates live as you work.
Contents
How it works
Two small pieces:
- Harvester — a Claude Code status line
command. Claude hands it official session data (including
rate_limits) on every render; it writes your usage to a cache file and prints nothing, so no line appears inside the pane. - Segment — a tiny script your tmux status line calls. It reads that cache and renders the bar. Pure bash, no network.
Because the data comes from Claude itself, it's free and accurate, and refreshes whenever Claude renders — continuously while you work.
Requirements
tmux3.0+jq- Claude Code, signed in with a Claude Pro or Max subscription. The usage
data (
rate_limits) is sent only to Pro/Max sessions.
Installation
1. Add the plugin via TPM:
set -g @plugin 'docker-run/tmux-claude-usage'
2. Place the segment in your status line:
set -g status-right '#{claude_usage} %Y-%m-%d %H:%M'
3. Fetch and wire it up — press prefix + I (TPM clones the plugin), then
run the installer once (from inside tmux, so it can locate the clone):
bash "$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -d= -f2-)tmux-claude-usage/scripts/init.sh"
init.sh adds the status line command to Claude Code's settings.json (under
~/.claude, or $CLAUDE_CONFIG_DIR if you've set one), backing it up first.
Use Claude Code normally and the bar fills in.
Already have a Claude status line?
init.shkeeps it: it chains your line and the harvester through the single slot, so both run and your line still shows. Use--forceto install only the harvester instead, or--uninstallto restore your original line.Ordering matters. Claude Code has only one status-line slot. If you set up another status-line tool (e.g. ccstatusline) after this — or re-run its configurator later — it overwrites the slot and the usage bar silently stops updating. Just re-run
init.shto re-chain (it picks the other tool back up), or runinit.sh --checkto diagnose.
Without TPM
Clone it anywhere and source the entry point from your tmux.conf:
git clone https://github.com/docker-run/tmux-claude-usage \
~/.tmux/plugins/tmux-claude-usage
run-shell ~/.tmux/plugins/tmux-claude-usage/claude-usage.tmux
Then place #{claude_usage} in your status line (step 2) and run that clone's
scripts/init.sh (step 3).
Uninstall
bash "$(tmux show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -d= -f2-)tmux-claude-usage/scripts/init.sh" --uninstall
Restores any status line it chained, removes the harvester from Claude's
settings.json, and deletes the usage cache. To remove the plugin entirely,
also drop the @plugin line and #{claude_usage} from your tmux config and run
TPM clean (prefix + alt + u).
Configuration
Out of the box the segment shows the 5-hour session window, inherits your theme's color normally, and turns amber then red as you approach your limit. Everything below is tunable — for example, override the colors to match your theme (hex values or tmux color names both work).
| Option | Default | Description |
|---|---|---|
@claude_usage_show | session | session, weekly, or all |
@claude_usage_show_bar | on | Show the progress bar |
@claude_usage_bar_width | 10 | Bar width in cells |
@claude_usage_bar_full | █ | Filled bar character |
@claude_usage_bar_empty | ░ | Empty bar character |
@claude_usage_show_reset | on | Show "resets in …" |
@claude_usage_show_label | off | Prefix "Session"/"Week" (auto-on for all) |
@claude_usage_session_label | Session | Label for the 5-hour window |
@claude_usage_weekly_label | Week | Label for the 7-day window |
@claude_usage_prefix | (empty) | Text/icon before the segment |
@claude_usage_separator | | Between windows in all mode |
@claude_usage_stale_after | (off) | Seconds; flag the bar stale once the cache is older than this |
@claude_usage_stale_label | stale | Word used in the stale marker |
@claude_usage_warning_threshold | 70 | % for the warning color |
@claude_usage_critical_threshold | 90 | % for the critical color |
@claude_usage_color_normal | (theme) | Color below the warning threshold |
@claude_usage_color_warning | #e0af68 | Color at/above warning |
@claude_usage_color_critical | #f7768e | Color at/above critical |
Match the demo
The powerline look in the demo above is a full Tokyo Night Storm status-bar
theme, not part of the plugin — the plugin only contributes the
#{claude_usage} segment. For that exact look, check out
examples/tokyo-night-storm.conf.
Update frequency
The bar repaints every status-interval seconds (standard tmux setting, default
15). Lower it for a snappier bar — it just re-reads a local file, so it's free:
set -g status-interval 5
Repainting isn't the same as refreshing, though: the underlying numbers only
update when Claude Code renders and hands the harvester fresh data. Usage you
rack up elsewhere — the browser, another machine — won't appear until a local
Claude Code session renders again, so a number can sit unchanged while the real
figure climbs. There's no token-free way to fetch it on demand. To avoid mistaking
a stale figure for a live one, set @claude_usage_stale_after and the bar appends
e.g. (stale 2 hr) once the cache passes that age:
set -g @claude_usage_stale_after 1800 # mark stale after 30 min
Contribution
See the CONTRIBUTION.md file.
License
// compatibility
| Platforms | api, web |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Shell |
// faq
What is tmux-claude-usage?
Claude usage in tmux status bar. It is open-source on GitHub.
Is tmux-claude-usage free to use?
tmux-claude-usage is open-source under the MIT license, so it is free to use.
What category does tmux-claude-usage belong to?
tmux-claude-usage is listed under devops in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/tmux-claude-usage)
// retro hit counter
[](https://claudeers.com/tmux-claude-usage)
// reviews
// guestbook
// related in DevOps & CI/CD
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI…
Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic.
Professional Antigravity Account Manager & Switcher. One-click seamless account switching for Antigravity Tools. Built with Tauri v2 + React (Rust).专业的 Antig…
Roadmap to becoming an ASP.NET Core developer in 2026