Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✳ Claude Usage Widget

See how much of your Claude Pro/Max plan you've used — right in your Mac menu bar, in your browser, and as an iPhone widget.

menu bar:   ✳ 19%·28%     ← 5-hour session · weekly limit
dashboard:  http://localhost:8737
iPhone:     home-screen widget with usage bars

Everything runs 100% on your own Mac. Your Claude login never leaves it.

What you need

  • A Mac with Claude Code installed and logged in (any Claude Pro or Max plan)

Install (2 minutes)

Open the Terminal app, paste this, and press Enter:

git clone https://github.com/mayaswap/claude-usage-widget.git ~/claude-usage-widget && ~/claude-usage-widget/install.sh

That's it. Look for in your menu bar. If macOS asks about keychain access, click Always Allow.

iPhone widget (optional, 2 minutes)

Works when your iPhone is on the same Wi-Fi as your Mac (and the Mac is awake).

  1. Install the free Scriptable app.
  2. In Scriptable: + → paste the contents of ios/ClaudeUsage.js → name it ClaudeUsage.
  3. Long-press your home screen → add a Scriptable widget → long-press it → Edit Widget → Script: ClaudeUsage, and paste the URL the installer printed (like http://My-MacBook.local:8737/usage.json) into Parameter.

Uninstall

launchctl bootout gui/$(id -u)/com.widget-usage.server
rm ~/Library/LaunchAgents/com.widget-usage.server.plist
rm -rf ~/claude-usage-widget

Then remove SwiftBar if you don't use it for anything else (brew uninstall swiftbar).

Build from source

There's nothing to compile 🙂 — this is three small plain-text scripts you can read in a minute:

File What it does
mac/claude-usage.5m.sh menu bar widget (SwiftBar plugin, refreshes every 5 min)
server/claude_usage_server.py tiny local web server for the dashboard + iPhone widget
ios/ClaudeUsage.js the iPhone widget (Scriptable)

Cloning the repo and running install.sh is installing from source.

How it works & disclaimer

The scripts read your Claude Code login token from the macOS keychain and ask Anthropic's usage endpoint — the same one Claude Code's /usage command uses — every few minutes. The token is only ever sent to api.anthropic.com.

⚠️ That endpoint is not officially documented, so this may break without notice. Not affiliated with Anthropic. The local server has no password — anyone on your home network can see your usage percentages (and nothing else).

About

See your Claude Pro/Max plan usage in the Mac menu bar, browser dashboard, and as an iPhone widget — 100% local

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages