Skip to content
ai-usage
GitHubInstall

Version 0.14.1What’s new →

Know before you run out.

See how much of your Claude Code, Codex, and Grok quota is left, on your Mac and on every machine your team runs, and whether it lasts until the reset.

curl -fsSL https://raw.githubusercontent.com/neoromantic/ai-usage/main/install.sh | sh

macOS and Linux. On macOS 14+ it adds the menu bar app too. Or install with Homebrew, or from BB’s plugin catalog.

Works withClaude CodeCodexGrokHermes

View on GitHubHow it works ↓
The AI Usage menu bar app for a made-up team: Claude mira’s 5-hour limit is out and back in 1 hour 25 minutes, 13 alerts, and the team’s subscriptions at $703 a month; below it every Claude, Codex, and Grok subscription with its plan, what’s left, and when it resets, and Codex bots running out on Friday.The AI Usage menu bar app for a made-up team: Claude mira’s 5-hour limit is out and back in 1 hour 25 minutes, 13 alerts, and the team’s subscriptions at $703 a month; below it every Claude, Codex, and Grok subscription with its plan, what’s left, and when it resets, and Codex bots running out on Friday.

The problem

Every tool shows its own limit. None of them warn you.

  • One limit at a time.

    Claude Code and Codex each have their own 5-hour and weekly limits, and Grok its own credits for the period. Each shows only its own, only while you’re in it.

  • No warning.

    The week runs out in the middle of a task. Nothing told you that at this pace it would end days before the reset.

  • Worse on a team.

    Shared logins, build servers, bots in containers. Nobody sees which subscriptions you have, how full they are, who is burning them, and which sit idle.

ai-usage puts every subscription on one page, with a forecast to the reset.

Menu bar

One glance at the menu bar.

On a Mac, the same installer adds AI Usage to your menu bar; after Homebrew, ai-usage app install does. Its ring shows what’s left of your tightest limit. It turns orange when that limit will run out before its reset, and red, with a countdown, when it’s out. Show the percent left, the time to the reset, or just the ring.

macOS 14 or later · Apple silicon and Intel · starts at login · updates with ai-usage

The menu bar ring in each state: 100% unused, 42% on track, 17% tight, 0% used up, about 42% from a stale reading, 17% over in orange, out in red with 1h 25m to go, 2d 9h to the reset, no reading, and the ring alone.The menu bar ring in each state: 100% unused, 42% on track, 17% tight, 0% used up, about 42% from a stale reading, 17% over in orange, out in red with 1h 25m to go, 2d 9h to the reset, no reading, and the ring alone.
What the ring can say, from unused to out.

Details

Click once. Get the answer.

The first line says what matters right now: what’s out and when it’s back, what runs out and when, or where you have the most room. Below it, every Claude, Codex, and Grok subscription your team has, grouped by tool, worst first, with this Mac’s own marked.

Click a subscription for the whole story: a countdown to the moment it runs out, each window, the forecast, which machines spent it, and when it was last used.

Codex bots on Pro 200 opened in AI Usage: 17% left this week, runs out about Friday 08:59, resets Monday 02:40; the 5-hour window has 70% left; forecast 164% at the reset at this week’s pace, read 4 minutes ago from hermes@scout, this window spent by root@build-01 and hermes@scout among others, last used 20 minutes ago, a typed cost of $238 a month with its use unknown, 532 Hermes sessions on 10 devices.Codex bots on Pro 200 opened in AI Usage: 17% left this week, runs out about Friday 08:59, resets Monday 02:40; the 5-hour window has 70% left; forecast 164% at the reset at this week’s pace, read 4 minutes ago from hermes@scout, this window spent by root@build-01 and hermes@scout among others, last used 20 minutes ago, a typed cost of $238 a month with its use unknown, 532 Hermes sessions on 10 devices.

Forecasts

A forecast, not just a percentage.

“42% left” means little without the clock. ai-usage works out how full each limit will be at its reset at your pace, and says it plainly. The 5-hour and per-model limits show up too, when they’re the tighter one.

  • OVERCodex bots runs out ~Fri 08:59, 2 days 17 hours before its reset.
  • TIGHTCodex mira will be ~89% full at its reset on Sunday.
  • OKClaude leo will be 63% full at its reset.
  • UNDERGrok will leave most of its week unused.

