{"id":50977450,"url":"https://github.com/swaub/cc-usage-tracker","last_synced_at":"2026-06-19T09:32:53.870Z","repository":{"id":365739313,"uuid":"1273514153","full_name":"swaub/cc-usage-tracker","owner":"swaub","description":"Live Claude Code statusline: model, session cost, total tokens, context-to-compact, and rate-limit usage.","archived":false,"fork":false,"pushed_at":"2026-06-18T16:21:28.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T18:09:28.982Z","etag":null,"topics":["anthropic","claude","claude-code","claude-code-plugin","claude-plugin","statusline","usage-tracker"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swaub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T15:42:20.000Z","updated_at":"2026-06-18T16:21:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/swaub/cc-usage-tracker","commit_stats":null,"previous_names":["swaub/cc-usage-tracker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/swaub/cc-usage-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swaub%2Fcc-usage-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swaub%2Fcc-usage-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swaub%2Fcc-usage-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swaub%2Fcc-usage-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swaub","download_url":"https://codeload.github.com/swaub/cc-usage-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swaub%2Fcc-usage-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34526066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-code","claude-code-plugin","claude-plugin","statusline","usage-tracker"],"created_at":"2026-06-19T09:32:53.670Z","updated_at":"2026-06-19T09:32:53.863Z","avatar_url":"https://github.com/swaub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usage Tracker — Claude Code plugin\n\nA live, always-visible statusline for Claude Code showing the **current model**,\n**session cost**, **total tokens used**, **context window with headroom until\nauto-compact**, and your **5-hour / 7-day rate-limit usage** with reset times —\nso you never have to run `/usage` again.\n\n```\nOpus 4.8  ·  $2.17  ·  196,189 tokens     context █░░░░░░░░░ 7%  ↻ 58% to compact     session █░░░░░░░░░ 7%  ↻ 12pm     week █░░░░░░░░░ 11%  ↻ Jun 23\n```\n\nIt auto-refreshes after every message (and on a 5s idle timer). Pure Node, no\ndependencies — works on macOS, Linux, and WSL anywhere Claude Code runs.\n\n## Install\n\n```\n/plugin marketplace add swaub/cc-usage-tracker\n/plugin install usage-tracker@swaub\n/usage-tracker:trackusage on\n```\n\nThe first two commands fetch and enable the plugin. The third wires the\nstatusline into your `~/.claude/settings.json` and switches it on. It shows up on\nyour next message.\n\n\u003e Note: Claude Code plugins can't auto-register a statusline (it's a user\n\u003e setting), so the `on` step does that wiring for you once.\n\n## Toggle it any time\n\n```\n/usage-tracker:trackusage on         # turn on\n/usage-tracker:trackusage off        # blank the statusline (stays installed)\n/usage-tracker:trackusage status     # check current state\n/usage-tracker:trackusage            # toggle on/off\n/usage-tracker:trackusage cache on   # count input + output + cache tokens\n/usage-tracker:trackusage cache off  # count only input + output (default)\n/usage-tracker:trackusage cache      # toggle the cache setting\n```\n\nState lives in `~/.claude/usage-tracker.json`.\n\nBy default the **tokens** figure counts input + output only — the work actually\nsent and generated. Turn **cache on** to also include cache-creation and cache-read\ntokens (much larger, since the full context is re-read each turn). Both totals are\npre-computed, so switching modes updates instantly.\n\n## Updating\n\nClaude Code shows an \"update available\" indicator when a newer version is\npublished. To check and pull the latest at any time:\n\n```\n/plugin marketplace update\n/plugin update usage-tracker\n```\n\nRestart Claude Code for the update to take effect. Your on/off and cache settings\nare preserved across updates.\n\n## What each segment means\n\n| Segment                  | Meaning                                                        |\n|--------------------------|----------------------------------------------------------------|\n| `Opus 4.8`               | Current model                                                   |\n| `$2.17`                  | Estimated session cost (USD)                                    |\n| `196,189 tokens`         | Total tokens used this session (input + output, incl. subagents) |\n| `context █░ 7% ↻ 58%`    | Context window used + headroom remaining until auto-compact     |\n| `session █░ 7% ↻ 12pm`   | 5-hour rate-limit window + when it resets                       |\n| `week █░ 11% ↻ Jun 23`   | 7-day rate-limit window + reset date                            |\n\nThe rate-limit segments appear after the first model response in a session\n(that's when Claude Code provides the data). The **to compact** figure honors the\n`CLAUDE_CODE_AUTO_COMPACT_WINDOW` and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` environment\nvariables, and turns yellow under 25% / red under 10% headroom.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswaub%2Fcc-usage-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswaub%2Fcc-usage-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswaub%2Fcc-usage-tracker/lists"}