tokmon 0.19.8 → 0.20.1
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 +19 -8
- package/dist/bootstrap-ink-AO3QA5BH.js +3497 -0
- package/dist/{chunk-UAPL47GL.js → chunk-5BW4H7WW.js} +870 -520
- package/dist/chunk-DZY72PPB.js +1049 -0
- package/dist/chunk-RF4GGQGM.js +106 -0
- package/dist/chunk-XQEJ4WQ5.js +276 -0
- package/dist/cli.js +15 -2710
- package/dist/config-C6Z65JUP.js +47 -0
- package/dist/daemon-OBQJO6D4.js +213 -0
- package/dist/daemon-handle-ZHECQZ6Q.js +142 -0
- package/dist/glyphs-NKCSZLGO.js +17 -0
- package/dist/server-RL2JDFQY.js +9 -0
- package/dist/web/assets/{breakdown-C9UzD3X2.js → breakdown-Dhq6Rqnu.js} +3 -3
- package/dist/web/assets/{chart-C6EyXc8D.js → chart-CDwPcOeB.js} +7 -7
- package/dist/web/assets/index-Bqe9b8BZ.js +105 -0
- package/dist/web/assets/{index-CN07mDjO.css → index-CZOCHnad.css} +1 -1
- package/dist/web/assets/{timeline-_qBfhBAY.js → timeline-D0GFoRzM.js} +2 -2
- package/dist/web/index.html +2 -2
- package/package.json +3 -2
- package/dist/chunk-STCMWCFW.js +0 -564
- package/dist/server-VMB5ZLZC.js +0 -8
- package/dist/web/assets/index-mgYwFiX4.js +0 -80
- package/dist/web-DYAEMCAE.js +0 -110
package/README.md
CHANGED
|
@@ -96,25 +96,25 @@ It binds to `127.0.0.1` only and reads the same data read-only — nothing leave
|
|
|
96
96
|
|
|
97
97
|
KPIs with inline sparklines, provider cards with live rate-limit bars, and a cost-over-time chart that spans your full history by default. Toggle **merged** (one combined total) vs **split** (a line per provider), **all-time** vs the selected period, and linear vs log.
|
|
98
98
|
|
|
99
|
-

|
|
100
100
|
|
|
101
101
|
### Analytics
|
|
102
102
|
|
|
103
103
|
A full-width, all-time daily-spend calendar — hover any day for a per-model spend breakdown — with at-a-glance stats (busiest day, daily average, top weekday, current streak), alongside cost-by-model, an interactive provider split, token composition, cache savings, and cumulative spend.
|
|
104
104
|
|
|
105
|
-

|
|
106
106
|
|
|
107
107
|
### Models
|
|
108
108
|
|
|
109
109
|
A leaderboard sortable by cost / tokens / calls, each row showing a per-model trend sparkline, cost-per-call, tokens, and calls — over tokens-by-model and cache-savings-by-model charts.
|
|
110
110
|
|
|
111
|
-

|
|
112
112
|
|
|
113
113
|
### Explore
|
|
114
114
|
|
|
115
115
|
The full daily / weekly / monthly table — searchable, sortable on every column, with expandable per-model breakdowns.
|
|
116
116
|
|
|
117
|
-

|
|
118
118
|
|
|
119
119
|
The dashboard is a prebuilt static bundle shipped in the package — no build step, fully offline.
|
|
120
120
|
|
|
@@ -219,12 +219,23 @@ tokmon runs entirely on your machine and reads everything **read-only**:
|
|
|
219
219
|
|
|
220
220
|
## How It Works
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
tokmon runs a small local **daemon** that does all the data collection. The terminal UI and the web dashboard are both thin clients of it, talking over a loopback-only WebSocket — so a single process does the work and the TUI and web always show the same numbers. The daemon starts automatically with the TUI (and standalone via `tokmon serve`), and idle-pauses when nothing is watching.
|
|
223
|
+
|
|
224
|
+
**Usage & cost**
|
|
225
|
+
- Parses each tool's local session logs — Claude / Codex / pi `JSONL`, Cursor / opencode `SQLite` — and aggregates cost and token usage per day, week, and month.
|
|
226
|
+
- Cost is an API-equivalent estimate from each model's published pricing, counting cached input at the discounted cache-read rate (not the full input rate, not free).
|
|
223
227
|
- A persistent parse cache keyed by file **mtime + size** makes repeat launches near-instant; edited or deleted files are re-read automatically.
|
|
224
|
-
- Dashboard summaries and table history load independently, so the UI stays responsive on large histories.
|
|
225
|
-
- Rate limits and spend are fetched from each provider's API on the billing poll interval.
|
|
226
228
|
|
|
227
|
-
|
|
229
|
+
**Accounts**
|
|
230
|
+
- Each enabled provider is detected automatically, and its real account identity — email and plan — is read from local auth (e.g. Claude `~/.claude.json`, the Codex `id_token`, Cursor's state DB). Extra accounts, like additional Claude homes, are auto-discovered too.
|
|
231
|
+
|
|
232
|
+
**Limits & billing**
|
|
233
|
+
- Rate limits and remaining spend/quota come from each provider's own official API, refreshed on the billing poll interval.
|
|
234
|
+
|
|
235
|
+
**Responsiveness**
|
|
236
|
+
- Dashboard summaries and table history load independently and refresh on separate intervals, so the UI stays responsive even on large histories.
|
|
237
|
+
|
|
238
|
+
Cross-platform: macOS, Linux, Windows. Everything is local and read-only — see [Privacy](#privacy).
|
|
228
239
|
|
|
229
240
|
## Requirements
|
|
230
241
|
|