{"slug": "show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits", "title": "Show HN: AI Gauge, a desktop monitor for Claude/Codex/Copilot usage limits", "summary": "AI Gauge, a new open-source desktop utility, now allows users to monitor usage limits for Claude.ai, ChatGPT Codex, GitHub Copilot, and OpenRouter from a single interface. The tool displays session and weekly usage, reset times, account balances, and spend in a compact always-visible widget or menu-bar item, supporting Windows, macOS, and Linux. The project is independent and unaffiliated with any AI provider, requiring Python 3.11+ and storing credentials in the OS-native credential store.", "body_md": "If you pay for multiple AI subscriptions and frequently check your usage, AI Gauge might help. It shows session and weekly usage, reset times, account balances, and spend in a compact always-visible view, so you can get the most out of what you're paying for.\n\nCompact monitor for **Claude.ai**, **ChatGPT Codex**, **GitHub Copilot**, and **OpenRouter** usage. Manual + auto refresh, with a platform-native UI on each OS:\n\n**Windows / Linux**— always-on-top draggable frameless widget plus a system-tray icon.** macOS**— Stats-style menu-bar item (`● 42% ● 78% ● 15%`\n\n); the panel opens as a popover when you click it.\n\nRequires Python 3.11+.Secrets live in the OS-native credential store (Windows Credential Manager / DPAPI, macOS Keychain, Linux Secret Service). Auto-start uses the platform's standard mechanism (Run key / LaunchAgent /`~/.config/autostart`\n\n).\n\nCurrent version: **0.5.9**. See [CHANGELOG.md](/jpajak/ai-gauge/blob/main/CHANGELOG.md) for release notes.\n\nAI Gauge is an independent open-source project and unofficial local desktop utility. It is not affiliated with Anthropic, OpenAI, GitHub, Microsoft, OpenRouter, or any other provider. Provider pages and APIs may change without notice.\n\n**Windows / Linux** — always-on-top floating widget, in full panel and collapsed pill modes:\n\n**macOS** — Stats-style menu-bar item with per-provider tinted dots; click to open the panel as a popover:\n\nPre-built binaries for each release are published on the [Releases page](https://github.com/jpajak/ai-gauge/releases). Pick the archive for your OS, extract, and run:\n\n| OS | Archive | Run |\n|---|---|---|\n| Windows | `ai-gauge-<version>-windows.zip` |\nextract, run `ai-gauge.exe` |\n| macOS | `ai-gauge-<version>-macos.tar.gz` |\nextract, drag `ai-gauge.app` to Applications |\n| Linux | `ai-gauge-<version>-linux.tar.gz` |\nextract, run `./ai-gauge/ai-gauge` |\n\nSHA256 sums are published alongside each archive. Builds are unsigned — see the [first-launch warnings](#build-a-standalone-binary) section below for SmartScreen / Gatekeeper handling.\n\n**Windows (PowerShell):**\n\n```\npy -m venv .venv\n.\\.venv\\Scripts\\python.exe -m pip install -e .[dev]\n.\\.venv\\Scripts\\python.exe -m aigauge\n```\n\n**macOS / Linux (bash):**\n\n```\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e '.[dev]'\n./.venv/bin/python -m aigauge\n```\n\nOn first launch the widget appears with enabled provider tiles. Claude and Codex use a **Sign in** flow; GitHub Copilot and OpenRouter are configured from Settings with API credentials. Open Settings to disable providers you don't use or to add more Claude/Codex accounts.\n\n| Provider | Setup |\n|---|---|\nClaude.ai |\nSign in (recommended): opens an embedded browser. Don't click \"Continue with Google\" — Google refuses to authenticate inside embedded browsers. If your account is Google-linked, just type that same email into the Enter your email box and use the magic link sent to your inbox. Paste cookie: fallback if magic-link is unavailable; see below. Add extra Claude subscriptions from Settings → Claude. |\nChatGPT Codex |\nSame as Claude — use email + magic link in the embedded browser, or paste cookie as a fallback. If your OpenAI account routes through Google or a passkey, use Paste cookie; embedded browsers often cannot complete those flows. Add extra Codex subscriptions from Settings → Codex. |\nGitHub Copilot |\nCreate a fine-grained PAT at\nAccount permissions → Plan → Read. Paste into Settings; set your monthly AI credit allowance (Pro=1,500, Pro+=7,000, Max=20,000). If Copilot is billed through an organization, enter the billing org and use a token/account with org billing access and Organization permissions → Administration → Read. |\nOpenRouter |\nCreate an inference API key at\n|\n\nClaude and Codex can track more than one subscription at a time. Open **Settings → Claude** or **Settings → Codex**, click **Add another**, give the account a short name, then use **Sign in** or **Paste cookie** for that specific row. The default account displays as `Claude`\n\nor `Codex`\n\n; named accounts display as `Claude (Work)`\n\n, `Codex (Account 2)`\n\n, etc.\n\nThe **General** tab controls provider groups. If Claude is checked, all configured Claude accounts appear; if Codex is checked, all configured Codex accounts appear. Secondary accounts can be removed from their provider tab. Each Claude/Codex account uses separate cookie storage, browser profile data, widget tile state, and history records.\n\nSessions persist between runs under the per-OS app-data directory:\n\n| OS | App data | Secrets backend |\n|---|---|---|\n| Windows | `%APPDATA%/ai-gauge/` |\nCredential Manager (GitHub PAT + OpenRouter keys) + DPAPI-encrypted `secrets.dat` (cookies, since the Credential Manager blob limit is too small for ChatGPT JWTs) |\n| macOS | `~/Library/Application Support/ai-gauge/` |\nLogin Keychain |\n| Linux | `~/.config/ai-gauge/` |\nSecret Service (GNOME Keyring / KWallet) |\n\nAI Gauge does not include telemetry or a backend service. Provider requests\nare made from the local app to the configured providers. See\n[SECURITY.md](/jpajak/ai-gauge/blob/main/SECURITY.md) for security and privacy notes.\n\nIf the embedded-browser sign-in doesn't work for you (e.g. your account requires Google sign-in, passkey authentication, or you can't use the magic-link path), copy your existing session cookie from your normal browser into the app. Cookies last weeks before they need re-pasting.\n\n- Sign into\n[https://claude.ai](https://claude.ai)(or[https://chatgpt.com](https://chatgpt.com)) in**Chrome / Edge / Firefox** as you normally do. - For ChatGPT, press\n**F12**→** Network**, reload the page, click a`chatgpt.com`\n\nrequest, and copy the full**Request Headers → Cookie:** value. This includes split session cookies plus companion auth cookies such as`__Secure-oai-is`\n\n. - For Claude, press\n**F12**→** Network**, reload`https://claude.ai/new#settings/usage`\n\n, click a`claude.ai`\n\nrequest, and copy the full**Request Headers → Cookie:** value. It must include`sessionKey`\n\n. - In the app: Settings → Claude or Settings → Codex → click\n**Paste cookie** next to the account, paste, Save.\n\n**Windows / Linux:** the widget floats above other windows by default. Drag anywhere to move; close (✕) hides to tray. Right-click the tray icon for Refresh / Settings / Quit. Left-click toggles widget visibility. Tray icon turns yellow ≥75% / red ≥90% based on the highest tile reading.**macOS:** the menu-bar item shows tinted status dots for enabled provider/account tiles. Click it to open the panel as a popover; click outside to dismiss. Right-click for the same Refresh / Settings / Quit menu.**Linux without a system tray**(stock GNOME): the floating widget stays visible and serves the same Show / Refresh / Settings / Quit menu via right-click on the widget.**Collapse / expand:** click the**−** button in the widget header to shrink to the compact pill view. Enabled provider/account chips wrap onto additional rows when needed, with named secondary Claude/Codex accounts using just the account name to save space.**Hide unused providers:** uncheck Claude / Codex / Copilot / OpenRouter in Settings to remove their group from the widget — useful if you only use one or two of them.- Auto-refresh is adaptive: manual refresh or changed usage enters the active cadence, then unchanged results back off toward the configured max interval. Defaults are 5 min active and 60 min idle max.\n- Enable\n**Start at login** in Settings if you want it to run as a daily utility.\n\nFor most users the [pre-built downloads](#download) are easier — this section is for building locally or for maintainers cutting releases. The build machine needs Python 3.11+ and a `.venv`\n\nwith `pip install -e .[dev]`\n\nalready run; the resulting binary does **not** require Python on the target machine.\n\n| OS | Command | Output |\n|---|---|---|\n| Windows | `.\\build.ps1` |\n`dist/ai-gauge/ai-gauge.exe` |\n| macOS | `./build.sh` |\n`dist/ai-gauge.app` |\n| Linux | `./build.sh` |\n`dist/ai-gauge/ai-gauge` |\n\nTagged commits matching `v*`\n\nautomatically run [the release workflow](/jpajak/ai-gauge/blob/main/.github/workflows/release.yml), which builds all three platforms in CI and uploads them as a draft GitHub Release for the maintainer to publish.\n\nBundles are ~150-200 MB because the Chromium runtime ships inside. User data still lives outside the bundle, under the per-OS app-data directory.\n\nFor a single-file binary (slower first launch), pass `-OneFile`\n\n(PowerShell) or `--onefile`\n\n(bash). On macOS the `.app`\n\nbundle is recommended over the single-file form.\n\n**First-launch warnings on signed-OS-bundle systems** — release artifacts are unsigned:\n\n**Windows:** SmartScreen → \"More info\" → \"Run anyway\".**macOS:** Gatekeeper blocks on first launch. Either right-click the`.app`\n\n→ Open the first time, or run`xattr -dr com.apple.quarantine ai-gauge.app`\n\nonce.**Linux:** no signing layer; just make`ai-gauge`\n\nexecutable if it isn't already.\n\nSee [RELEASING.md](/jpajak/ai-gauge/blob/main/RELEASING.md) for maintainer release steps.\n\n```\n.\\.venv\\Scripts\\python.exe -m pytest    # Windows\n./.venv/bin/python -m pytest            # macOS / Linux\n```\n\nTests cover: config round-trip, Copilot and OpenRouter REST helpers (with mocked HTTP), widget behavior, and snapshot models. Provider scrapers (Claude/Codex) require a live browser session and are validated manually.\n\nBug reports, provider-layout fixes, and PRs are welcome. See\n[CONTRIBUTING.md](/jpajak/ai-gauge/blob/main/CONTRIBUTING.md) for environment setup, test commands, and\nthe issue templates to use.\n\n**Why an embedded browser instead of reading Chrome cookies?** Chrome 127+ added App-Bound Encryption (mid-2024) that blocks every external Python library from decrypting Chrome/Edge cookies. Owning the browser session ourselves is the only reliable workaround.**Claude / Codex layouts may change.** If a provider tile shows \"error\" after a UI update upstream, the page-extractor JS in`src/aigauge/providers/{claude,codex}.py`\n\nneeds adjusting — the rest of the app keeps working.- The Copilot REST endpoint returns the\n*current calendar month*of billing usage. The widget tracks gross AI credits consumed against the included allowance; net quantity/amount is only the billable overage. Reset is computed as the 1st of the next month. GitHub does not currently expose a reliable personal-plan allowance field, so Settings uses a plan dropdown with a Custom fallback. Annual/request-based accounts are handled with a legacy premium-request fallback. **Copilot usage lags upstream.** The Copilot REST endpoint updates noticeably slower than Claude or Codex — credit counts can take hours to reflect recent activity. The widget shows the most recent value GitHub returns; treat the Copilot tile as a trailing indicator, not real-time.**Copilot AI credits.** GitHub moved Copilot from per-request quotas to token-based AI credits. Code completions and next edit suggestions remain included for paid plans, while Chat, CLI, cloud agent, Spaces, Spark, and third-party coding agents consume AI credits. The app shows the credit usage GitHub returns; if your account is org-billed, enter the billing organization so AI Gauge reads the organization billing pool.**OpenRouter uses two key types.** The inference key is used for`/key`\n\nspend data. The management key is required for`/credits`\n\naccount balance and`/activity`\n\nmodel history. Without a management key, AI Gauge still shows key-level spend but cannot show balance or model activity.**OpenRouter time windows are UTC.** Today/month spend come from OpenRouter's current UTC day and month fields. Model activity comes from OpenRouter's default`/activity`\n\nhistory window: the last 30 completed UTC days, excluding the current UTC day.", "url": "https://wpnews.pro/news/show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits", "canonical_source": "https://github.com/jpajak/ai-gauge", "published_at": "2026-06-04 02:18:46+00:00", "updated_at": "2026-06-04 02:46:20.933820+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "ai-infrastructure", "generative-ai", "large-language-models"], "entities": ["Claude.ai", "ChatGPT Codex", "GitHub Copilot", "OpenRouter", "Anthropic", "OpenAI", "GitHub", "Microsoft"], "alternates": {"html": "https://wpnews.pro/news/show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits", "markdown": "https://wpnews.pro/news/show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits.md", "text": "https://wpnews.pro/news/show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits.txt", "jsonld": "https://wpnews.pro/news/show-hn-ai-gauge-a-desktop-monitor-for-claude-codex-copilot-usage-limits.jsonld"}}