It takes the faster of this week’s pace and the last day’s, so a week that speeds up shows early. In a weekly limit it measures the pace over a day at least, and shows no forecast in the week’s first day unless the window is already over, so one busy morning doesn’t cry wolf. Forecasts are estimates and sharpen as the week goes on.

Attention

Only what needs you.

When something is wrong, it’s in one short list, in plain words, in the menu bar app and at the top of the terminal report. Everything else stays quiet. Click an alert to open it.

  • OUTA limit that’s used up, and when it’s back.
  • OVEROne that will run out before its reset.
  • TIGHTOne of yours that will finish 85–99% full.
  • OUTSIDESomeone outside the team using a shared login.
  • ERRORSILENTA machine whose tool fails, or that stopped reporting.
  • OLDA machine on an older release.
  • IDLEA subscription you pay for that nobody used for a week, with its price.
  • CHECKOne nobody can say is still paid, such as a teammate’s who left.
  • COSTA new subscription, a change of plan, or a new list price, and what it costs.
  • NO READINGA subscription with no reading, with why and what to do, even on a teammate’s machine.
AI Usage listing 13 alerts for a made-up team: Claude mira’s 5-hour limit and Codex leo are out, Codex bots and Claude mira will run out before their reset, Codex mira will be tight, leo@leo-air and root@build-01 have errors, nobody is logged in to Claude on root@build-01, and hermes@courier hasn’t reported for a day.AI Usage listing 13 alerts for a made-up team: Claude mira’s 5-hour limit and Codex leo are out, Codex bots and Claude mira will run out before their reset, Codex mira will be tight, leo@leo-air and root@build-01 have errors, nobody is logged in to Claude on root@build-01, and hermes@courier hasn’t reported for a day.
A notification from AI Usage: Claude mira · 7d runs out ~Sat 11:12, 13h 47m before its reset · resets Sun 01:00.

A heads-up before the wall.

The menu bar app sends a notification when a limit is out, or will run out before its reset: once per limit until it resets, no spam. Choose when (within a day of running out, any time, or never) and whose (this Mac’s subscriptions or the whole team’s).

Notifications come from the menu bar app while it runs. The terminal tool notifies no one, and there are no Slack or email alerts.

AI Usage settings: the menu bar shows the percent left for this Mac’s subscriptions; notify when a window is out, and when one will run out within a day, for this Mac’s subscriptions.AI Usage settings: the menu bar shows the percent left for this Mac’s subscriptions; notify when a window is out, and when one will run out within a day, for this Mac’s subscriptions.

Devices × subscriptions

Your whole team in one window.

Install ai-usage on every laptop, server, and container, join them with your team key, and each of them sees all of them: every machine against every subscription, shaded by how much each one uses. Each goes by its user at its name, as mira@mira-mbp or hermes@scout, so a laptop and every bot on a shared server read as who they are. Spot the bot that eats the shared login, and the plan nobody touches.

The Team window over 7 days in millions of weighted tokens: 12 machines against Codex, Claude, and Grok subscriptions. root@build-01 spends 131 on Codex bots and 24 on Claude mira, mira@mira-mbp 104 on Claude mira and 56 on Codex mira, and nine bots from hermes@scout to hermes@concierge all run on Codex bots. 2 errors, 1 not reporting.The Team window over 7 days in millions of weighted tokens: 12 machines against Codex, Claude, and Grok subscriptions. root@build-01 spends 131 on Codex bots and 24 on Claude mira, mira@mira-mbp 104 on Claude mira and 56 on Codex mira, and nine bots from hermes@scout to hermes@concierge all run on Codex bots. 2 errors, 1 not reporting.
A made-up team: two laptops, a build server, and nine bots on one Codex login.
  • Who burns what.

    Each machine’s share of each subscription, adding up to 100%, for today, 7, 30, or 90 days, or in dollars.

  • Which machine went quiet.

    Switch to Status for each machine’s release, last report, and what’s wrong: a tool that fails, an update, or silence.

  • By project, too.

    Tokens per git repository, worktrees included, and what the team spent in the ones you share. A project only you work in stays on your machine.

Point the menu bar ring at the team’s subscriptions instead of just this Mac’s. Up to 50 machines per team.

$ ai-usage

The same page in your terminal.

