
claude-code-usage-swiftbar
Claude Code usage for SwiftBar.
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up claude-code-usage-swiftbar (release-binary project) into my current project. Found on https://claudeers.com/claude-code-usage-swiftbar Repo: https://github.com/agusalvarez6/claude-code-usage-swiftbar Homepage/docs: — Detected install method: release-binary → inspect the README Category: plugins. Platforms: api, web. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: active; community-verified: false. Confirm the source before running anything.
Grab the latest release asset from GitHub.
# download a build from https://github.com/agusalvarez6/claude-code-usage-swiftbar/releases
git clone https://github.com/agusalvarez6/claude-code-usage-swiftbar
// compatibility
| Platforms | api, web |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Shell |
Claude Code Usage for SwiftBar
This SwiftBar plugin shows Claude Code's
rolling 5-hour and 7-day usage in the macOS menu bar. It uses the same data
as Claude Code's /usage command.

The crab reacts as either window approaches its limit. The 5-hour row estimates when the current average pace will reach the limit.
Security and data
The plugin reads Claude Code's OAuth access token from your macOS Keychain. It keeps
the token in memory and sends it only to api.anthropic.com over HTTPS. It doesn't
write the token to disk or refresh it.
The cache in $TMPDIR stores the last usage result and fetch time. It contains no
credentials.
The plugin uses only Node.js built-ins. It requires no API key or background service.
Requirements
- macOS with SwiftBar
- Node.js 18 or later on your
PATH - An active Claude Code login
Install
-
Install SwiftBar:
brew install --cask swiftbar -
Open SwiftBar and select a plugin folder.
-
Clone this repository and run the installer:
git clone https://github.com/agusalvarez6/claude-code-usage-swiftbar.git cd claude-code-usage-swiftbar ./install.sh -
On the first run, click Always Allow when macOS asks to read the
Claude Code-credentialsKeychain item.
install.sh copies cc-usage.2m.js into SwiftBar's plugin folder and refreshes it.
Run it again after pulling updates. The installer preserves the configured refresh
interval.
To uninstall the plugin, delete the installed file:
rm "$(defaults read com.ambar.SwiftBar PluginDirectory)"/cc-usage.*m.js
Behavior
- The menu bar shows usage in green below 50%, yellow from 50% through 89%, and red at 90% or higher.
- SwiftBar sends the 90% notification only when macOS grants permission in System Settings > Notifications.
- After a failed request, the plugin shows the most recent successful result. It marks that result as cached after 10 minutes.
- The filename controls the polling interval. Rename the installed file to
cc-usage.5m.jsorcc-usage.10m.jsto poll less often. The installer preserves the renamed file. - If SwiftBar reports "node not found," add the Node.js executable path to the
launcher list on line 2 of
cc-usage.2m.js.
Limitations
- The plugin uses Claude Code's undocumented
/api/oauth/usageendpoint. An endpoint change can break the plugin. - If the token expires, open Claude Code to renew your login.
This project isn't affiliated with Anthropic or SwiftBar.
License
MIT. See LICENSE.
// faq
What is claude-code-usage-swiftbar?
Claude Code usage for SwiftBar.. It is open-source on GitHub.
Is claude-code-usage-swiftbar free to use?
claude-code-usage-swiftbar is open-source under the MIT license, so it is free to use.
What category does claude-code-usage-swiftbar belong to?
claude-code-usage-swiftbar is listed under plugins in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/claude-code-usage-swiftbar)
// retro hit counter
[](https://claudeers.com/claude-code-usage-swiftbar)
// reviews
// guestbook
// related in Claude Plugins
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explainin…
"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
financial-services — a Claude ecosystem project on GitHub.