Home / Projects / QuotaLens — Local Claude Quota Monitor
Open Source

QuotaLens — Local Claude Quota Monitor

Open-source, local, self-hosted monitor for Claude Pro/Max subscription quota. Polls every minute into a SQLite file you own and forecasts whether the current session window will exhaust before it resets. Dashboard, Prometheus metrics, burn-rate webhooks. v1.0 on PyPI.

Key Impact

v1.0 released on PyPI; MIT open-source; macOS, Linux and Windows tested in CI

PythonSQLitePrometheusWebhooksPyPI

Overview

QuotaLens is an open-source (MIT), local, self-hosted monitor for Claude Pro and Max subscription quota. It polls your account every minute and writes the series to a SQLite file you own, then leads with the question you open it to ask: will this session window run out before it resets, and when.

I built it because Claude’s own usage view shows the current snapshot and forgets. When a session window ended unexpectedly mid-work, there was no record of which hour the climb was steepest or whether a pattern was emerging. QuotaLens keeps that record.

Unofficial. Not affiliated with or endorsed by Anthropic. It uses undocumented claude.ai endpoints and only observes: it cannot raise, extend, or bypass a limit.

What it does

  • Polls every minute, stores each reading in SQLite alongside the raw API response
  • Forecasts burn-out: given the current burn rate, will the session window exhaust before it resets? The dashboard answers this directly with a countdown and a headroom percentage
  • Weekly budget table: translates the abstract weekly limit into “full sessions left at your typical session cost” — a number you can plan against
  • Dashboard: interrogable — range presets, chart zoom by drag, auto-refresh, force-poll. Works with JavaScript disabled as plain links and forms. States are honest: stale pages never look healthy
  • Prometheus /metrics endpoint and CSV/JSON export for integration with existing monitoring
  • Burn-rate webhooks: one POST on threshold crossing, one on recovery. Feeds ntfy, Slack, Discord, Pushover, and Home Assistant

Privacy

Binds loopback only. Cookie stored in the OS keychain, never in a file or log line. The only outbound traffic beyond your own provider is one plain GET per vendor status page every five minutes — no identifier, no cookie — and that is configurable off.

Status

v1.0. macOS, Linux and Windows tested in CI on Python 3.11 and 3.13. On Linux servers without a desktop session, keychain support depends on the environment (details in the README).

About this engagement

Short, direct answers to what people actually ask about this.

Why build a local monitor rather than use the in-app usage view?

The in-app view shows a snapshot. QuotaLens keeps the full series in a SQLite file you own, so when something surprises you — which session, how steep the climb, the minute it started — the record is still there. The dashboard answers the question you open it for: will this window run out before it resets, and when.

How does QuotaLens stay private?

It binds loopback only, keeps your session cookie in the OS keychain (never in a file or log), and phones nothing home. The only outbound traffic is one GET per vendor every five minutes to read a status page — no cookie, no identifier — and that is configurable off.

What integrations does the burn-rate webhook support?

One POST when the burn rate crosses a configurable threshold, and one when it falls back. The body is a small JSON object with no account identifier and no cookie. Compatible with ntfy, Slack, Discord, Pushover, and Home Assistant out of the box.