Install
Four commands, about two minutes. You need Python 3.11+, a Claude Pro or Max subscription, and macOS, Linux or Windows.
Before you install
QuotaLens authenticates with your provider's session cookie and reads undocumented status endpoints. It only observes (it cannot raise, bypass, or extend a limit) and running it is your decision.
That is automated access, which Anthropic's Consumer Terms, section 3(7), prohibit. A subscription cookie is not an API key, and there is no carve-out for reading your own usage. You are the one accepting that risk, not me.
Every profile must be an account that is yours: the Terms forbid sharing a login, and the Usage Policy forbids using several accounts to get around a limit. QuotaLens shows each account's own state and is not for rotating work across accounts.
Is this allowed? The FAQ answers that in full.
Read the code that touches the cookie: cli.py and the security note.
Install
pipx install quotalens
quotalens auth # paste your claude.ai cookie once (next row shows where it is)
quotalens start
open http://127.0.0.1:8787
macOS, Linux and Windows, each tested in CI on every push; the Windows credential store is not yet verified by hand. First numbers appear after two or three polls, about three minutes.
Upgrading
pipx upgrade quotalens # or: uv tool upgrade quotalens
quotalens stop && quotalens start
History, cookie and settings carry over; the first start migrates the database. If it
runs as a service, quotalens service uninstall && quotalens service install
restarts it. On macOS, if the dashboard then says it cannot read your cookie,
the FAQ has the one-line fix.
Getting the cookie
QuotaLens signs in the way your browser does, with the cookie claude.ai already gave you. The command asks for it once and keeps it in the OS keychain.
- Open claude.ai/settings/usage, signed in.
- Open the developer tools (macOS: Cmd+Option+I; Windows and Linux: F12) and pick the Network tab.
- Reload the page, then click the request named
usagein the list. - Copy the whole
Cookieline under Request Headers. It is long, and it contains asessionKey=pair; QuotaLens needs the whole line, not just that pair. - Run
quotalens authand paste it. On macOS,pbpaste | quotalens authskips the paste. It makes one request to claude.ai to check the cookie, then stores it.
The cookie is equivalent to your claude.ai password. Never paste it into an issue, a chat or a
log. When claude.ai signs you out or the cookie expires, the dashboard shows an auth state; run
quotalens auth again.
Where is the session cookie stored?
Nowhere else: not the config, not the log, not the database. It is
redacted from error output (how,
in the source), and quotalens config list prints every setting and where it
came from, and never the cookie.
As a service
quotalens service install # macOS LaunchAgent, or a systemd user unit
Every file it writes is printed, so it can be undone by hand. A second account
is a profile: quotalens --profile work start gets its own keyring entry,
database and port.
How do I uninstall QuotaLens?
quotalens service uninstall # stops the service and removes what it wrote
pipx uninstall quotalens
The keychain entry and quotalens.db are yours to delete. The cookie is in the
OS keychain (the row above); the database sits beside the config file that
quotalens config list names.
What does QuotaLens show you?
- Burn rate and a verdict. Will this session make the reset.
- Your week, in sessions. How many full sessions are left.
- The history. Every window kept, sorted by cost.
- Local only. All data stays in SQLite and the OS keychain. The dashboard binds to localhost with no option to expose it.