Tokenmin Alpha

Your Claude bill is bigger than it should be. Find out where in 60 seconds.

You're paying more for Claude than you should and you don't know which sessions, which models, or which habits are costing you the most. Anthropic publishes the fix — caching, model routing, context discipline, tool design — scattered across docs, engineering posts, and the changelog. Tokenmin reads every doc, scans your actual ~/.claude/ usage, and ranks the next dollar you can save.

Friends & Family alpha · v0.12.12. Tokenmin is in early testing with a small group of trusted users. Expect rough edges; expect to be heard. Feedback to rick@rmwcommerce.com or open an issue on the public scanner repo.

30+ patterns from Anthropic docs one command, no auth prompt caching cuts repeated input up to 90% 5x model price spread Haiku vs Opus open-source scanner HMAC-anonymized

Install

curl --proto '=https' --tlsv1.2 -fsSL https://tokenmin.ai/install.sh | bash

macOS or Linux. Windows support is on the roadmap.

No gh, no brew, no auth setup. The installer detects every Claude variant on your machine, drops a single tokenmin command on PATH, and offers to add it to your shell rc with consent. Under 60 seconds. Skip if you already use a paid Claude observability dashboard. The audit deepens with your usage; give it a week or two of normal Claude work to hit full signal.

The first 60 seconds

After install, one command. Renders inline, in your terminal.

tokenmin
Animated terminal recording: typing `tokenmin` runs a 14-day audit and prints a Claude usage report with the Levers scorecard, three ranked findings, and next-step commands.
~10s recording. Same output as the static block below; the text version is indexable + copyable.
~ tokenmin
▶ scanning ~/.claude found 57 sessions in last 14 days ▶ anonymizing anonymized ▶ analyzing analyzed Tokenmin Claude usage audit ──────────────────────────────────────────────────────────────────────── scanned 57 sessions over 14 days top projects: web-app (38) · api-service (14) · data-tools (5) API-equivalent cost (window): $6,860 (plan: api) model mix: Opus 99% · Sonnet 1% · Other 0% ──────────────────────────────────────────────────────────────────────── Levers model routing 4/10 · context discipline 6/10 · density of expression 8/10 · hygiene 9/10 · parallelism / MCP 7/10 most headroom: model routing Headline ~$7,151/mo recoverable across 7 fix(es), ~4.8 hrs total 1. A lot of your spend is on Opus — route by tier ★★★★ ▮▮▮▮▮▮▮▮▮▮ $7,055/mo 0.1 hrs · conf 55% · model routing evidence: 100% of $6,860 weekly spend on Opus across 52 sessions. tokenmin show model_overspend 2. Long sessions without /clear — context bloat is taxing you ★★ ▯▯▯▯▯▯▯▯▯▯ $25/mo 0.2 hrs · conf 70% · context discipline evidence: median session 72 user turns; 39 ran past 40 turns. tokenmin show long_sessions_no_clear 3. No global CLAUDE.md — Claude restarts from zero each project ★★ ▯▯▯▯▯▯▯▯▯▯ $33/mo 0.5 hrs · conf 95% · context discipline tokenmin show no_global_claude_md + 4 low-impact finding(s) hidden — tokenmin show low-impact to see ──────────────────────────────────────────────────────────────────────── next steps: tokenmin show <id> drill into one finding tokenmin watch live spend dashboard while Claude is running tokenmin --out report.md write the full markdown report tokenmin help 30-second walkthrough guide: https://tokenmin.ai/guides/claude-token-optimization

Real output from a real ~/.claude. On API-billed accounts, findings are ranked by recoverable monthly spend; on flat-fee Pro/Max plans the same findings rank by severity instead (since $ recovery isn't meaningful when you're already on a fixed bill). The per-finding bar shows relative impact; the ★★★★/★★★/★★/ pill is the severity tier. The Levers scorecard surfaces which of the five optimization pillars has the most headroom — directional, not absolute.

Live dashboard

Run tokenmin watch while you work. Refreshes every 2 seconds in place. Shows the active session's spend, cache hit ratio (color-coded against Anthropic's 90% target), model + tool mix, turn counts, and a token-rate sparkline. Optional --alert $5 beeps when the active session crosses your threshold. Pure stdlib, zero deps. Ctrl-C exits.

