{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/session-demo.gif\" alt=\"claude-gauge demo\" width=\"580\">\n</p>\n\n<h1 align=\"center\">claude-gauge</h1>\n\n<p align=\"center\">\n  Rate limit awareness for Claude Code — without wasting a single token.\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Claude_Code-plugin-5A45FF?style=flat-square\" alt=\"Claude Code Plugin\">\n  <img src=\"https://img.shields.io/badge/node-18%2B-brightgreen?style=flat-square\" alt=\"Node 18+\">\n  <img src=\"https://img.shields.io/badge/zero-dependencies-blue?style=flat-square\" alt=\"Zero Dependencies\">\n  <img src=\"https://img.shields.io/badge/license-MIT-green?style=flat-square\" alt=\"MIT License\">\n  <a href=\"https://github.com/mil-orb/claude-gauge/actions/workflows/github-code-scanning/codeql\"><img src=\"https://github.com/mil-orb/claude-gauge/actions/workflows/github-code-scanning/codeql/badge.svg\" alt=\"CodeQL\"></a>\n</p>\n\n---\n\nYou don't know you're approaching your rate limit until Claude stops responding. Checking with `/usage` breaks your flow. Alt-tabbing to the Anthropic dashboard breaks it even more.\n\n**claude-gauge** puts a live session dashboard in your status line — rate limit utilization, token count, cost, and session duration, all in one glanceable bar. The bar fills as you consume quota — green when you're fine, red when you're running low. Always visible, zero interruption.\n\n## How It Works\n\n```\nClaude Code  →  statusline.js  →  reads native rate_limits field\n                                   from Claude Code's statusline JSON\n                                         ↓\n                                   Renders fuel bar + session metrics\n```\n\nClaude Code (v2.1.80+) natively provides rate limit data in the `rate_limits` field of the JSON passed to statusline scripts. claude-gauge reads this directly — no proxy, no extra API calls, no external dependencies.\n\n## Install\n\n**Step 1** — In Claude Code, run these two commands:\n\n```\n/plugin marketplace add mil-orb/claude-gauge\n/plugin install claude-gauge\n```\n\n**Step 2** — Restart Claude Code.\n\nThat's it. The gauge appears in your status line immediately.\n\n## What You See\n\n<p align=\"center\">\n  <img src=\"assets/screenshot.png\" alt=\"claude-gauge in Claude Code\" width=\"580\">\n</p>\n\n```\n████████▒░░░░░░░░░░░ ⚡32% · 47.9k · $1.84 · 3m\n│                     │       │        │       └─ session duration\n│                     │       │        └──────── session cost (USD)\n│                     │       └───────────────── session tokens (input + output)\n│                     └───────────────────────── 5h rate limit utilization\n└─────────────────────────────────────────────── gauge bar (fills as quota is consumed)\n```\n\n- Bar **fills** from left as utilization climbs (use `drain` mode for a fuel gauge that empties)\n- Color shifts green → yellow → red with your chosen color scheme\n- `⚡32%` — your 5-hour rolling utilization percentage\n- Session tokens are read from Claude Code's local JSONL transcript files\n\n## Display Types\n\nFive built-in visualizations:\n\n<p align=\"center\">\n  <img src=\"assets/display-modes.gif\" alt=\"display modes\" width=\"580\">\n</p>\n\n| Type | Preview | Description |\n|------|---------|-------------|\n| `bar` | `██████████████░░░░░░` | Default — fills as quota is consumed |\n| `drain` | `░░░░░░██████████████` | Fuel gauge — empties as quota is consumed |\n| `dots` | `●●●●●●●●●●●●●○○○○○○` | Minimal circle pips |\n| `blocks` | `⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀` | Dense braille blocks |\n| `compact` | `● ⚡23%` | Text only, no bar |\n\n## Color Schemes\n\nSeven 24-bit true color schemes that escalate as utilization climbs:\n\n<p align=\"center\">\n  <img src=\"assets/color-schemes.gif\" alt=\"color schemes\" width=\"580\">\n</p>\n\n| Scheme | Transition | Style |\n|--------|-----------|-------|\n| `gradient` | green → yellow → red | Uniform fill, single color |\n| `ocean` | cyan → blue → purple | Uniform fill |\n| `ember` | yellow → orange → deep red | Uniform fill |\n| `frost` | white → light blue → deep blue | Uniform fill |\n| `retro` | green / yellow / red | Hard CGA steps at 33%/66% |\n| `spectrum` | green → yellow → red | **Per-character gradient** — each bar character is a different color |\n| `mono` | white → gray → dark | Grayscale |\n\n`spectrum` is the only per-character scheme — it paints a full rainbow gradient across the bar width regardless of fill level. All others apply one color uniformly based on utilization percentage.\n\n## Configuration\n\nRun `/claude-gauge:config` for an interactive setup, or edit `config.json` in the plugin directory directly. Changes take effect on the next status line refresh — no restart needed.\n\n```jsonc\n{\n  \"display\": \"bar\",           // bar, drain, dots, blocks, compact\n  \"color\": \"gradient\",        // gradient, ocean, ember, frost, retro, spectrum, mono\n  \"bar_size\": \"medium\",       // small (10), medium (20), large (30), xlarge (40), or a number\n  \"show_cost\": true,          // running session cost in USD\n  \"show_duration\": true,      // elapsed session time\n  \"show_lines\": false,        // lines added and removed\n  \"currency_rate\": null       // local currency conversion (e.g. 0.79 for GBP, symbol auto-detected)\n}\n```\n\n> **Tip:** Config path is `~/.claude/plugins/claude-gauge/config.json`\n\n## Uninstall\n\n**Step 1** — Run the uninstall script:\n\n```bash\nbash ~/.claude/plugins/cache/mil-orb/claude-gauge/*/scripts/uninstall.sh\n```\n\n**Step 2** — Remove the plugin from Claude Code:\n\n```\n/plugin uninstall claude-gauge\n```\n\n**Step 3** — Start a new Claude Code session.\n\n<details>\n<summary>What the uninstall script does</summary>\n\n- **Restores your status line** — restores your previous statusline config from backup, or removes the `statusLine` block from `~/.claude/settings.json`\n\n</details>\n\n## Requirements\n\n- Node.js 18+ (included with Claude Code)\n- Claude Code v2.1.80+ (provides native `rate_limits` field)\n- A terminal with 24-bit color support (most modern terminals)\n- No additional dependencies\n\n## License\n\nMIT\n",
  "bytes": 5934,
  "sha": "21a9f74a6f101c7a98580874cd0a01c2fc11b902e64be3ba5a68207d304d1766",
  "repo_slug": "mil-orb/claude-gauge",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_mil_orb_claude_gauge_claude_gauge_9e9b99bc/readme"
}