Skip to content

About

macOS menu bar app showing real-time Claude.ai plan usage (session %, weekly %, Sonnet %)

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ClaudeGlance

A lightweight macOS menu bar app that shows your Claude.ai plan usage in real time — session %, weekly %, Sonnet %, and time-until-reset — without opening a browser.

Fork of adntgv/claude-usage-systray with reset countdowns, granular menu-bar toggles, a redesigned settings window, a universal (Intel + Apple Silicon) build, and a fix for the resets_at: null crash. See Differences from upstream.

What it shows

The menu bar title is assembled from any combination of these elements, in a fixed order, separated by ·:

Element Default Description
Ring gauge off Dual-ring icon — outer = 5h session, inner = 7d weekly, with a pace notch on the 5h ring (fill past it = ahead of pace)
5h % on Current session usage (resets ~every 5 hours)
7d % on Weekly all-models usage
Sonnet % off Weekly Sonnet-only usage
5h reset on Countdown to the session reset (e.g. 4h12m)
7d reset off Countdown to the weekly reset

With the defaults you'll see something like 35% · 71% · 4h12m, followed by a colored service-health dot (🟢 operational → 🔴 outage) sourced from the public Claude status page. The whole status item dims when the data goes stale (no refresh in 12+ minutes), so old numbers never read as current.

Open the menu for the glance:

  • Each period's exact reset time and the current service status.
  • Burn rate & run-out ETA — when your 5h usage is climbing, a line like On pace for 100% by 3:47 PM (or Using ~12%/hr) projected from the trend.
  • Usage credits in dollars — when pay-as-you-go credits are on, your overage spend against the monthly cap (e.g. $1.20 / $50 (2%)).
  • A two-line "Today" glance from local Claude Code logs — Today: 1.2M tokens · 5d streak and ≈ $3.40 today · $42 this month. Each row (and the 5h/7d rows) deep-links into the dashboard on the matching tab — they bold on hover.
  • Opt-in second glance (off by default, to keep the menu minimal): your active session's context-window fill with a prompt-cache freshness line, and a composite session health grade (Today's health: B+).

Percentages can show remaining headroom (84% left) instead of used (16%), and the menu-bar icon can be hidden for a text-only bar — both in Settings.

Mirrors the data on claude.ai/settings/usage.

Dashboard

