{
  "markdown": "# Claude Usage Statusline\n\nA Claude Code plugin that displays real-time usage percentages and reset countdowns in your terminal status line.\n\n## What it shows\n\n```\n5h:29.3% (1h46m) ~2.1%/min out@16:30  7d:36.0% (2d15h)  ctx:10.5%\n```\n\n| Indicator | Description |\n|-----------|-------------|\n| `5h` | 5-hour rolling session usage percentage |\n| `7d` | 7-day weekly usage percentage |\n| `ctx` | Current context window usage |\n| `(Xh Ym)` | Time until the rate limit window resets |\n| `~X.X%/min` | Burn rate — how fast you're consuming the 5h limit |\n| `out@HH:MM` | Predicted local time when the 5h limit will be exhausted |\n\n## Features\n\n- Burn rate tracking — shows how fast you're consuming the 5h session limit\n- Exhaustion prediction — estimates when you'll hit 100% at the current pace\n- Holds the last known usage value when the API temporarily returns 0% between updates\n- Only resets to 0% when the actual rate limit timer expires\n- Shows days for 7d countdown (e.g. `3d02h`)\n- Works across macOS, Linux, and Windows (with Git Bash)\n- Auto-configures on session start\n\n## Requirements\n\n- [Claude Code](https://claude.ai/code) CLI\n- `jq` installed and available in PATH\n- `awk` installed (standard on macOS/Linux)\n\n## Installation\n\n### Option 1: Install via marketplace (recommended)\n\nAdd the marketplace to your `~/.claude/settings.json`:\n\n```json\n{\n  \"extraKnownMarketplaces\": {\n    \"simao-coutinho\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"simao-coutinho/claude-usage-statusline\"\n      }\n    }\n  }\n}\n```\n\nThen open Claude Code, type `/plugins`, go to the **Discover** tab and enable **claude-usage-statusline**.\n\n### Option 2: Clone and configure manually\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/simao-coutinho/claude-usage-statusline.git ~/.claude/claude-usage-statusline\n   ```\n\n2. Add the `statusLine` entry to your `~/.claude/settings.json`:\n   ```json\n   {\n     \"statusLine\": {\n       \"type\": \"command\",\n       \"command\": \"sh ~/.claude/claude-usage-statusline/statusline.sh\"\n     }\n   }\n   ```\n\n## How it works\n\nThe plugin consists of:\n\n- **`statusline.sh`** — The main script that reads Claude Code's JSON status data from stdin, extracts usage percentages and reset timestamps, and formats them for display.\n- **`hooks/`** — A `SessionStart` hook that automatically configures the statusline setting to point to the plugin's script.\n\n### Smart caching\n\nThe API occasionally returns 0% between updates. The plugin caches values in `/tmp/.claude_statusline_cache` and only accepts a lower value when the rate limit timer has actually expired. This prevents the status line from flickering to 0% during normal use.\n\n## Plugin structure\n\n```\nclaude-usage-statusline/\n├── .claude-plugin/\n│   ├── plugin.json          # Plugin manifest\n│   └── marketplace.json     # Marketplace metadata\n├── hooks/\n│   ├── hooks.json           # SessionStart hook config\n│   ├── run-hook.cmd         # Cross-platform hook runner\n│   └── setup-statusline     # Auto-configures statusLine setting\n├── statusline.sh            # Main statusline script\n├── README.md\n└── LICENSE\n```\n\n## Uninstall\n\nRemove the plugin from `/plugins` > **Installed** tab, or manually remove the `statusLine` and `extraKnownMarketplaces` entries from `~/.claude/settings.json`.\n\n## Privacy\n\nThis plugin runs entirely on your local machine. It does not collect, transmit, or store any personal data. The only file created is a temporary cache at `/tmp/.claude_statusline_cache` containing usage percentages for display consistency. No network requests are made by this plugin.\n\n## License\n\nMIT\n",
  "bytes": 3618,
  "sha": "281330b3d333a8ec2dbef966c9140c12c06c6027959f2161c8f6226424cdce91",
  "repo_slug": "simao-coutinho/claude-usage-statusline",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_simao_coutinho_claude_usage_statusline_c_950e0d53/readme"
}