tokenmaxxr
Aggregate AI subscription quota usage (OpenCode Go, ClinePass, Ollama Cloud) into one view.
Three providers, one engine, one versioned JSON contract. CLI for bars/dashboards, optional WebUI, optional HTTP API.
Install
# from PyPI (recommended)
uvx tokenmaxxr --json
# from source
git clone https://github.com/Izzur/tokenmaxxr
cd tokenmaxxr
uv pip install -e ".[serve]" # add [serve] for `tokenmaxxr serve`
Quickstart
tokenmaxxr # human table
tokenmaxxr --json # machine-readable schema:1
tokenmaxxr --refresh # bypass the 300s cache
tokenmaxxr doctor # diagnose cookie discovery
tokenmaxxr serve # WebUI + HTTP API
Web UI
tokenmaxxr serve (requires pip install 'tokenmaxxr[serve]') starts a small FastAPI app on 127.0.0.1:8765:
GET /api/usage— schema:1 document (same astokenmaxxr --json)POST /api/refresh— force a live re-fetchGET /api/history?provider=&window=— appended history rowsGET /— vanilla-JS dashboard (cards + history chart, opt-in 60s auto-refresh)
The dashboard degrades gracefully: with no cookies, every card shows no-auth and a hint.
Output contract
tokenmaxxr --json returns a stable, versioned document:
{
"schema": 1,
"fetched_at": "2026-07-22T12:00:00Z",
"providers": [
{
"id": "ollama-cloud",
"name": "Ollama Cloud",
"status": "ok",
"windows": [
{"label": "5h", "pct_used": 47, "reset_at": "2026-07-22T20:00:00Z"}
]
}
]
}
status is one of ok | stale | no-auth | error.
Cookie sources
--cookie-file SLUG=/path/to/cookies.sqliteorTOKENMAXXR_COOKIE_<DOMAIN>env- Firefox-family stores (globbed:
~/.mozilla/firefox/*,~/.zen/*, Zen/Firefox Flatpak paths, Floorp/LibreWolf/Waterfox) - Chromium-family via
browser_cookie3(best-effort, locked keyring → skip) - No match →
no-authstatus + remediation indoctor
Cookies are copied to a temp file before reading (WAL lock-safe). Cache and history live under ~/.local/state/tokenmaxxr/.
Waybar
"custom/tokenmaxxr": {
"exec": "tokenmaxxr --json --provider ollama-cloud",
"return-type": "json",
"format": "Ollama 5h: {}%",
"exec-on-event": true,
"interval": 600
}
--json is the stable schema:1 contract — jq '.providers[0].windows[0].pct_used' always returns an integer.
fastfetch
"tokenmaxxr": {
"type": "command",
"key": "TKN",
"command": "tokenmaxxr --json | jq -r '.providers[] | select(.status==\"ok\") | \"\\(.id): \\(.windows[0].pct_used)%\"' | paste -sd, -"
}
Headless / --cookie-file
tokenmaxxr --cookie-file ollama-cloud=/srv/cookies/ollama.sqlite --json
# or
TOKENMAXXR_COOKIE_OLLAMA_COM=/srv/cookies/ollama.sqlite tokenmaxxr --json
## Development
```bash
uv sync --extra dev # set up dev deps (pytest, fastapi, etc.)
uv run python3 -m pytest # 32 tests, <1s
uv run python3 -m pytest tests/test_providers.py -v # one file
Provider parser tests live in tests/test_providers.py against HTML/JSON
fixtures under tests/fixtures/. To add a fixture, drop a real captured
payload into tests/fixtures/<slug>.<ext> and write a test_<slug> that
feeds it through RawHtml and asserts on the parsed UsageWindows.
License
MIT
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 tokenmaxxr-1.0.0.tar.gz.
File metadata
- Download URL: tokenmaxxr-1.0.0.tar.gz
- Upload date:
- Size: 93.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c40d6e936456717343c02ff7bf1cbf4d354b3634054d07329f7d4ae12732ac6
|
|
| MD5 |
5437697aabce035ed137eb734e0e8a13
|
|
| BLAKE2b-256 |
ea1d46b0ec0f980b5ad647df502ee5e5f30f39371eea72e8ef3e4c0096a334cf
|
Provenance
The following attestation bundles were made for tokenmaxxr-1.0.0.tar.gz:
Publisher:
publish.yml on Izzur/tokenmaxxr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tokenmaxxr-1.0.0.tar.gz -
Subject digest:
6c40d6e936456717343c02ff7bf1cbf4d354b3634054d07329f7d4ae12732ac6 - Sigstore transparency entry: 2409016915
- Sigstore integration time:
-
Permalink:
Izzur/tokenmaxxr@8c9189264c671a14818efa2fa87d27906dfd5399 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Izzur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8c9189264c671a14818efa2fa87d27906dfd5399 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tokenmaxxr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tokenmaxxr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c604b70e8f6217d990243912f9f16fa2f881a9306dcd5fa7ef1eca0e48d1c0b7
|
|
| MD5 |
5c87cf38efb72b4838a2bad074338194
|
|
| BLAKE2b-256 |
56e94f4e75ada810d4d69c23d87363de9c8c450780e469978eb43da804450ff4
|
Provenance
The following attestation bundles were made for tokenmaxxr-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Izzur/tokenmaxxr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tokenmaxxr-1.0.0-py3-none-any.whl -
Subject digest:
c604b70e8f6217d990243912f9f16fa2f881a9306dcd5fa7ef1eca0e48d1c0b7 - Sigstore transparency entry: 2409016987
- Sigstore integration time:
-
Permalink:
Izzur/tokenmaxxr@8c9189264c671a14818efa2fa87d27906dfd5399 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Izzur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8c9189264c671a14818efa2fa87d27906dfd5399 -
Trigger Event:
release
-
Statement type: