Display AI agent rate limit usage in your tmux status bar. Shows session and weekly utilization for Codex and Claude with color-coded percentages and a braille reset indicator.
Compact mode (--compact):
- Green < 50%, yellow 50–79%, red 80%+
- Three spark bars per provider: 5h usage, weekly usage, time until reset
- Cache-first with 55s TTL — tmux refreshes stay instant
curl -fsSL https://raw.githubusercontent.com/raine/tmux-agent-usage/main/scripts/install.sh | bashbrew install raine/agent-usage/agent-usagecargo install --git https://github.com/raine/tmux-agent-usageAdd to ~/.tmux.conf:
# Configure which providers to show (default: codex)
set -g @agent-usage-providers "codex claude"
set -g @plugin 'raine/tmux-agent-usage'The plugin auto-installs the binary if not found in PATH.
set -g status-right-length 120
set -g status-right '#(agent-usage codex)#(agent-usage claude)#[fg=green]%d.%m. %H:%M'Then reload: tmux source ~/.tmux.conf
Probes rate limits via JSON-RPC by spawning codex app-server, with a PTY
fallback that sends /status and parses the output. Requires codex in PATH
(or set CODEX_BINARY env var).
Reads OAuth credentials from macOS Keychain (falling back to
~/.claude/.credentials.json) and queries the
api.anthropic.com/api/oauth/usage endpoint. Requires being logged into Claude
Code.
# Show all providers
agent-usage
# Show a specific provider
agent-usage codex
agent-usage claude
# Debug mode (prints raw JSON snapshot, bypasses cache)
agent-usage --debug-probe
agent-usage claude --debug-probe- Cache-first: reads per-provider cache from
~/.cache/agent-usage/<provider>.json. If fresh (< 55s), prints immediately and exits. - Stale-serve: if cache exists but is stale, prints it immediately (no tmux lag), then tries to refresh behind a file lock.
- Probe: if no cache exists (first run), probes synchronously.
- Locking: file locks prevent thundering herd from multiple tmux panes. Atomic writes via PID-suffixed temp files prevent cache corruption.
The architecture is provider-agnostic. To add a new provider:
- Create
src/provider/<name>/mod.rsimplementing theProvidertrait - Add probe modules as needed
- Register in
provider::registry() - Cache, formatting, and CLI are automatically per-provider
# Run all checks (fmt, clippy, build, test)
just check
# Install debug binary via symlink
just install-dev
# Run directly
cargo run -- codex
cargo run -- claude --debug-probe- tmux-file-picker — A fuzzy file picker in a tmux popup
- workmux — Git worktrees + tmux windows for parallel AI agent workflows
- claude-history — Fuzzy-search Claude Code conversation history
- git-surgeon — Surgical, non-interactive git hunk control for AI agents
- consult-llm-mcp — MCP server for consulting powerful reasoning models in Claude Code