Click any usage/cost/activity row in the menu — or pick Dashboard — to open a single tabbed window (built with SwiftUI + Swift Charts) that holds the richer detail the menu deliberately leaves out:

  • Usage — a 5h/7d utilization history chart recorded over time, plus the current session/weekly/Sonnet cards and reset countdowns, and a plan-fit nudge ("often near your limits" / "comfortable headroom") inferred from your observed limit-pressure and any overage — no plan tier assumed.
  • Cost — today / month-to-date / projected spend cards, a per-model breakdown (e.g. Opus 4.8 vs Sonnet), and a daily-spend chart. All API-equivalent (tokens × model price; a flat plan isn't billed per token).
  • Activity — a GitHub-style contribution heatmap, current/longest streak and active-day stats, a daily-token chart, and (opt-in) today's session health grade card with its contributing factors.
  • Tokens — "where your tokens go": month-to-date composition split by type (cache read / cache write / input / output), plus a top tools / MCP breakdown of which tools are driving your sessions.
  • Context — per-active-session context-window fill (used / window, sized per model — 1M for Opus 4.6+, Sonnet 4.6+ and Fable, 200K for Haiku and older models) with a live prompt-cache freshness countdown (warm → the next message hits a cheap cache read; cold → it re-pays cache creation), and any other live sessions.

Everything in the dashboard is computed locally — the cost/activity/tokens/context tabs from your ~/.claude/projects logs, the usage history from ClaudeGlance's own recordings.

Where history lives

Streaks, the heatmap and the utilization chart outlive the logs they came from. Claude Code deletes its transcripts after cleanupPeriodDays (30 by default), so ClaudeGlance rolls each day's totals into its own archive and merges them max-wins — a day it has already recorded can grow, never shrink.

Every history file is written to two places and unioned on load:

Path
Primary ~/Library/Application Support/ClaudeGlance/
Mirror ~/.claudeglance/

Both sit outside the .app, so upgrades and a drag-to-Trash uninstall leave them alone. Third-party uninstallers sweep Application Support by bundle id but don't know about the home dot-directory, so a wipe-and-reinstall still finds its history — whichever copy survives restores the other. Payloads carry a version so a future format change can't silently zero them; an unreadable file is set aside as *.corrupt.json rather than overwritten.

For a new Mac, Settings › History backup exports all three stores to a single JSON file. Import merges — it only ever adds days back.

To remove history deliberately, brew uninstall --zap claudeglance clears both locations; a plain uninstall leaves them, which is what makes a reinstall pick up where you left off.

Copy usage

Copy usage in the menu puts one line on the clipboard, ready to paste into a chat or an issue: Claude usage: 5h 35% (resets 2:40 PM) · 7d 71% (resets Thu 9:00 AM). It always shows usage (not the remaining toggle), and reset times are clock times so the line stays right after it's pasted.

Wrapped card

Share Wrapped card… (in the menu, or the Share Wrapped button on the dashboard's Activity tab) renders a shareable image of your month with Claude — total tokens, cache efficiency, spend & caching savings, your streak, and your top model/tool — from the same local logs. The preview window offers Save, Copy, and the macOS Share sheet. All computed locally; nothing leaves your machine until you choose to share it.

Claude Code statusline

ClaudeGlance can put its usage numbers right in your Claude Code sessions, as a statusline:

Opus 4.8  5h 35% · 7d 71%

It works by reusing the numbers the app already has: ClaudeGlance writes its current usage to a small JSON sidecar each poll, and a bundled shell script reads that file. No extra API calls, no log parsing per render — the line just reflects whatever the menu bar is showing (so it needs the app running).

Set it up from Settings › Claude Code statusline:

  • Install script & copy snippet — copies claudeglance-statusline.sh into ~/.claude and puts the settings.json snippet on your clipboard to paste in.
  • Add to settings.json — does the wiring for you, after backing up your existing ~/.claude/settings.json (timestamped). Restart your Claude Code sessions to see it.

The model name comes from Claude Code's own statusline context; the 5h · 7d segment is ClaudeGlance's. Power users can build a custom line from the full sidecar at ~/Library/Application Support/ClaudeGlance/status.json (it also carries today's cost/tokens, reset countdowns, burn rate, and an on-pace ETA).

Requirements

  • macOS 13+ (universal — runs on both Apple Silicon and Intel)
  • A Claude (Pro/Max) account — sign in once from Settings › Claude sign-in via your browser. ClaudeGlance keeps its own token and renews it automatically; Claude Code is no longer required.

Install

Homebrew:

brew install --cask broots144/tap/claudeglance

From 1.8.4 the app and DMG are signed with a Developer ID and notarized by Apple, so they open without a warning. From 1.9.0 the app updates itself: it checks once a day and offers each new version (Settings › Automatically check for updates). The cask declares auto_updates, so brew upgrade leaves it to the app.

Or download the DMG from the Releases page, open it, and drag ClaudeGlance onto the Applications folder in the same window.

Releases before 1.8.4 were ad-hoc signed, not notarized. If macOS says it "cannot verify the developer" on one of those, right-click the app › Open (once), or run xattr -dr com.apple.quarantine /Applications/ClaudeGlance.app.

To check that a downloaded DMG was built by this repo's release workflow from a tagged commit (and not swapped afterwards), verify its build provenance with the GitHub CLI before opening it:

gh attestation verify ClaudeGlance.dmg -R workshop144/claudeglance

Releases from 1.8.2 on carry an attestation. Homebrew and Nix installs are already pinned to the release's SHA-256.

Nix (flake): the repo ships a flake that packages the released app (aarch64-darwin / x86_64-darwin). It tracks the latest public release.

# Run it once without installing:
nix run github:workshop144/claudeglance

# …or add it to your profile:
nix profile install github:workshop144/claudeglance

For nix-darwin or home-manager, add the package to your config:

{
  inputs.claudeglance.url = "github:workshop144/claudeglance";
  # then, in your darwin/home modules:
  #   environment.systemPackages = [ inputs.claudeglance.packages.${system}.default ];   # nix-darwin
  #   home.packages            = [ inputs.claudeglance.packages.${system}.default ];     # home-manager
}

The package installs ClaudeGlance.app into the store; nix-darwin / home-manager link .app bundles into ~/Applications so Spotlight and Finder can launch it (e.g. via mac-app-util). The store is read-only and Nix owns the version, so a Nix install never updates itself; move to a new release by updating the flake input.

Build from source

git clone https://github.com/workshop144/claudeglance
cd claudeglance
xcodebuild -scheme ClaudeGlance -configuration Release build
open ~/Library/Developer/Xcode/DerivedData/ClaudeGlance-*/Build/Products/Release/ClaudeGlance.app

Or open ClaudeGlance.xcodeproj in Xcode and run with ⌘R.

To produce a drag-to-Applications disk image from a built app:

scripts/make-dmg.sh path/to/ClaudeGlance.app ClaudeGlance.dmg

Settings

Open Settings from the app's menu. The window uses a clean, native layout (Ollama-style), and every menu-bar element toggles independently — so you can show just a countdown, just percentages, or any mix.

Setting Default Description
Launch at login Off Start the app automatically when you log in
Automatically check for updates On Check daily and offer new versions; "Check now" checks immediately (not shown for Nix or dev builds)
Show menu-bar icon On Show the icon/gauge; off = a text-only menu bar
Show remaining, not used Off Display headroom (84% left) instead of utilization (16%)
Show ring gauge Off Dual-ring usage gauge (outer 5h, inner 7d) in the menu bar
Show 5h % On Session usage in the menu bar
Show 7d % On Weekly usage in the menu bar
Show Sonnet % Off Weekly Sonnet usage in the menu bar
Show 5h reset countdown On Time until the session resets
Show 7d reset countdown Off Time until the weekly limit resets
Show service health On Colored Claude service-status dot in the menu bar
Show today's activity On Today's tokens, active time & messages (from local logs)
Show usage credits On Pay-as-you-go credit state, with a link to manage it
Show context window Off Active session's context-window fill + cache freshness
Show session grade Off Today's composite health grade (A–F)
Show uptime history Off 30-day Claude service-status uptime bar under the health row
Refresh interval 5 min How often to poll usage (1–30 min)
Warning threshold 80% Usage % that triggers a warning notification
Critical threshold 90% Usage % that triggers a critical notification
Usage alerts On macOS notification when a threshold is crossed
Reset notifications On Notify when a limit resets after you were near it

Thresholds drive notifications — the menu bar text itself stays a single neutral color for legibility across light and dark menu bars.

How it works

You sign in once through your browser (an OAuth 2.0 PKCE flow). ClaudeGlance stores the resulting access/refresh tokens in its own macOS Keychain item (ClaudeGlance-credentials) — which it created, so reading it never triggers a password prompt — and refreshes them itself before they expire. It then calls the same internal endpoint that powers claude.ai/settings/usage:

GET https://api.anthropic.com/api/oauth/usage
Authorization: Bearer <oauth_token>
anthropic-beta: oauth-2025-04-20

The token is cached in memory and re-read from the Keychain automatically before it expires — and again whenever a request comes back 401 — so a token Claude Code has rotated is picked up without restarting the app. Usage is polled on a configurable interval (1–30 min, default 5), and manual Refresh is throttled so rapid taps can't trip the endpoint's rate limit.

Local logs are read from ~/.claude/projects by default; set CLAUDE_CONFIG_DIR (a single path, or several separated by : or ,) to scan additional Claude config directories.

Note: This endpoint is undocumented and may change. It requires Claude Code to be installed and logged in.

Running tests

cd claudeglance
xcodebuild test -scheme ClaudeGlance -destination 'platform=macOS'

Differences from upstream

This fork diverges from adntgv/claude-usage-systray:

  • Today's activity + dashboard — a two-line "Today" glance in the menu (tokens · streak; cost today · this month), backed by a full dashboard window (Activity / Cost / Tokens / Context / Usage tabs with charts, a heatmap, a per-model cost breakdown, token composition, tool/MCP usage, and per-session context-window monitoring), all parsed from the local Claude Code session logs (~/.claude/projects). No auth, no Keychain, no network.
  • Power "second glance" (opt-in) — context-window fill + prompt-cache freshness countdown, a composite session health grade (A–F), and a used-vs-remaining toggle.
  • Service-health badge — a colored dot from the public Claude status page (status.claude.com), in the menu bar and menu. No auth, no Keychain.
  • Launch at login toggle in Settings, using the modern SMAppService API (no helper bundle, reflects the real system login-item state).
  • Reset countdowns in the menu bar (5h and 7d) in compact 4h12m form.
  • Granular per-element toggles replacing the single "compact display" switch — show any mix of 5h %, 7d %, Sonnet %, and the two countdowns.
  • Redesigned settings window with a clean, native (Ollama-style) layout and non-highlighting read-only rows.
  • Universal binary — Release builds are pinned to x86_64 arm64, so the app keeps running on Intel Macs even as future toolchains drop x86_64 by default.
  • resets_at: null fix — the usage endpoint returns a null reset time for any period with nothing to reset (e.g. Sonnet at 0%). Upstream's non-optional decoding threw on the null, collapsing the whole response into a blank 0% / 0% widget. Now handled gracefully, with a regression test.

License

MIT — © 2026 adntgv (original author) and contributors to this fork.

Disclaimer

ClaudeGlance is an independent, community-built project. It is not affiliated with, endorsed by, or sponsored by Anthropic. "Claude" is a trademark of Anthropic; it is used here only to describe what the app reads. The app relies on an undocumented endpoint that may change or break at any time.

About

macOS menu bar app showing real-time Claude.ai plan usage (session %, weekly %, Sonnet %)

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages