Monitor your Claude API usage and reset time directly in your macOS menu bar
Built on the trusted ccusage CLI tool, this ultra-lightweight 195-line Swift app displays your Claude usage percentage and reset countdown without cluttering your workflow.
Transform your ccusage terminal data for your current active billing block into a persistent menu bar indicator:
- β Configurable display metrics - choose what to show in menu bar
- π Available metrics: percentage, time, tokens, money (with used/left toggle)
- ποΈ Smart toggles - money option auto-disables when inappropriate
- β° Current block tracking - monitors your active Claude billing period
- π Auto-refresh every 30 seconds - always current data
- β¨οΈ Right-click menu to toggle display options and refresh
- πββοΈ Auto-start on login - enabled by default
- πͺΆ Ultra-minimal - just 195 lines of Swift code
# Method 1: Using Homebrew tap (preferred)
brew tap joachimbrindeau/ccusage-monitor
brew install ccusage-monitor
# Method 2: Direct install script (if tap fails)
curl -fsSL https://raw.githubusercontent.com/joachimBrindeau/ccusage-monitor/main/install.sh | bash
# Launch the Claude usage monitor (auto-start enabled by default)
ccusage-monitor# One-command install with automatic startup
git clone https://github.com/joachimBrindeau/ccusage-monitor.git
cd ccusage-monitor
./installWhat the installer does
- Checks dependencies - Swift, Node.js, ccusage
- Installs ccusage if missing (
npm install -g ccusage) - Tests ccusage connection to ensure Claude API access
- Installs monitor to
~/.local/share/ccusage-monitor/ - Creates launcher at
~/.local/bin/ccusage-monitor - Sets up auto-start (Launch Agent) - enabled by default
- Starts immediately in menu bar
# Run directly from source (requires ccusage installed)
swift main.swift| Step | Process | Description |
|---|---|---|
| 1οΈβ£ | CCUsage CLI | Fetches your Claude API usage data from Anthropic |
| 2οΈβ£ | JSON Parsing | Monitor parses ccusage blocks --active --json output |
| 3οΈβ£ | Menu Bar Display | Shows "75% | 2h 15m" format in your status bar |
| 4οΈβ£ | Auto-Refresh | Updates every 30 seconds automatically |
# Monitor commands
ccusage-monitor # Start monitor
pkill -f 'swift main.swift' # Stop monitor
# Auto-start control
launchctl load ~/Library/LaunchAgents/com.ccusage.monitor.plist # Enable auto-start
launchctl unload ~/Library/LaunchAgents/com.ccusage.monitor.plist # Disable auto-start| Action | Shortcut | Function |
|---|---|---|
| Refresh Claude Data | βR |
Instantly update current block stats |
| Show Percentage | β/β | Toggle percentage display (used or left) |
| Show Time | β/β | Toggle time display (elapsed or remaining) |
| Show Tokens | β/β | Toggle token display (used or left) |
| Show Money | β/β | Toggle cost display (used only) |
| Toggle Used/Left | - | Switch between used vs remaining metrics |
| Quit Monitor | βQ |
Stop Claude usage tracking |
Default display: 92% | 3h 45m (percentage used and time elapsed)
- β Prevent API limit exceeded errors during development
- β Track token consumption in real-time while coding
- β Monitor Claude billing cycles for budget management
- β Optimize prompt efficiency based on usage patterns
- β Claude Pro subscription monitoring - track monthly limits
- β Research budget management - never exceed allocations
- β Content planning based on remaining Claude capacity
- β Team coordination for shared Claude usage
- β Claude Enterprise usage tracking across team members
- β Cost optimization for Claude API consumption
- β Workflow planning around Claude reset cycles
- β Resource allocation based on real usage data
Technical details for developers
- Language: Swift 5.5+ with Cocoa framework
- Dependencies: ccusage CLI tool only
- Process: Spawns
npx ccusagesubprocess every 30 seconds - UI: Native macOS status bar item (NSStatusItem)
- Startup: macOS Launch Agent (plist-based)
// Ultra-minimal 181-line implementation
class AppDelegate: NSObject, NSApplicationDelegate {
private var statusItem: NSStatusItem!
private var options = ["percentage": true, "timeLeft": true, "tokens": false, "money": false]
private var showUsed = true
}Process()executesnpx ccusage blocks --active --jsonJSONSerializationparses response- Extract
totalTokens,projection.totalTokens,projection.remainingMinutes - Calculate percentage and format time display
- Update
NSStatusItem.button.title
| Requirement | Version | Purpose |
|---|---|---|
| macOS | 10.15+ (Catalina) | Native status bar support |
| Node.js | Any recent version | Powers ccusage CLI tool |
| Swift | 5.5+ | Included with Xcode Command Line Tools |
| ccusage | Latest | Core Claude usage data provider |
Common issues and solutions
Cause: CCUsage CLI not working properly
Solutions:
# Check ccusage installation
npm list -g ccusage
# Test ccusage directly
npx ccusage blocks --active --json
# Reinstall if needed
npm install -g ccusage@latestCause: Swift or system requirements not met
Solutions:
# Verify Swift installation
swift --version
# Install Xcode Command Line Tools if missing
xcode-select --install
# Try running directly
cd ccusage-monitor && swift main.swiftCause: Launch Agent configuration issues
Solutions:
# Check launch agent status
launchctl list | grep ccusage
# Reload launch agent
launchctl unload ~/Library/LaunchAgents/com.ccusage.monitor.plist
launchctl load ~/Library/LaunchAgents/com.ccusage.monitor.plist
# Verify permissions
ls -la ~/Library/LaunchAgents/com.ccusage.monitor.plistOpen an issue on GitHub with:
- macOS version
- ccusage version (
npm list -g ccusage) - Error message or expected vs actual behavior
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If CCUsage Monitor helps you track your Claude API usage, please give it a star! β
Built with β€οΈ for the Claude API community
π Homepage β’ π Issues β’ π Releases