No Mac? Prefer the keyboard? Type ai-usage on any Mac or Linux machine and the whole report opens as a page you can scroll: what needs attention at the top, then every subscription with its forecast, what each one costs, every machine, and your projects. When a subscription has no reading, it says why and what to do, such as update codex, whichever machine on the team the problem is on.

ai-usage in a terminal on mira@mira-mbp, for a made-up team whose subscriptions cost $703 a month. ATTENTION: Claude mira’s 5-hour window is out, back Thursday 17:05; Codex leo@studio.dev is out until Friday; Codex bots@studio.dev runs out about Friday 08:59, 2 days 17 hours before its reset; Claude mira@studio.dev runs out about Saturday 11:12; Codex mira@studio.dev about 89% at its reset; Codex fails on leo@leo-air; 7 more, among them a check, an idle subscription, and a cost change. Below, SUBSCRIPTIONS for Claude, Codex, and Grok with each plan, such as Claude max 20x, what’s left, when each resets, how full it will be, and the busiest device, such as root@build-01; a Claude login nobody reads says to run claude and log in; Grok’s SuperGrok has all of it left.

Press Enter for the detail.

Pick any account or machine on the page and open it: each window with its forecast, pace, and when it runs out, how full it got before its last resets, every machine that spent it with its share, and a machine’s errors in full. Esc goes back.

An account’s detail in the interactive view: Codex bots@studio.dev on the pro plan, a typed price of $238 a month, its use over the last 4 weeks unknown, no next charge confirmed, Pro 200 since 26 July, read 4 minutes ago on hermes@scout, runs out about Friday 08:59 at this week’s pace. Its 7-day window has 17% left and will be 164% full at its reset, its 5-hour window 70% left; below, the devices that spent it, root@build-01 with 46% and the hermes bots with the rest.
The Codex login a build server and nine bots share, opened from SUBSCRIPTIONS.

In BB

Or on a page in BB.

AI Usage is also a plugin for BB: the team report on a page of its own, with the same attention, subscriptions, forecasts, cost and its questions, devices × subscriptions, and devices, and a Team usage card in the sidebar. It is in BB’s plugin catalog: in BB, open Plugins, search for AI Usage, and click Install. On a Mac or Linux machine that runs BB as a person and has no ai-usage, it installs ai-usage once; a machine that already has it is used as it is.

The AI Usage page in BB, on the made-up example team: ATTENTION with Claude mira’s 5-hour window back Thursday 17:05, Codex leo@studio.dev back Friday, Codex bots@studio.dev running out about Friday 08:59, root@build-01 not logged in to Claude, hermes@courier silent for a day, and Grok idle for 9 days at $25 a month; then SUBSCRIPTIONS, Claude mira on Max 20x out with 42% of its week left, Claude leo on Max with 74% left.
The plugin’s example team, made-up data.

JSON for scripts and agents.

ai-usage --json prints the whole report with a versioned schema, so a script or an agent can pick the account with room.

❯ ai-usage --json | jq -c '.team.providers[]
    | .provider as $p | .accounts[]
    | select(.subscription) | {$p, name, state}'
{"p":"claude","name":"mira","state":"out"}
{"p":"claude","name":"leo","state":"ok"}
{"p":"claude","name":"unknown","state":"unknown"}
{"p":"codex","name":"leo","state":"out"}
{"p":"codex","name":"bots","state":"over"}
{"p":"codex","name":"mira","state":"tight"}
{"p":"grok","name":"7f3b9c21","state":"under"}
JSON reference

Servers and containers.

Runs on Linux (amd64 and arm64), scheduled by cron, or inside a container next to your bots.

#!/bin/sh
# Collect usage beside the main process once ai-usage is installed.
if [ -x /home/app/.local/bin/ai-usage ]; then
  /home/app/.local/bin/ai-usage schedule run &
fi
exec "$@"
Run it in a container

Cost

What you pay, and what you use of it.

COST says what each Claude, Codex, and Grok subscription costs a month, how much of it the team used over the last 4 weeks, and when it charges next. It marks the one nobody uses, asks about the one nobody can say is still paid, and says when a plan changed and what that costs. A budget, not accounting.

