---
repo: "mohan-n-swamy/tmux-llm-dashboard"
title: "tmux-llm-dashboard — Multi-Provider LLM Quota & Headroom Tmux Pane"
license: "MIT"
keywords: [tmux, llm, claude-code, token-usage, cost-monitoring, terminal-dashboard, cli, ai-agents, shell, developer-tools]
capabilities:
  - "Sub-15ms cached rendering (`status.sh --all` / `--watch <pane>`) with Gruvbox truecolor ANSI formatting."
  - "Global refresh-attempt backoff and stale-lock reclamation (`LOCK_STALE_AFTER=120s`) preventing background curl stampedes."
  - "Modular provider helpers (`helpers/codex-quota.sh`, `gemini-ultra-quota.sh`, `glm-quota.sh`, `deepseek-balance.sh`, `usage-line.sh`)."
  - "Zero-credential terminal preview via `bash helpers/demo-preview.sh`."
when_to_use:
  - "A fast, zero-daemon `zsh`/`bash` tmux dashboard that displays live subscription quota headroom, prepaid API balances, 7-day token spend, git branch state, and SSH/TCP host probes across Claude, Gemini, Codex, GLM, and DeepSeek without blocking terminal repaints."
  - "Engineers running multiple AI coding subscriptions hit 5-hour or weekly quota walls mid-refactor because usage sits buried across four separate billing web pages, while naive statusbar scripts curl APIs synchronously and freeze tmux. `tmux-llm-dashboard` renders instantaneously from tiny state files and refreshes stale providers asynchronously behind lockfiles."
inputs_required:
  - "MMS_STATE_DIR: Directory storing cached row values and refresh locks"
  - "MMS_HOSTS: Space-separated `label:host:port` entries for TCP reachability probes"
  - "MMS_TZ: IANA timezone for the dashboard clock row"
quickstart:
  - "brew install mohan-n-swamy/tap/tmux-llm-dashboard"
  - "bash helpers/demo-preview.sh"
  - "./install.sh"
---

# tmux-llm-dashboard — Multi-Provider LLM Quota & Headroom Tmux Pane — Machine-Readable Agent Guide

A fast, zero-daemon `zsh`/`bash` tmux dashboard that displays live subscription quota headroom, prepaid API balances, 7-day token spend, git branch state, and SSH/TCP host probes across Claude, Gemini, Codex, GLM, and DeepSeek without blocking terminal repaints.

<problem_patterns>
Engineers running multiple AI coding subscriptions hit 5-hour or weekly quota walls mid-refactor because usage sits buried across four separate billing web pages, while naive statusbar scripts curl APIs synchronously and freeze tmux. `tmux-llm-dashboard` renders instantaneously from tiny state files and refreshes stale providers asynchronously behind lockfiles.
</problem_patterns>

<architecture_map>
Key modules and entry points in this repository:
  - `status.sh`: Nine-row zsh renderer, pane tracker, staleness badge calculator, and lock manager
  - `helpers/`: Provider-specific quota/balance refreshers plus `demo-preview.sh`
  - `install.sh`: Tmux keybinding and helper setup script
</architecture_map>

<inputs_and_configuration>
Every organization-specific value enters through `.env` (copied from `.env.example`) or external adapter files. No source edit is needed to change organization names, endpoints, database URLs, webhook secrets, or thresholds.
</inputs_and_configuration>

<adaptation_playbook>
When a human asks an AI coding agent to deploy or adapt `tmux-llm-dashboard` into their stack:
  1. Add a new 15-line script in `helpers/<provider>-quota.sh` writing a single line to `$MMS_STATE_DIR/.<provider>.cache` and register it in `refresh_caches()`.
</adaptation_playbook>

<reference_docs>
- Product Requirements: `docs/PRD.md`
- Working-Backwards PR-FAQ: `docs/PR-FAQ.md`
- High-Level Architecture: `docs/HLD.md`
- Low-Level Interfaces & Runbook: `docs/LLD.md`
- Coding Agent Rules: `AGENTS.md`
</reference_docs>
