Native macOS menu bar app for tracking Claude AI usage limits in real-time. Built with Swift/SwiftUI.
3,467
stars
367
commits
Swift
primary language
Aug 31, 2026
updated
A native macOS menu bar application for real-time monitoring of Claude AI usage limits
๐ฌ๐ง English โข ๐ช๐ธ Espaรฑol โข ๐ซ๐ท Franรงais โข ๐ฉ๐ช Deutsch โข ๐ฎ๐น Italiano โข ๐ต๐น Portuguรชs โข ๐ง๐ท Portuguรชs (BR) โข ๐ฏ๐ต ๆฅๆฌ่ช โข ๐ฐ๐ท ํ๊ตญ์ด โข ๐จ๐ณ ็ฎไฝไธญๆ โข ๐น๐ผ ็น้ซไธญๆ โข ๐น๐ท Tรผrkรงe โข ๐บ๐ฆ ะฃะบัะฐัะฝััะบะฐ
macOS 14.0+ (Sonoma) | ~6 MB | Native Swift/SwiftUI | Officially Signed
Claude Usage Tracker is a lightweight, native macOS menu bar application that provides real-time monitoring of your Claude AI usage limits. Built entirely with Swift and SwiftUI, it offers a clean, intuitive interface to track your 5-hour session window, weekly usage limits, and Opus-specific consumption.
Menu bar icon and detailed usage popover
v3.2.0 (2026-07-12): Dynamic Island (Beta) โ live Claude Code activity HUD at the notch; Fable per-model tracking via the new limits[] usage format; credentials moved to the macOS Keychain (GHSA-mfxh-xpwm-23c7); profile switching overhaul (no more forced re-logins); usage history storage fix (silent settings loss on macOS 26); macOS 26/27 crash and sign-in fixes; localization parity across all 13 languages. Huge thanks to 9 community contributors.
v3.1.0 (2026-04-14): Peak hours indicator with flame icon and countdown popover, right-click context menu on menu bar icons, per-element statusline color customization (#208), weekly & extra usage segments in statusline (#177), active profile indicator in multi-profile mode, Nix installation option (#211), 3 new languages (Brazilian Portuguese, Turkish, Ukrainian) bringing total to 12, 13 bug fixes including popover crash on profile switch, app hang on launch, and E3000 unauthorized errors
v3.0.3 (2026-03-10): 6-tier pace system with colored pace markers, 3 color modes (Multi-Color/Greyscale/Single Color), label toggles, 24-hour time format, terminal-matching preview colors
v3.0.2 (2026-03-10): API cost tracking with daily chart, browser-based authentication, rate limit header usage for CLI OAuth, auto-sizing popover, session key expiry tracking
v3.0.1 (2026-03-08): Popover settings tab, multi-display CPU fix
v3.0.0 - Major Release (2026-03-08): Headless mode, usage history charts, global shortcuts, auto-switch profiles, borderless settings, 6 new statusline components, Simplified Chinese
v2.3.0 โ Multi-profile menu bar display, remaining percentage toggle
v2.2.0 โ Multi-profile management, CLI integration, Korean language
v2.0.0 โ Apple code signing, automatic updates, Keychain security
Before installing Claude Usage Tracker, ensure you have:
Authentication (choose one method):
Note: For terminal statusline integration, you'll still need to manually configure a session key even if using Claude Code OAuth
brew install --cask hamed-elfayome/claude-usage/claude-usage-tracker
Or tap first, then install:
brew tap hamed-elfayome/claude-usage
brew install --cask claude-usage-tracker
Note: Starting with v2.0.0, the app is officially signed with an Apple Developer certificate. No security workarounds needed!
To update:
brew upgrade --cask claude-usage-tracker
Or use the built-in automatic update feature (Settings โ Updates).
To uninstall:
brew uninstall --cask claude-usage-tracker
Test the app:
nix-shell -p claude-usage-tracker
Install it using home-manager:
home.packages = with pkgs; [
claude-usage-tracker
];
.zip file from the link aboveClaude Usage.app to your Applications folderv2.0.0+ Note: The app is now officially signed with an Apple Developer certificate. You can install and run it like any other Mac application - no security warnings or workarounds needed.
Automatic Updates: Once installed, the app will automatically check for updates and notify you when new versions are available (Settings โ Updates).
# Clone the repository
git clone https://github.com/hamed-elfayome/Claude-Usage-Tracker.git
cd Claude-Usage-Tracker
# Open in Xcode
open "Claude Usage.xcodeproj"
# Build and run (โR)
New in v2.2.2: If you have Claude Code installed and logged in, the app works automatically!
Install Claude Code (if not already installed)
claude loginLaunch Claude Usage Tracker
Verify It's Working
If you don't use Claude Code, sign in directly through the app:
If you prefer manual configuration:
Step 1: Extract Your Session Key
Open Claude AI
Open Developer Tools
F12 or Cmd+Option+I (macOS) / Ctrl+Shift+I (Windows)Cmd+Option+IF12 or Cmd+Option+I (macOS) / Ctrl+Shift+I (Windows)Navigate to Cookies
sessionKey cookiesk-ant-sid01-...)Step 2: Configure Session Key
Step 3: Verify It's Working
Success! The app is now monitoring your Claude usage.
If you prefer to configure the session key manually instead of using the setup wizard:
# Create session key file
echo "sk-ant-sid01-YOUR_SESSION_KEY_HERE" > ~/.claude-session-key
# Set secure permissions (important for security)
chmod 600 ~/.claude-session-key
After creating the file, launch the app and it will automatically detect the session key.
New in v2.2.0: Claude Usage Tracker now supports unlimited profiles, allowing you to manage multiple Claude accounts seamlessly with automatic credential switching.
New in v3.0.0: Auto-switch profiles when session limit reached, usage history tracking, and global keyboard shortcuts!
Each profile has isolated settings:
Access profile switcher in multiple places:
Create Profiles:
Configure Credentials:
Sync Claude Code (Optional):
Switch Profiles:
Click the menu bar icon to access:
Access comprehensive settings through the menu bar popover โ Settings button. The app features a modern sidebar interface with profile switcher and organized tabs:
Configure your Claude.ai personal account:
Configure API console usage tracking:
Sync Claude Code CLI credentials:
Customize menu bar icon per profile:
Per-profile behavior configuration:
Create and manage multiple profiles:
Application language preferences:
Terminal integration (app-wide):
~/.claude/Automatic update configuration:
Application information:
Bring real-time Claude usage monitoring directly into your terminal with Claude Code statusline integration! Display your current usage percentage, model name, context window, profile name, git branch, and working directory without leaving your development workflow.
Claude Code is Anthropic's official CLI tool for interacting with Claude AI directly from your terminal. The statusline feature allows you to display custom information at the bottom of your terminal window.
Open Claude Usage Tracker Settings
Choose Your Components
โ on progress bar at elapsed time position (6-tier pace colors)Preview Your Statusline
claude-usage โ โ main โ Opus โ Work โ Ctx: 48% โ Usage: 25% โโโโโโโโโโ โ Reset: 3:45 PMApply Configuration
~/.claude/settings.json will be updated automaticallyRestart Claude Code
The setup automatically creates:
~/.claude/fetch-claude-usage.swift: Swift script that fetches usage data from Claude API~/.claude/statusline-command.sh: Bash script that builds the statusline display~/.claude/statusline-config.txt: Configuration file with your component preferences~/.claude/settings.json: Updated with statusline command (or created if doesn't exist)All scripts are set with secure permissions (755) and only read your existing session key file.
| Component | Description | Example |
|---|---|---|
| Directory | Current directory name | claude-usage |
| Git Branch | Active git branch | โ main |
| Model | Current model name | Opus |
| Profile | Active profile name | Work |
| Context | Context window usage | Ctx: 48% or 96K |
| Usage | Session percentage | Usage: 25% or 25% |
| Progress Bar | 10-segment visual indicator | โโโโโโโโโโ |
| Pace Marker | Colored marker at elapsed time position | โโโโโโโโโโ |
| Reset Time | When session resets | โ Reset: 3:45 PM or โ 15:45 |
Usage bar is color-coded with a 10-level gradient:
Pace marker uses a 6-tier system based on projected end-of-period usage:
Color modes (applies to both menu bar and statusline):
To remove the statusline:
This removes the statusline configuration but keeps the scripts installed for easy re-enabling.
~/.claude/settings.json exists and has the statusline configurationThis indicates the Swift script couldn't fetch usage data:
~/.claude-session-key existsIf scripts can't be executed:
chmod 755 ~/.claude/fetch-claude-usage.swift
chmod 755 ~/.claude/statusline-command.sh
With all components enabled (Multi-Color mode):
my-project โ โ feature/new-ui โ Opus โ Work โ Ctx: 48% โ Usage: 47% โโโโโโโโโโ โ Reset: 4:15 PM
Compact (labels hidden, 24h time):
my-project โ โ develop โ 12% โโโโโโโโโโ โ 16:15
Model and context only:
Sonnet โ Ctx: 96K โ Usage: 25%
The application integrates with multiple Claude API endpoints for comprehensive usage tracking:
GET https://claude.ai/api/organizations/{org_id}/usage
Authentication: Session cookie (sessionKey) from claude.ai
Response Structure:
five_hour: 5-hour session usage data
utilization_pct: Usage percentage (0-100)reset_at: ISO 8601 timestamp for next resetseven_day: Weekly usage across all models
utilization_pct: Weekly usage percentageseven_day_opus: Opus-specific weekly usage
utilization_pct: Opus weekly percentageextra_usage: Claude Extra cost tracking (if applicable)
current_spending: Amount spentbudget_limit: Maximum allowed spendingGET https://api.anthropic.com/v1/organization/{org_id}/usage
Authentication: API Key (x-api-key header)
Response Structure:
The app can simultaneously monitor both web (claude.ai) and API console usage, providing complete visibility into your Claude consumption across all access methods.
If you see "Unauthorized" or 403 errors:
If icons briefly flash to zero during refresh:
Session keys may expire after a period of time. You'll receive a notification 24 hours before expiry (v3.0.2+). To refresh:
If automatic updates aren't working:
This project is built for the community โ everyone is welcome
A huge thank you to everyone who contributed code, translations, bug reports, and pull requests. Your effort makes this project possible:
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
This application is not affiliated with, endorsed by, or sponsored by Anthropic PBC. Claude is a trademark of Anthropic PBC. This is an independent third-party tool created for personal usage monitoring.
This project is developed using AI-assisted workflows (primarily Claude Code via Happy). We believe in transparent collaboration between human developers and AI tools.
Swift
99.6%
Native macOS menu bar app for tracking Claude AI usage limits in real-time. Built with Swift/SwiftUI.
3,467
stars
367
commits
Swift
primary language
Aug 31, 2026
updated
A native macOS menu bar application for real-time monitoring of Claude AI usage limits
๐ฌ๐ง English โข ๐ช๐ธ Espaรฑol โข ๐ซ๐ท Franรงais โข ๐ฉ๐ช Deutsch โข ๐ฎ๐น Italiano โข ๐ต๐น Portuguรชs โข ๐ง๐ท Portuguรชs (BR) โข ๐ฏ๐ต ๆฅๆฌ่ช โข ๐ฐ๐ท ํ๊ตญ์ด โข ๐จ๐ณ ็ฎไฝไธญๆ โข ๐น๐ผ ็น้ซไธญๆ โข ๐น๐ท Tรผrkรงe โข ๐บ๐ฆ ะฃะบัะฐัะฝััะบะฐ
macOS 14.0+ (Sonoma) | ~6 MB | Native Swift/SwiftUI | Officially Signed
Claude Usage Tracker is a lightweight, native macOS menu bar application that provides real-time monitoring of your Claude AI usage limits. Built entirely with Swift and SwiftUI, it offers a clean, intuitive interface to track your 5-hour session window, weekly usage limits, and Opus-specific consumption.
Menu bar icon and detailed usage popover
v3.2.0 (2026-07-12): Dynamic Island (Beta) โ live Claude Code activity HUD at the notch; Fable per-model tracking via the new limits[] usage format; credentials moved to the macOS Keychain (GHSA-mfxh-xpwm-23c7); profile switching overhaul (no more forced re-logins); usage history storage fix (silent settings loss on macOS 26); macOS 26/27 crash and sign-in fixes; localization parity across all 13 languages. Huge thanks to 9 community contributors.
v3.1.0 (2026-04-14): Peak hours indicator with flame icon and countdown popover, right-click context menu on menu bar icons, per-element statusline color customization (#208), weekly & extra usage segments in statusline (#177), active profile indicator in multi-profile mode, Nix installation option (#211), 3 new languages (Brazilian Portuguese, Turkish, Ukrainian) bringing total to 12, 13 bug fixes including popover crash on profile switch, app hang on launch, and E3000 unauthorized errors
v3.0.3 (2026-03-10): 6-tier pace system with colored pace markers, 3 color modes (Multi-Color/Greyscale/Single Color), label toggles, 24-hour time format, terminal-matching preview colors
v3.0.2 (2026-03-10): API cost tracking with daily chart, browser-based authentication, rate limit header usage for CLI OAuth, auto-sizing popover, session key expiry tracking
v3.0.1 (2026-03-08): Popover settings tab, multi-display CPU fix
v3.0.0 - Major Release (2026-03-08): Headless mode, usage history charts, global shortcuts, auto-switch profiles, borderless settings, 6 new statusline components, Simplified Chinese
v2.3.0 โ Multi-profile menu bar display, remaining percentage toggle
v2.2.0 โ Multi-profile management, CLI integration, Korean language
v2.0.0 โ Apple code signing, automatic updates, Keychain security
Before installing Claude Usage Tracker, ensure you have:
Authentication (choose one method):
Note: For terminal statusline integration, you'll still need to manually configure a session key even if using Claude Code OAuth
brew install --cask hamed-elfayome/claude-usage/claude-usage-tracker
Or tap first, then install:
brew tap hamed-elfayome/claude-usage
brew install --cask claude-usage-tracker
Note: Starting with v2.0.0, the app is officially signed with an Apple Developer certificate. No security workarounds needed!
To update:
brew upgrade --cask claude-usage-tracker
Or use the built-in automatic update feature (Settings โ Updates).
To uninstall:
brew uninstall --cask claude-usage-tracker
Test the app:
nix-shell -p claude-usage-tracker
Install it using home-manager:
home.packages = with pkgs; [
claude-usage-tracker
];
.zip file from the link aboveClaude Usage.app to your Applications folderv2.0.0+ Note: The app is now officially signed with an Apple Developer certificate. You can install and run it like any other Mac application - no security warnings or workarounds needed.
Automatic Updates: Once installed, the app will automatically check for updates and notify you when new versions are available (Settings โ Updates).
# Clone the repository
git clone https://github.com/hamed-elfayome/Claude-Usage-Tracker.git
cd Claude-Usage-Tracker
# Open in Xcode
open "Claude Usage.xcodeproj"
# Build and run (โR)
New in v2.2.2: If you have Claude Code installed and logged in, the app works automatically!
Install Claude Code (if not already installed)
claude loginLaunch Claude Usage Tracker
Verify It's Working
If you don't use Claude Code, sign in directly through the app:
If you prefer manual configuration:
Step 1: Extract Your Session Key
Open Claude AI
Open Developer Tools
F12 or Cmd+Option+I (macOS) / Ctrl+Shift+I (Windows)Cmd+Option+IF12 or Cmd+Option+I (macOS) / Ctrl+Shift+I (Windows)Navigate to Cookies
sessionKey cookiesk-ant-sid01-...)Step 2: Configure Session Key
Step 3: Verify It's Working
Success! The app is now monitoring your Claude usage.
If you prefer to configure the session key manually instead of using the setup wizard:
# Create session key file
echo "sk-ant-sid01-YOUR_SESSION_KEY_HERE" > ~/.claude-session-key
# Set secure permissions (important for security)
chmod 600 ~/.claude-session-key
After creating the file, launch the app and it will automatically detect the session key.
New in v2.2.0: Claude Usage Tracker now supports unlimited profiles, allowing you to manage multiple Claude accounts seamlessly with automatic credential switching.
New in v3.0.0: Auto-switch profiles when session limit reached, usage history tracking, and global keyboard shortcuts!
Each profile has isolated settings:
Access profile switcher in multiple places:
Create Profiles:
Configure Credentials:
Sync Claude Code (Optional):
Switch Profiles:
Click the menu bar icon to access:
Access comprehensive settings through the menu bar popover โ Settings button. The app features a modern sidebar interface with profile switcher and organized tabs:
Configure your Claude.ai personal account:
Configure API console usage tracking:
Sync Claude Code CLI credentials:
Customize menu bar icon per profile:
Per-profile behavior configuration:
Create and manage multiple profiles:
Application language preferences:
Terminal integration (app-wide):
~/.claude/Automatic update configuration:
Application information:
Bring real-time Claude usage monitoring directly into your terminal with Claude Code statusline integration! Display your current usage percentage, model name, context window, profile name, git branch, and working directory without leaving your development workflow.
Claude Code is Anthropic's official CLI tool for interacting with Claude AI directly from your terminal. The statusline feature allows you to display custom information at the bottom of your terminal window.
Open Claude Usage Tracker Settings
Choose Your Components
โ on progress bar at elapsed time position (6-tier pace colors)Preview Your Statusline
claude-usage โ โ main โ Opus โ Work โ Ctx: 48% โ Usage: 25% โโโโโโโโโโ โ Reset: 3:45 PMApply Configuration
~/.claude/settings.json will be updated automaticallyRestart Claude Code
The setup automatically creates:
~/.claude/fetch-claude-usage.swift: Swift script that fetches usage data from Claude API~/.claude/statusline-command.sh: Bash script that builds the statusline display~/.claude/statusline-config.txt: Configuration file with your component preferences~/.claude/settings.json: Updated with statusline command (or created if doesn't exist)All scripts are set with secure permissions (755) and only read your existing session key file.
| Component | Description | Example |
|---|---|---|
| Directory | Current directory name | claude-usage |
| Git Branch | Active git branch | โ main |
| Model | Current model name | Opus |
| Profile | Active profile name | Work |
| Context | Context window usage | Ctx: 48% or 96K |
| Usage | Session percentage | Usage: 25% or 25% |
| Progress Bar | 10-segment visual indicator | โโโโโโโโโโ |
| Pace Marker | Colored marker at elapsed time position | โโโโโโโโโโ |
| Reset Time | When session resets | โ Reset: 3:45 PM or โ 15:45 |
Usage bar is color-coded with a 10-level gradient:
Pace marker uses a 6-tier system based on projected end-of-period usage:
Color modes (applies to both menu bar and statusline):
To remove the statusline:
This removes the statusline configuration but keeps the scripts installed for easy re-enabling.
~/.claude/settings.json exists and has the statusline configurationThis indicates the Swift script couldn't fetch usage data:
~/.claude-session-key existsIf scripts can't be executed:
chmod 755 ~/.claude/fetch-claude-usage.swift
chmod 755 ~/.claude/statusline-command.sh
With all components enabled (Multi-Color mode):
my-project โ โ feature/new-ui โ Opus โ Work โ Ctx: 48% โ Usage: 47% โโโโโโโโโโ โ Reset: 4:15 PM
Compact (labels hidden, 24h time):
my-project โ โ develop โ 12% โโโโโโโโโโ โ 16:15
Model and context only:
Sonnet โ Ctx: 96K โ Usage: 25%
The application integrates with multiple Claude API endpoints for comprehensive usage tracking:
GET https://claude.ai/api/organizations/{org_id}/usage
Authentication: Session cookie (sessionKey) from claude.ai
Response Structure:
five_hour: 5-hour session usage data
utilization_pct: Usage percentage (0-100)reset_at: ISO 8601 timestamp for next resetseven_day: Weekly usage across all models
utilization_pct: Weekly usage percentageseven_day_opus: Opus-specific weekly usage
utilization_pct: Opus weekly percentageextra_usage: Claude Extra cost tracking (if applicable)
current_spending: Amount spentbudget_limit: Maximum allowed spendingGET https://api.anthropic.com/v1/organization/{org_id}/usage
Authentication: API Key (x-api-key header)
Response Structure:
The app can simultaneously monitor both web (claude.ai) and API console usage, providing complete visibility into your Claude consumption across all access methods.
If you see "Unauthorized" or 403 errors:
If icons briefly flash to zero during refresh:
Session keys may expire after a period of time. You'll receive a notification 24 hours before expiry (v3.0.2+). To refresh:
If automatic updates aren't working:
This project is built for the community โ everyone is welcome
A huge thank you to everyone who contributed code, translations, bug reports, and pull requests. Your effort makes this project possible:
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
This application is not affiliated with, endorsed by, or sponsored by Anthropic PBC. Claude is a trademark of Anthropic PBC. This is an independent third-party tool created for personal usage monitoring.
This project is developed using AI-assisted workflows (primarily Claude Code via Happy). We believe in transparent collaboration between human developers and AI tools.
Swift
99.6%