tokenmaxxer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # tokenmaxxer
2
+
3
+ Sync your local AI coding usage to [TokenMaxxer](https://tokenmaxxer.xyz) — one
4
+ cross-platform CLI + background daemon for macOS, Windows, and Linux.
5
+
6
+ It reads the transcripts your AI tools already keep on disk (Claude Code,
7
+ Codex CLI, Cursor, OpenCode, Copilot, Gemini/Qwen CLI, Cline, Roo, Kilo,
8
+ Droid, Amp, …), derives **tokens-only** usage events, and pushes them to your
9
+ tokenmaxxer account.
10
+
11
+ ```
12
+ npm install -g tokenmaxxer
13
+
14
+ tokenmaxxer login # browser pairing (or --token <tmx_…> for headless boxes)
15
+ tokenmaxxer sync # push usage once
16
+ tokenmaxxer service install # keep it synced in the background (launchd / systemd / Task Scheduler)
17
+ tokenmaxxer doctor # per-tool diagnostics: what was found where
18
+ ```
19
+
20
+ ## Privacy & security
21
+
22
+ - **Tokens only.** Message text, prompts, file contents and absolute paths
23
+ never leave your machine — events carry a short project label at most.
24
+ - **No database access.** The CLI talks to the tokenmaxxer API with a
25
+ per-user bearer token (`tmx_…`) and nothing else. The token is stored in
26
+ `~/.config/tokenmaxxer/auth.json` (`0600`; `%APPDATA%\tokenmaxxer` on
27
+ Windows) and is revocable anytime — `tokenmaxxer logout` or Settings → CLI
28
+ tokens.
29
+ - Costs are computed server-side; the leaderboard never trusts client math.
30
+
31
+ ## Commands
32
+
33
+ | Command | What it does |
34
+ |---|---|
35
+ | `login [--token <t>] [--server <url>] [--no-browser]` | pair this machine (browser flow like `gh auth login`) |
36
+ | `logout` | revoke the token server-side + remove local credentials |
37
+ | `sync [--json]` | one-shot read → push; idempotent, safe to re-run |
38
+ | `start [--interval <min>]` | foreground daemon loop (what the service runs) |
39
+ | `service install/uninstall/status` | manage the per-user background service |
40
+ | `status [--json]` | login, last sync, service state |
41
+ | `doctor` | config dir, auth check, server reachability, per-parser table |
42
+
43
+ Config lives in `~/.config/tokenmaxxer` (`$XDG_CONFIG_HOME` honored;
44
+ `%APPDATA%\tokenmaxxer` on Windows): `auth.json`, `config.json`
45
+ (`{ "serverUrl", "intervalMinutes" }`), `state.json`, `logs/`.
46
+ `TOKENMAXXER_SERVER` / `--server` override the target server;
47
+ `TOKENMAXXER_CONFIG_DIR` relocates everything.
48
+
49
+ Requires Node ≥ 20. The only native dependency is `better-sqlite3`
50
+ (prebuilt binaries for all major platforms).
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ // Published entry point. Dev runs `npm run dev -w tokenmaxxer -- <cmd>`
3
+ // (tsx over src/); this thin wrapper loads the tsup bundle.
4
+ import "../dist/index.js";