tokenmaxxr
Aggregate AI subscription quota usage (Claude, AWS Kiro, ClinePass, Command Code, Ollama Cloud, OpenCode Go) into one view.
Six providers, one engine, one versioned JSON contract. CLI for bars/dashboards, a DankMaterialShell bar plugin, 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 # live-check auth + fetch per provider (exit 1 on failure)
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": "30d", "pct_used": 46, "reset_at": "2026-07-22T20:00:00Z",
"used": 27.5, "limit": 60, "unit": "$"}
]
}
]
}
status is one of ok | stale | no-auth | error. used / limit /
unit appear only when the provider reports absolute amounts (unit is $
or a plural noun like credits).
Config
$XDG_CONFIG_HOME/tokenmaxxr/config.toml (default ~/.config/tokenmaxxr/config.toml), optional:
include = ["claude", "kiro"] # whitelist: only these providers
exclude = ["opencode-go"] # blacklist: everything except these
include is applied first, then exclude. --provider on the CLI overrides both.
Auth sources
Two kinds of provider:
| Provider | Slug | Auth |
|---|---|---|
| Claude | claude |
Claude Code OAuth token, $CLAUDE_CONFIG_DIR/.credentials.json (default ~/.claude/). Log in once with claude. |
| AWS Kiro | kiro |
kiro-cli token in ~/.local/share/kiro-cli/data.sqlite3, else Kiro IDE ~/.aws/sso/cache/kiro-auth-token.json. Log in with kiro-cli login. |
| ClinePass | clinepass |
browser cookies for app.cline.bot + api.cline.bot |
| Command Code | commandcode |
browser cookies for commandcode.ai (session cookie, sent to api.commandcode.ai) |
| Ollama Cloud | ollama-cloud |
browser cookies for ollama.com |
| OpenCode Go | opencode-go |
browser cookies for opencode.ai |
Token providers never refresh tokens themselves (that could invalidate the
CLI's own session). Kiro tokens expire hourly, so an expired one makes
tokenmaxxr run kiro-cli whoami, which refreshes in place. An expired Claude
token shows as no-auth; run claude once and the next poll succeeds.
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/.
DankMaterialShell (Dankbar)
uv tool install tokenmaxxr # puts `tokenmaxxr` on ~/.local/bin
git clone https://github.com/Izzur/tokenmaxxr
ln -s "$PWD/tokenmaxxr/dms/TokenMaxxr" ~/.config/DankMaterialShell/plugins/TokenMaxxr
Then DMS Settings → Plugins → enable tokenmaxxr, and add it to a bar
section. Left click opens a popout with every window, progress bar, reset
countdown and amounts ($0.07 / $60). Right click forces --refresh.
Pill modes (pill setting):
soonest(default), e.g.C 3d 4h: for each provider take its longest window (30d, 7d, …), show the one that resets soonest and its countdown.hottest, e.g.C 47%: the most-used window across all providers.cycle: rotates<tag> <pct>%through providers everycycleSeconds.
The icon turns warning/error color once any window reaches warn / crit,
and notify-send fires once per window each time it crosses a threshold
(again after the window resets).
Optional settings in ~/.config/DankMaterialShell/plugin_settings.json
(DMS reads this file at startup; run dms restart after editing):
"tokenMaxxr": {
"enabled": true,
"command": "tokenmaxxr --json",
"interval": 300,
"pill": "soonest",
"cycleSeconds": 5,
"warn": 70,
"crit": 90,
"notify": true
}
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
Metadata
Release files for tokenmaxxr 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tokenmaxxr-1.2.0.tar.gz | 110.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tokenmaxxr-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 147.8 kB
Release files / tokenmaxxr-1.2.0.tar.gz
| Download URL | tokenmaxxr-1.2.0.tar.gz |
|---|---|
| Size | 110.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a15011038d83f3894723021b157746b3b312d6d5953048c132e71cd85a00449
|
|
BLAKE2b-256 checksum How to use checksums |
a7720e495cf378a4af3818777fd02ef651553ce2c4129c17b9651798b54d67b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency logRelease files / tokenmaxxr-1.2.0-py3-none-any.whl
| Download URL | tokenmaxxr-1.2.0-py3-none-any.whl |
|---|---|
| Size | 37.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a49067f87017c057b8efa459964d376fa411bb79ff3219970f4f0e4a4b1ea96c
|
|
BLAKE2b-256 checksum How to use checksums |
86fbab83af871522aaa39d80fedcc36bb190da758a6721d0f3ee9c41f62ac292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 8, 2026.
Transparency log