Tokenmeter is a free, open-source desktop widget that supports Linux, Windows, and macOS and can stay at the top of the desktop for centrally viewing the remaining quotas of multiple AI coding tools and APIs.
Purpose: AI coding tools have different limits, including 5-hour windows, weekly caps, premium request quotas, and monthly budgets, and these are scattered across different pages. Tokenmeter displays these numbers side by side on the desktop, with “how much is left” as the primary information, helping users determine which tool they can currently rely on.
Main capabilities:
- Each card highlights the tightest limit, for example “42% left in the 5-hour limit,” “29% left this week,” “$57.82 left of the $100 budget.”
- Cards are sorted by those closest to their limits; you can also drag them manually to reorder.
- When any limit reaches 80% usage, the number and progress bar turn red and a warning icon is displayed.
- Local-first: most cards read files that the tools have already written on the computer; API keys are encrypted using the system keychain and are sent only to the corresponding providers.
- When pinned, only the cards are shown; hovering slides out the controls.
- Windows automatically installs updates; Linux updates via apt.
- Local cards refresh every minute, and API cards refresh every 5 minutes by default; this can be changed in settings.
Supported tools: Claude Code, Codex, GitHub Copilot, Gemini CLI, Grok CLI, as well as Claude API, OpenAI API, and xAI API.
Usage:
- Download the latest version from GitHub Releases.
- Linux (Debian, Ubuntu, and derivatives): add the Tokenmeter apt repository to update with the system; you can also directly install the .deb package from the releases page (sudo apt install ./tokenmeter-*-amd64.deb). The repository signing key is 51E7 3671 79B2 798A B250 5D10 7CFF 9452 0564 EA38.
- Windows: run tokenmeter-<version>-setup-x64.exe. The installer is not yet code-signed, so SmartScreen may indicate an unknown publisher; click “More info” → “Run anyway.” After that, it can update automatically.
- macOS: Can be installed via Homebrew, or download the corresponding .zip from the releases page (arm64 for Apple Silicon, x64 for Intel), then double-click and move Tokenmeter.app into "Applications". The app is not yet signed with an Apple Developer ID, so the first launch will be blocked; you need to click "Open Anyway" in "System Settings" → "Privacy & Security" (on macOS 14 and earlier, you can also right-click the app → Open). The app lives in the menu bar and does not show a Dock icon.
- After launch, if you use Claude Code, Codex, Gemini CLI, or Grok CLI, the local tool cards will appear automatically; if you have logged in to Claude Code or Codex with a subscription, their cards will directly show the real 5-hour and weekly limits with no extra setup.
- Add API tool keys in Settings (gear icon), or click "Set Up" on the "Not set" row at the bottom of the widget: for Claude API use Claude Console → Settings → Admin Keys (organization accounts only); for xAI API use console.x.ai → Settings → Management Keys, and enter the team ID from Team settings; for OpenAI API use platform.openai.com → Settings → Organization → Admin keys; for GitHub Copilot run gh auth token and paste the output. Optional: set a monthly budget for the Claude, OpenAI, or xAI API to show the remaining amount instead of the used amount.
- You can check "Launch at login", hide unused tools (× on the card, restore with +), and choose the card size.
- Full keyboard operation is supported, and the screen reader will announce when a tool starts failing or recovers.
- Shortly after launch and every 6 hours, new versions are checked; you can also check manually from the tray menu; when a new version is available, an update icon appears in the title bar. If "Automatically install updates" is turned off, you will only be notified.
Privacy and security: Usage data stays on this machine. Local cards only read files that the tools have already written; the Claude Code and Codex cards also use the login information already saved by the tools to contact Anthropic and OpenAI Plan limits are requested; the token is sent only to the corresponding provider, and Tokenmeter neither displays nor stores it. No data is sent to Tokenmeter or any third party; there are no analytics or telemetry. Keys are encrypted using the operating system keychain (macOS Keychain, Windows DPAPI, Linux GNOME Keyring / KWallet) and stored in the Tokenmeter settings folder, readable only by the user; if no keychain is running on Linux, Settings warns that keys are stored unencrypted. Keys are sent only to the corresponding provider (for example, an Anthropic key is sent only to api.anthropic.com), never to the widget page. The widget page is locked down: no Node.js access, and a strict Content Security Policy is used, with no remote content loaded. Environment variables can also be used instead of saved keys: ANTHROPIC_ADMIN_KEY, XAI_MANAGEMENT_API_KEY + XAI_TEAM_ID, OPENAI_ADMIN_KEY, GITHUB_TOKEN. Please report security issues privately via GitHub Security Advisories.
What the numbers mean:
- Claude Code: Limits come from the same (undisclosed) endpoint used by Claude Code's /usage and refresh every few minutes. If you are not logged in or your login has expired, the card shows only today's tokens until Claude Code is opened again.
- Codex: Limits come in real time from ChatGPT (the endpoint used by Codex's /status) and refresh every few minutes. If you sign in with an API key, your login has expired, or ChatGPT cannot be reached, the card falls back to the last snapshot saved locally by Codex.
- GitHub Copilot: Uses the same undisclosed endpoint as the Copilot editor extension; GitHub may change it at any time.
- Gemini CLI: Gemini API keys have no usage endpoint, so only usage through the CLI is counted.
- Grok CLI: Costs are those reported by the CLI (API-equivalent pricing), not the grok.com subscription bill; key-based spending is shown on the xAI API card.
- Claude API: Data usually arrives within about 5 minutes; daily costs are calculated by UTC day and exclude Priority Tierfees.
Limitations and troubleshooting:
- No tray icon on GNOME: install the AppIndicator and KStatusNotifierItem Support extensions (Ubuntu includes them by default).
- Cannot stay on top under Wayland: Wayland does not allow applications to stay on top or choose their position themselves; Tokenmeter runs through XWayland by default (Settings → “Use XWayland on Wayland”).
- Claude Code or Codex does not show plan limits: open the tool once to refresh the login; Tokenmeter only reads and will not log in by itself. Limits require a subscription login (Claude Pro/Max, ChatGPT plan), not an API key. On macOS, Claude Code stores login information in the keychain; the system may ask once whether to allow Tokenmeter to read it—choose “Always Allow”.
- No data for local tools: check their folders in Settings; the defaults are ~/.claude, ~/.codex, ~/.gemini, and ~/.grok (for example, C:\Users\you.codex on Windows).
- Migrating from “AI Usage Widget”: on first launch, old settings are copied; saved keys may need to be re-entered because keychain entries are tied to the application name.
Tokenmeter is an Electron app written in pure JavaScript, with no UI framework and no build step for the app itself. The project is under the MIT license, copyright Mugesh Kannan K S.