GitHunt
LK

lkollar/xbar-claude-usage

xbar plugin to display Claude API usage limits in the macOS menu bar

Claude Usage - xbar Plugin

Displays Claude API usage limits in the macOS menu bar.

Features

  • Shows current usage percentage in menu bar with color-coded indicators
  • Displays both 5-hour and weekly rate limits
  • Shows time until each limit resets
  • Automatic 5-minute caching to minimize API calls

Requirements

  • macOS
  • xbar
  • Python 3
  • Claude Code CLI with valid OAuth credentials

Installation

  1. Install xbar from https://xbarapp.com/

  2. Copy the plugin to your xbar plugins directory:

    cp claude-usage.5m.py ~/Library/Application\ Support/xbar/plugins/
  3. Ensure the script is executable:

    chmod +x ~/Library/Application\ Support/xbar/plugins/claude-usage.5m.py
  4. Refresh xbar or restart the app

Authentication

The plugin authenticates using Claude Code credentials from either:

  • macOS Keychain (primary)
  • ~/.claude/.credentials.json (fallback)

Ensure you have authenticated with Claude Code CLI before using this plugin.

Display

Menu bar: Highest usage percentage with color coding

  • Green: < 50%
  • Orange: 50-80%
  • Red: >= 80%

Dropdown: Detailed breakdown of both limits with reset times

Contributors

Created December 7, 2025
Updated December 8, 2025