COST for a made-up team: $703 a month, plus one subscription without a price, about $482 (69%) used over the last 4 weeks, next charge Sunday 27 September, $200. Claude mira@studio.dev on Ultra at $200, $129 used (91%), its price typed for max 5x before a change of plan; Claude leo@studio.dev on max with no price; Claude jun@studio.dev on Pro at $20, unused, still paid?; Codex leo@studio.dev on Plus at $20; Codex bots@studio.dev on Pro 200 at a typed $238; Codex mira@studio.dev on Pro 200 at $200, $92 used (46%), charging Sunday 27 September; Codex ci@studio.dev on Plus, ended; Grok SuperGrok at $25, $2 used, charging Tuesday 2 March, idle for 9 days.
Prices come from a list the relay keeps current, or from what you typed (*).

Who used it, in dollars.

Press $ in the terminal, or open Cost in the Team window: each machine against each subscription, in what it used over the last 4 weeks, what nobody used, and each price, so every column adds up to it. Hermes bots count against the login they bill through.

The Team window on Cost, over the last 4 weeks, $703 a month: root@build-01 used about $113 of Codex bots and $22 of Claude mira, mira@mira-mbp $107 of Claude mira, $92 of Codex mira and $2 of Grok, leo@leo-air about $20 of Codex leo, and nine hermes bots the rest of Codex bots. Unused: $71 of Claude mira, $20 of Claude jun, $108 of Codex mira, $23 of Grok. Total: $200, $20, $20, $238, $200, $25, and one without a price.The Team window on Cost, over the last 4 weeks, $703 a month: root@build-01 used about $113 of Codex bots and $22 of Claude mira, mira@mira-mbp $107 of Claude mira, $92 of Codex mira and $2 of Grok, leo@leo-air about $20 of Codex leo, and nine hermes bots the rest of Codex bots. Unused: $71 of Claude mira, $20 of Claude jun, $108 of Codex mira, $23 of Grok. Total: $200, $20, $20, $238, $200, $25, and one without a price.
The same made-up team: the bots’ Codex login, split by tokens.

It asks what no tool says.

When a subscription charges next, its price when the list has none, and whether one nobody can confirm is still paid. The terminal asks one question at a time, the Mac app asks in a notification and in Settings, and the BB plugin on its page. Skip any of them, or turn them off. Answers are shared with the team, sealed with its key.

The Mac app shows the team’s total in its header, a cost line in each subscription’s details, and tells you before a charge.

Prices are US list prices in USD, without tax. Team, business, and enterprise plans have no list price until you type one.

AI Usage Settings on Cost: whether claude jun@studio.dev, Pro at $20 a month, is still paid, with Still Paying, Cancelled, and Skip; when claude mira@studio.dev, Ultra at $200 a month, charges next, with the suggested 2026-10-11, Save, and Skip; then the Claude subscriptions with their plan, use, and price.AI Usage Settings on Cost: whether claude jun@studio.dev, Pro at $20 a month, is still paid, with Still Paying, Cancelled, and Skip; when claude mira@studio.dev, Ultra at $200 a month, charges next, with the suggested 2026-10-11, Save, and Skip; then the Claude subscriptions with their plan, use, and price.

Utilization

Upgrade the plan that runs out. Cancel the one that doesn’t.

ai-usage remembers how full each subscription got before every reset, for up to 90 days, across the team. Here Claude’s week ran out 5 times in the last 13, while Codex never got past 71%.

UTILIZATION, the fullest percent before each reset over 90 days: Claude mira@studio.dev ran out 5 of 13 weeks, averaging 91%; Codex mira@studio.dev averaged 47% and never passed 71%; Grok averaged 9%.
In the terminal report. History starts when you install ai-usage.

Tools

Works with what you already run.

  • Claude Code

    Plus agent sessions in the Claude desktop app. Reading its limits needs Claude Code 2.1.208 or later.

  • Codex

    From its CLI, the ChatGPT app on macOS, or the VS Code, Cursor, and Windsurf extensions.

  • Grok

    From its own log: who’s signed in and the period’s usage.

  • Hermes

    Bots counted against the login they bill through.

Relay

The relay sees numbers, not names.

ai-usage reads what your tools already save on disk, and asks the installed tools for their limits the way their own usage screens do. It never calls Anthropic, OpenAI, or xAI itself, never reads your passwords or keys, and asking for usage spends none of your quota.

Every install, even a team of one, sends a small signed snapshot to a relay every 15 minutes: by default the free one the project runs, or your own. Names, emails, and errors are sealed with your team key first. Once a day it also asks the relay for its price list, which sends nothing of the team.

