Skip to main content

ccquota

A CLI tool that displays your Claude usage quota — session limits, weekly limits, and optionally organization spending with per-user breakdown. Supports multiple accounts.

日本語版 README はこちら

How It Works

ccquota calls Claude's internal APIs directly. No browser window appears during normal use.

  1. Login (one-time per account): Opens Chrome for you to sign in to claude.ai. The session is saved locally under ~/.config/ccquota/sessions/<name>/.
  2. Show (default): Launches Chrome headlessly using the saved session, then fetches usage data via Playwright's built-in HTTP client — which shares the browser's cookies and TLS context, so Cloudflare is not an obstacle.

Example Output

Default — shows personal usage for all saved sessions:

  Your Usage (Alice)
  ──────────────────────────────────────────────
  Session           ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
  Weekly Limit      ██████████████████░░░░░░░ 72%
                    ↻ resets 4/29 (Wed) 17:00
  Claude Design     █████████████░░░░░░░░░░░░ 54%
                    ↻ resets 4/29 (Wed) 17:00

  Your Usage (Bob)
  ──────────────────────────────────────────────
  Session           ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
  Weekly Limit      ████████░░░░░░░░░░░░░░░░░ 32%
                    ↻ resets 4/30 (Thu) 14:00

With --org — adds organization spending and per-user breakdown for each session:

  Your Usage (Alice)
  ──────────────────────────────────────────────
  Session           ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
  Weekly Limit      ██████████████████░░░░░░░ 72%
                    ↻ resets 4/29 (Wed) 17:00
  Claude Design     █████████████░░░░░░░░░░░░ 54%
                    ↻ resets 4/29 (Wed) 17:00

  Organization (MyTeam)
  ──────────────────────────────────────────────
  Monthly Spend     ███████████████░░░░░░░░░░ 60%  ($120.09 / $200.00)
  Balance           $79.90

  Spend by User
  ──────────────────────────────────────────────
  Alice                     $95.47
  Bob                       $24.67

  Your Usage (Bob)
  ──────────────────────────────────────────────
  Session           ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
  Weekly Limit      ████████░░░░░░░░░░░░░░░░░ 32%
                    ↻ resets 4/30 (Thu) 14:00

Requirements

  • Python 3.13+
  • uv (recommended) or pip
  • Google Chrome installed on your system

Installation

pip install ccquota

or with uv:

uv tool install ccquota

Install from source

git clone https://github.com/sanoakr/ccquota.git
cd ccquota
uv sync

Usage

First-time setup

uv run ccquota login

A Chrome window opens. Sign in to claude.ai, and the tool auto-detects completion (up to 5 min timeout). The session is saved under ~/.config/ccquota/sessions/<name>/.

Adding another account

Simply run ccquota login again and sign in with a different account:

ccquota login      # first account
ccquota login      # second account — opens a fresh browser

View usage

ccquota                  # all accounts (default)
ccquota --user Alice     # specific account only
ccquota --org            # all sessions + organization spending & per-user breakdown
ccquota --watch          # refresh every 60s
ccquota -w -n 30         # refresh every 30s
ccquota -o -w            # organization + watch mode
ccquota --debug          # print raw JSON from APIs

If installed from source, use uv tool install -e . for system-wide access. Otherwise prefix commands with uv run.

Logout

ccquota logout           # remove session (auto-selects if only one)
ccquota logout Alice     # remove a specific session
ccquota logout --all     # remove all sessions

Options

Flag Short Description
--user NAME -u NAME Show only the specified session
--org -o Show all sessions with organization spending and per-user breakdown
--watch -w Refresh periodically (default: every 60s)
--interval SEC -n SEC Watch interval in seconds (default: 60)
--debug Print raw JSON data from APIs

API Endpoints Used

Endpoint Data When
/api/bootstrap Organization ID, user info Always
/api/organizations/{id}/usage Session (5h), weekly, Design, Opus utilization Always
/api/organizations/{id}/overage_spend_limit Monthly spend vs. limit --org
/api/organizations/{id}/overage_spend_limits Per-user spend breakdown --org
/api/organizations/{id}/prepaid/credits Prepaid credit balance --org

Data Storage

Session data is stored under ~/.config/ccquota/sessions/, with one subdirectory per account. Each is a Chromium user-data directory containing claude.ai session cookies. No credentials are stored elsewhere.

Legacy single-session data (~/.config/ccquota/browser/) is automatically migrated on first run.

License

MIT

Metadata

Release files for ccquota 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccquota 0.6.0
File Size Uploaded Provenance Actions
ccquota-0.6.0.tar.gz 16.6 kB With provenance Details for ccquota-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ccquota 0.6.0
File Interpreter ABI Platform Actions
ccquota-0.6.0-py3-none-any.whl Python 3 none any Details for ccquota-0.6.0-py3-none-any.whl

Total release size: 26.4 kB

Release files / ccquota-0.6.0.tar.gz

Download URL ccquota-0.6.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ef92a8cf51ff2eca77918f44fa73aecf6778f033b3e63f39bcbab9a1f2d3dbeb
BLAKE2b-256 checksum
How to use checksums
9417a97d170f5cef9c345a747e5f447bb499c7552fb0545d0983b79759d9da42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 12, 2026.

Transparency log

Release files / ccquota-0.6.0-py3-none-any.whl

Download URL ccquota-0.6.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
781328fa8d541cb9580180d1c9997a7b4265383f5f166b86caf1fd318ea594ef
BLAKE2b-256 checksum
How to use checksums
6dd5b481c5b6785dcf9618b794351e62df88d09c5a167392aeee9d3041aaaedf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 12, 2026.

Transparency log

Security for ccquota 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ccquota-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page