Blog

Claude and Codex usage in your terminal and status line

QuotaBuddy comes with a quotabuddy command. It prints your Claude and ChatGPT usage in Terminal, gives scripts the same figures as JSON, and can ask the app to check usage. Its one-line statusline output also fits in Claude Code’s status line, so you can see what’s left without leaving the session.

Install the command

  1. Open Settings › Advanced.
  2. Under Command-Line Tool, find The quotabuddy command and click Install.

QuotaBuddy adds a link to its own app in the first of these folders it can write to: /opt/homebrew/bin, /usr/local/bin or ~/.local/bin. The row then shows where it’s installed. If that folder isn’t on your PATH, the row tells you to add it. If none of the folders can be written to, QuotaBuddy shows a sudo ln -sf command to run in Terminal instead. Remove takes the command away again.

The command works during the trial or with a license, like the app. quotabuddy help lists every command.

See every account

Run the command on its own, or as quotabuddy status:

quotabuddy

It prints one line per account, grouped under Claude and ChatGPT, with * next to the account each agent is using:

== Claude ==
* Work      session 38% (resets in 2h 10m)  weekly 6% (resets in 5d 3h)  updated 2m ago
  Personal  session 4% (resets in 4h 40m)  weekly 71% (resets in 1d 4h)  updated 2m ago
== ChatGPT ==
* Personal  weekly 2% (resets in 6d 1h)  updated 2m ago

Figures are percent used. Any per-model limits an account reports appear on its line too. To see one provider, add --provider claude or --provider codex.

The command reads the figures QuotaBuddy last saved, so it answers at once and sends no requests of its own. If the app isn’t open, the table ends with QuotaBuddy isn't running, so these readings may be old.

Get the figures as JSON

quotabuddy status --json

The output has generatedAt, appRunning and an accounts list. Each account has its provider (claude or codex), name, email, active, updatedAt, and its session, weekly and models windows. In each window, used is a fraction from 0 to 1, and resetsAt is an ISO 8601 date:

{
  "accounts" : [
    {
      "active" : true,
      "email" : "you@example.com",
      "models" : {

      },
      "name" : "Work",
      "provider" : "claude",
      "session" : {
        "resetsAt" : "2026-11-15T16:42:00Z",
        "used" : 0.38
      },
      "updatedAt" : "2026-11-15T14:30:00Z",
      "weekly" : {
        "resetsAt" : "2026-11-20T17:30:00Z",
        "used" : 0.06
      }
    }
  ],
  "appRunning" : true,
  "generatedAt" : "2026-11-15T14:32:00Z"
}

With jq, this prints the weekly figure for each active account, such as claude weekly 6%:

quotabuddy status --json | jq -r '.accounts[] | select(.active) | "\(.provider) weekly \(.weekly.used * 100 | round)%"'

Show usage in Claude Code’s status line

quotabuddy statusline

This prints one short line for the active account of each agent: the session figure, then the weekly figure marked wk.

Claude 38% · 6%wk  GPT 2%wk

A figure is left out when the account doesn’t report that window, and the line is empty when there’s nothing to show. Add --provider claude to show Claude only. Like the table, it always shows percent used.

To put it under Claude Code’s prompt, add a statusLine command to your Claude Code settings, such as ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "quotabuddy statusline"
  }
}

If you already have a status line script, add the output of quotabuddy statusline to what it prints. If Claude Code can’t find the command, use the full path shown in Settings › Advanced.

The same line works in a shell prompt. In zsh, for example, add this to ~/.zshrc:

setopt PROMPT_SUBST
RPROMPT='$(quotabuddy statusline)'

Ask the app to refresh

This command sends a request to the running app, so QuotaBuddy must be open.

quotabuddy refresh

This asks QuotaBuddy to check usage for every account now. The command returns right away, and the new figures show up in quotabuddy once the check finishes.

If QuotaBuddy isn’t open, it prints QuotaBuddy isn't running. Open it first. and exits with status 69, so a script can tell the request didn’t go through.

Export your history

quotabuddy export writes your usage and quota history as CSV or JSON. By default it covers the last 30 days as CSV. Run quotabuddy help for its options.