Add Claude Usage Stats plugin (Dev/ClaudeUsage)#2167
Merged
Conversation
Real-time Claude Code token usage in the macOS menu bar. Session + weekly progress bars that match Claude.ai desktop exactly, burn rate, reset countdowns, project breakdown, cost estimates. Source: https://github.com/peterkoczan/claude-usage-bar
sprak3000
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude Usage Stats
Category: Dev
File:
Dev/ClaudeUsage/claude_usage.15s.pySource: https://github.com/peterkoczan/claude-usage-bar
What it does
Shows real-time Claude Code token usage in the macOS menu bar. Numbers are pulled directly from Anthropic's rate-limit response headers, so they match the "Plan usage limits" page in the Claude.ai desktop app to the percent.
Menu bar: today's output tokens + current usage % (colour-coded)
Dropdown:
How it stays accurate
Every Anthropic API response includes
anthropic-ratelimit-unified-5h-utilizationandanthropic-ratelimit-unified-7d-utilizationheaders. The plugin makes one minimalmax_tokens=1call per minute and reads these headers — the same data the Claude.ai desktop displays. Results are cached so the display refreshes every 15 s without extra API overhead.Requirements
Checklist
chmod +x)#!/usr/bin/env python3