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 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
- ![tokmon web dashboard — overview](docs/web/overview.png)
99
+ ![tokmon web dashboard — overview](assets/web/overview.png)
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
- ![tokmon web dashboard — analytics](docs/web/analytics.png)
105
+ ![tokmon web dashboard — analytics](assets/web/analytics.png)
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
- ![tokmon web dashboard — models](docs/web/models.png)
111
+ ![tokmon web dashboard — models](assets/web/models.png)
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
- ![tokmon web dashboard — explore](docs/web/explore.png)
117
+ ![tokmon web dashboard — explore](assets/web/explore.png)
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
- - Parses local CLI session logs and aggregates cost/token usage per day, week, and month.
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
- Cross-platform: macOS, Linux, Windows.
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