Measure your actual Claude Code usage limits instead of guessing
Project description
ccmeter
measure your actual claude code usage limits instead of guessing.
why
anthropic shows you a percentage bar. 21% used. but 21% of what? they've never said.
twice in four months, limits changed during or after promotions. both times the community noticed. both times the explanation was "contrast effect." without numbers, you can't tell the difference between "i'm using more" and "they gave me less."
ccmeter gives you the number. track it over time. if it drops, the cap shrank. see docs/evidence.md for the receipts.
what it measures
from a max 20x subscriber running opus:
5h window: $363 budget = 20x × $18 pro base
7d window: $1,900 budget = 20x × $95 pro base
the dollar amount isn't about sub vs api. it's the only unit that makes different token types comparable — cache reads are 10x cheaper than input tokens, so raw totals are meaningless. cost-weighting normalizes everything into one number you can track.
every report stores the budget. next run shows the delta. if your budget drops 5% overnight, you see it in red. across enough users, a simultaneous drop is undeniable.
how it works
- poll — records utilization from anthropic's usage API every 2 minutes
- scan — reads per-message token counts from claude code's local JSONL logs
- calibrate — when utilization ticks from 15% to 16%, it knows what tokens were used in that window. cost-weight them. that's your budget per percent.
install
pip install ccmeter
or clone and run directly:
git clone https://github.com/iteebz/ccmeter && cd ccmeter && uv sync
requires python 3.12+, claude code installed and signed in. macos and linux. zero dependencies beyond fncli.
usage
ccmeter install # background daemon, survives restarts
ccmeter report # see your budget
ccmeter report --json # structured output for sharing
ccmeter history # raw usage tick history
ccmeter status # collection health
ccmeter uninstall # remove daemon
needs a few days of data collection before calibration kicks in. install it, let it run, check back.
claude code only
ccmeter reads token data from local session logs that only claude code produces. if you use claude.ai or cowork at the same time, token counts get inflated because the API tracks combined usage but we only see claude code's logs. for cleanest data, use claude code as your primary surface.
what it collects
from anthropic's API (polled every 2 min, recorded on change):
- utilization percentage per bucket (
five_hour,seven_day, etc.) - reset timestamps
- subscription tier (detected from credentials)
from claude code's local JSONL files (scanned on report):
- per-message token counts: input, output, cache_read, cache_create
- model, timestamps, session id
- tool calls, reads, edits, bash commands, lines changed
everything stays local in ~/.ccmeter/meter.db. your oauth token only goes to anthropic's own API — the same call claude code already makes.
known confounds
- multi-surface usage — claude.ai, cowork, and claude code share limits but only claude code has local token logs. simultaneous use inflates counts.
- 1% granularity — the API reports whole percentages only. more samples over longer periods = better accuracy.
- pro base is derived — the pro base number is your budget divided by your tier multiplier. it's a prediction, not a measurement. a pro user running ccmeter would confirm it.
help
the more people running this across tiers (pro, max 5x, max 20x, team) and models (sonnet, opus, haiku), the harder it gets to change limits without anyone noticing.
install it. let the daemon run. share your ccmeter report output.
if you want to contribute code: see CONTRIBUTING.md.
license
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccmeter-0.1.7.tar.gz.
File metadata
- Download URL: ccmeter-0.1.7.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfaac652491e04d255d904ef9dd77a30e97b81b4c669c9360ab46a26640d25e3
|
|
| MD5 |
893590d192e806849db532c46fa95ffa
|
|
| BLAKE2b-256 |
b893f093cf2746cad9bfc1826a6e7de19d7054b0320d5a221280b13e565795a7
|
File details
Details for the file ccmeter-0.1.7-py3-none-any.whl.
File metadata
- Download URL: ccmeter-0.1.7-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10bd380a95d92b57b4b2339a018da6a6601f1eac5a82e7d8292af1527ac5a552
|
|
| MD5 |
7ee8d672817509b5a4fa3cc93b1e2d11
|
|
| BLAKE2b-256 |
3a79bd0819ee3c191e7d76d4a34eb0e71f3fb986f40f9ce90372e370d92ec1a1
|