Works with every Claude install

SourceHowStatus
Claude Code reads ~/.claude/ directly default
claude.ai (web) Settings → Export data → tokenmin --source export --from FILE
Claude Desktop same flow as web — export then --source export
Claude Desktop (live local store) reads Electron LevelDB directly 🚧 in progress

Callable by browser agents (WebMCP)

tokenmin.ai is one of the first public sites with a real W3C WebMCP descriptor. An agent running in Chrome 146+ Canary (with chrome://flags/#enable-webmcp-testing enabled) sees three read-only tools registered via navigator.modelContext.registerTool:

ToolReturns
get_install_commandthe one-line curl installer
get_versioncurrent Tokenmin release version
get_curated_sourcesthe Tier 1 / Tier 2 source list the detector-research watcher monitors weekly

Source: webmcp.js. Feature-detected — the descriptor is a no-op in browsers without navigator.modelContext, so it can't break anything on production Chrome, Safari, or Firefox. This is what agentic-discoverability looks like before consumer browsers agree on a standard: ship the descriptor anyway, agents pick it up when they're ready.

Trust — read the scanner before you trust it

The scanner is the code that decides what (if anything) leaves your machine. Apache-2.0, hosted publicly at github.com/watsonrm/tokenmin-scanner. About 5 minutes of reading, end to end.

What gets collected

What never gets collected

Why the hashes can't be reversed

Identifiers are HMAC-SHA256 with a 32-byte salt generated on first run (stored at ~/.tokenmin/.salt, chmod 0600). An adversary who guesses common path names like ~/.ssh/known_hosts cannot precompute its hash without your salt. Cross-snapshot correlation works within your install; cross-user correlation is broken.

Want stricter? Set TOKENMIN_STRICT_ANONYMIZE=1 for an additional per-run salt — breaks within-user cross-run correlation too, at the cost of the engine losing "same file re-read across days" findings.

Audit trail you control

Every snapshot built and every submission is logged at ~/.tokenmin/audit.log (chmod 0600) — UTC timestamp, event, SHA-256 digest of the payload. Never user content. You can reconstruct exactly what bytes you sent and when.

Transport defaults

Continuous verification

Every commit to the scanner runs a CI suite of 13 property and CLI tests plus a synthetic-input leak gate that builds a fake ~/.claude/ with planted client names and fails the build if any survive the scrubber.

Anonymous telemetry — opt-in, under your control

Tokenmin can send a small, fixed-shape anonymous usage signal so the rule base gets sharper for every user. Off by default; asked on first interactive run with an explicit y/N prompt and the full field list.

What's sent, per invocation (the complete list, not a sample):

Never sent: the snapshot, file paths, project names, raw errors, IP, email.

Three controls, any of which wins:

Full data dictionary + endpoint posture + cryptographic basis for the install_id: SECURITY.md → Telemetry.

Full threat model + disclosure path: SECURITY.md.

All commands

tokenmin                       scan + render inline (the magic moment)
tokenmin watch                 live dashboard while you work
tokenmin show <id>             drill into one finding
tokenmin help                  30-second walkthrough
tokenmin help-export           claude.ai / Desktop export walkthrough
tokenmin demo                  sample report with no real data
tokenmin doctor                self-diagnose your install
tokenmin selftest              run the bundled tests
tokenmin telemetry status      view telemetry state + endpoint
tokenmin telemetry dry-run     print the exact payload that would be sent
tokenmin telemetry on|off      toggle telemetry persistently
tokenmin --version             what you're running
tokenmin uninstall             clean removal
tokenmin --out FILE            write full markdown report
tokenmin --snapshot FILE       inspect anonymized payload
tokenmin --submit-url URL      send to hosted engine (HTTPS only)
tokenmin --selfcheck           dump anonymizer rules

Audit-first install

If you don't trust the network all the way to GitHub, verify the installer before executing:

curl --proto '=https' --tlsv1.2 -fsSL -o install.sh https://tokenmin.ai/install.sh
curl --proto '=https' --tlsv1.2 -fsSL -o install.sh.sha256 https://tokenmin.ai/install.sh.sha256
shasum -a 256 -c install.sh.sha256
less install.sh
bash install.sh

Guides

Repos