From 0.14.0 a project reaches only the machines that work in the same git repository: it goes without its path, sealed with a key made of the team key and the repository’s address, and a project only you work in stays on your machine. A teammate who guesses the address of your repository, such as a public one, could read your use of it.

From 0.13.0 ai-usage also sends its author usage stats, through PostHog and never through the relay: how often it runs, which commands are used, and what fails, with a random install id. Nothing goes before you have seen the notice, and ai-usage telemetry off stops them.

  1. Each machine, every 15 min

    • mira@mira-mbp
    • leo@leo-air
    • root@build-01
    • 9 bots

    Your prompts, replies, code, file contents, and logins stay here.

  2. signed snapshot, at most 64 KB, names and projects sealed
  3. Relay

    Sees

    • tools and plans
    • quota % and reset times
    • token counts, how many machines, and when
    • the IP addresses that connect

    Cannot read

    • machine and user names
    • emails and account names
    • projects and errors
    • the prices and charge days you type

    Every snapshot is signed, so the relay can’t forge or alter one without your team noticing.

  4. the whole team, signatures checked
  5. Every machine in the team

    Opens the sealed names with the team key, and a project only where it works in the same repository. Shows everyone: who is out, who runs out next, on which machine.

How privacy worksRun your own relayRelay protocolUsage stats

Install

One line. Then forget it.

No account, no config file. Each machine collects every 15 minutes on its own, and an installer copy updates itself within about 15 minutes of each release.

  1. 01

    Install on your machine.

    Your first report prints right away, with a short guide under it. On macOS 14 or later, AI Usage appears in the menu bar and starts at login.

    curl -fsSL https://raw.githubusercontent.com/neoromantic/ai-usage/main/install.sh | sh
  2. 02

    Print your team key.

    In a new terminal, or with the full path the installer printed. Treat the key like a password: anyone with it can read your team’s numbers, and it can’t be revoked.

    ai-usage team key
  3. 03

    Add every other machine.

    On each teammate’s laptop, server, or container, install with the line from step 1, then run this and paste the key. It stays out of shell history. Scripted installs can pass it as AI_USAGE_TEAM_KEY=… sh instead. After a Homebrew install, run this, then ai-usage to start collecting.

    ai-usage team join
System
macOS, Linux, or Windows (amd64, arm64). Windows 11 ARM64 has been checked with Claude Code and Codex, including team sync and collection after a reboot.
irm https://raw.githubusercontent.com/neoromantic/ai-usage/main/install.ps1 | iex
Homebrew
Or install with Homebrew on macOS or Linux, then run ai-usage to start collecting. On macOS 14 or later, ai-usage app install adds the menu bar app. A Homebrew copy updates with brew upgrade or ai-usage update, not by itself.
brew install neoromantic/tap/ai-usage
BB
Or install the plugin from BB’s plugin catalog: in BB, open Plugins, search for AI Usage, and click Install, or run the command below. On a Mac or Linux machine that runs BB as a person, not root, and has no ai-usage, it installs ai-usage once, without the menu bar app or shell profiles; a machine that already has ai-usage is used as it is. BB brings it to a new release with Update on its Plugins page or bb plugin update ai-usage.
bb plugin install ai-usage
Tools
At least one of Claude Code, Codex, Grok, or Hermes, logged in.
Menu bar
macOS 14 or later, Apple silicon or Intel. It comes with the installer, or with ai-usage app install. There’s no separate download. Signed with Developer ID and notarized by Apple.

Install guideAll commandsUninstallTroubleshooting

Releases

What’s new in 0.14.1

One-line installs from 0.2.5 on update themselves within about 15 minutes of a release, so this is most likely what you’re running. A Homebrew install updates when you run brew upgrade or ai-usage update.

0.14.1Latest

Shared projects reach AI Usage in BB.

  • The BB plugin brings 0.14.0’s shared projects with bb plugin update, and Homebrew installs this release as before. Nothing else changed since 0.14.0.
Release notes on GitHub
  • 0.14.0Shared projects: a project reaches only the teammates in the same repository.
  • 0.13.4The POOLED alert’s mark keeps to its column.

Full changelogAll releases on GitHub

Questions

Know before you run out.

One line to install. Every subscription, every machine, one page.

curl -fsSL https://raw.githubusercontent.com/neoromantic/ai-usage/main/install.sh | sh
View on GitHub

Version 0.14.1 · MIT · macOS and Linux