@ipv9/tokentracker-cli 0.39.38 → 0.39.40

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.
Files changed (80) hide show
  1. package/README.md +43 -11
  2. package/dashboard/dist/assets/{Card-DD4s0V6T.js → Card-JS4gjUZf.js} +1 -1
  3. package/dashboard/dist/assets/DashboardPage-BoXhzJb1.js +60 -0
  4. package/dashboard/dist/assets/{FadeIn-CUSBK0jm.js → FadeIn-DvLfvwys.js} +1 -1
  5. package/dashboard/dist/assets/{IpCheckPage-PHF4lPax.js → IpCheckPage-Dcfc0Uts.js} +1 -1
  6. package/dashboard/dist/assets/LimitsPage-Vz-GVdi9.js +2 -0
  7. package/dashboard/dist/assets/{LocalOnlyNotice-DCmtS_j5.js → LocalOnlyNotice-8xF5couh.js} +1 -1
  8. package/dashboard/dist/assets/PopoverPopup-7HrUzeRx.js +1 -0
  9. package/dashboard/dist/assets/Select-9XDsaO_C.js +1 -0
  10. package/dashboard/dist/assets/SelectItemText-DE5Fs9p6.js +12 -0
  11. package/dashboard/dist/assets/SettingsPage-CMnfAptE.js +1 -0
  12. package/dashboard/dist/assets/SkillsPage-CbvLHN0L.js +1 -0
  13. package/dashboard/dist/assets/WidgetsPage-CeGQlyt7.js +1 -0
  14. package/dashboard/dist/assets/WrappedPage-Bux8qLUC.js +1 -0
  15. package/dashboard/dist/assets/{arrow-up-right-CjaBQnwI.js → arrow-up-right-B7rCoZdW.js} +1 -1
  16. package/dashboard/dist/assets/{download-DLBqkSwp.js → download-CtTYpbcx.js} +1 -1
  17. package/dashboard/dist/assets/format-BuQKK6kQ.js +1 -0
  18. package/dashboard/dist/assets/limitDisplay-WwuTdS_a.js +1 -0
  19. package/dashboard/dist/assets/main-Ck4SUH4m.js +696 -0
  20. package/dashboard/dist/assets/main-ZrWkoMlr.css +1 -0
  21. package/dashboard/dist/assets/mock-data-Bvbe8tYK.js +1 -0
  22. package/dashboard/dist/assets/use-limits-display-prefs-BKWYPgeA.js +1 -0
  23. package/dashboard/dist/assets/use-native-settings-D7Nj1dXR.js +1 -0
  24. package/dashboard/dist/assets/useCurrency-BX3pvyhh.js +1 -0
  25. package/dashboard/dist/index.html +15 -27
  26. package/dashboard/dist/llms.txt +0 -2
  27. package/dashboard/dist/sitemap.xml +0 -12
  28. package/package.json +7 -4
  29. package/src/cli.js +4 -13
  30. package/src/commands/doctor.js +1 -3
  31. package/src/commands/init.js +63 -53
  32. package/src/commands/serve.js +2 -50
  33. package/src/commands/status.js +1 -55
  34. package/src/commands/sync.js +134 -227
  35. package/src/lib/{browser-auth.js → browser-open.js} +3 -149
  36. package/src/lib/claude-categorizer.js +204 -32
  37. package/src/lib/codex-context-breakdown.js +83 -7
  38. package/src/lib/codex-rollout-parser.js +52 -10
  39. package/src/lib/diagnostics.js +1 -49
  40. package/src/lib/doctor.js +12 -87
  41. package/src/lib/file-identity.js +69 -0
  42. package/src/lib/init-flow.js +6 -3
  43. package/src/lib/local-api.js +6 -364
  44. package/src/lib/pricing/curated-overrides.json +1 -1
  45. package/src/lib/pricing/seed-snapshot.json +1 -1
  46. package/src/lib/rollout.js +392 -144
  47. package/src/lib/runtime-config.js +0 -32
  48. package/src/lib/sqlite-reader.js +83 -8
  49. package/dashboard/dist/assets/ActivityHeatmap-BrehqUIb.js +0 -42
  50. package/dashboard/dist/assets/DashboardPage-CyUShBRJ.js +0 -19
  51. package/dashboard/dist/assets/DevicePage-BA74Su1l.js +0 -1
  52. package/dashboard/dist/assets/DialogTitle-DoKsz5wi.js +0 -1
  53. package/dashboard/dist/assets/InsforgeUserHeaderControls-Bk_U2dHr.js +0 -1
  54. package/dashboard/dist/assets/LandingPage-Bbeu84Iu.js +0 -4356
  55. package/dashboard/dist/assets/LeaderboardAvatar-ByqeB6bM.js +0 -1
  56. package/dashboard/dist/assets/LeaderboardPage-BeWXF00S.js +0 -6
  57. package/dashboard/dist/assets/LeaderboardProfileModal-C4yvbZd_.js +0 -72
  58. package/dashboard/dist/assets/LeaderboardProfilePage-D3cbSh5o.js +0 -1
  59. package/dashboard/dist/assets/LimitsPage-dS9C9Vdt.js +0 -2
  60. package/dashboard/dist/assets/LoginPage-Ch3UQoWj.js +0 -1
  61. package/dashboard/dist/assets/PopoverPopup-DjG0gjlA.js +0 -1
  62. package/dashboard/dist/assets/Select-HzIjWJpE.js +0 -1
  63. package/dashboard/dist/assets/SelectItemText-f0tCwtvZ.js +0 -1
  64. package/dashboard/dist/assets/SettingsPage-DJOZAlZy.js +0 -1
  65. package/dashboard/dist/assets/SkillsPage-BQcyJIdx.js +0 -1
  66. package/dashboard/dist/assets/WidgetsPage-B_vxuV09.js +0 -1
  67. package/dashboard/dist/assets/WrappedPage-CZN9Y3Vz.js +0 -1
  68. package/dashboard/dist/assets/index-BeoRn2gJ.js +0 -2
  69. package/dashboard/dist/assets/info-BAIxlHIB.js +0 -1
  70. package/dashboard/dist/assets/main-DAcSUW2t.css +0 -1
  71. package/dashboard/dist/assets/main-pi07CfeC.js +0 -1004
  72. package/dashboard/dist/assets/use-limits-display-prefs-CMfASZsh.js +0 -1
  73. package/dashboard/dist/assets/use-native-settings-CfPik-Ao.js +0 -1
  74. package/dashboard/dist/assets/use-spring-wsmJQRqb.js +0 -1
  75. package/dashboard/dist/assets/use-usage-limits-Bt0Dp6kx.js +0 -1
  76. package/dashboard/dist/assets/useCurrency-CsaAMc3j.js +0 -1
  77. package/dashboard/dist/assets/useOpenInteractionType-CPzi5Z8M.js +0 -12
  78. package/dashboard/dist/share.html +0 -140
  79. package/src/commands/device-login.js +0 -161
  80. package/src/lib/upload-throttle.js +0 -148
package/README.md CHANGED
@@ -54,8 +54,8 @@ tokentracker doctor # health check
54
54
  - 🚀 **Zero config.** Hooks auto-install on the first run. Zero to dashboard in about 30 seconds.
55
55
  - 🔌 **22 tools out of the box.** Claude Code, Codex, Cursor, Gemini, Copilot, Antigravity, OpenCode, Kiro, Zed, Goose, and more — auto-detected.
56
56
  - 💰 **Accurate cost.** 2,200+ models priced from [LiteLLM](https://github.com/BerriAI/litellm) (refreshed daily) with a bundled offline snapshot, so USD totals are right even without a network. Cross-provider records are de-duplicated so your numbers match each provider's own billing.
57
- - 📈 **Rate-limit tracking.** Live quota windows with reset countdowns for Claude, Codex, Cursor, Gemini, Kimi, Z.AI, Kiro, Copilot, and Antigravity.
58
- - 🧩 **Optional extras.** A worldwide leaderboard (opt-in) and a Skills tab that syncs 250+ public skills across your tools.
57
+ - 📈 **Rate-limit tracking.** Live quota windows with reset countdowns for Claude, Codex, Cursor, Gemini, Kimi, Z.AI, Kiro, Copilot, and Antigravity — on the dedicated Limits page and inline as quota chips on each provider's dashboard card.
58
+ - 🧩 **Skills tab.** Syncs 250+ public skills across your tools.
59
59
 
60
60
  ---
61
61
 
@@ -70,7 +70,7 @@ A calm, single-screen readout — a hero total paired with a usage-trend chart,
70
70
  **On one screen:**
71
71
  - **Total tokens + cost** for the selected window (24h / day / 7d / 30d / total / custom), with a browser-timezone "Updated" stamp.
72
72
  - **Usage Trend** — token volume over time, right beside the total.
73
- - **Provider breakdown** — every tool's share and top models, with a click-to-expand per-model drill-down.
73
+ - **Provider breakdown** — every tool's share and top models, with each provider's live quota chips (used %, e.g. 5h + weekly) on its card and a click-to-expand per-model drill-down.
74
74
  - **Context breakdown** — where Claude's and Codex's tokens actually go (input / output / cache / reasoning), shown side by side.
75
75
  - **Activity heatmap** — daily usage at a glance.
76
76
  - **Project & daily tables** — per-project totals and a day-by-day breakdown with cost and $/MTok.
@@ -105,7 +105,7 @@ AI CLI tools → hooks / passive readers → local SQLite → dashboard
105
105
  3. Counts are aggregated into 30-minute UTC buckets in a local SQLite snapshot.
106
106
  4. The dashboard reads that snapshot and renders it in your browser's timezone.
107
107
 
108
- The leaderboard is the only feature that ever leaves your machine, and only when you opt in.
108
+ Nothing leaves your machine. There is no account, no upload, and no server to sign in to.
109
109
 
110
110
  ---
111
111
 
@@ -114,7 +114,7 @@ The leaderboard is the only feature that ever leaves your machine, and only when
114
114
  | Protection | What it means |
115
115
  |---|---|
116
116
  | **No content** | Only token counts and timestamps. Never prompts, responses, or files. |
117
- | **Local by default** | All data stays on your machine. The leaderboard is fully opt-in. |
117
+ | **Local only** | All data stays on your machine. There is no upload path at all. |
118
118
  | **Auditable** | Open source — read [`src/lib/rollout.js`](src/lib/rollout.js); it's just numbers and timestamps. |
119
119
  | **No telemetry** | No analytics, no crash reporting, no phone-home. |
120
120
 
@@ -132,7 +132,16 @@ Most users never touch this — defaults are sensible.
132
132
  | `GEMINI_HOME` | Override Gemini CLI directory | `~/.gemini` |
133
133
  | `TOKENTRACKER_GROK_HOME` | Override Grok Build directory | `~/.grok` |
134
134
 
135
- To force a dashboard port: `PORT=7700 tokentracker serve` (otherwise it auto-picks the next free port from `7680`).
135
+ To force a dashboard port, use your shell's environment-variable syntax (otherwise TokenTracker auto-picks the next free port from `7680`):
136
+
137
+ ```bash
138
+ PORT=7700 npx --yes @ipv9/tokentracker-cli serve
139
+ ```
140
+
141
+ ```powershell
142
+ $env:PORT = 7700
143
+ npx --yes @ipv9/tokentracker-cli serve
144
+ ```
136
145
 
137
146
  Browser auto-open is opt-in: `tokentracker serve --open`. Background services and headless shells should use the default no-open behavior and open the printed URL manually.
138
147
 
@@ -153,6 +162,15 @@ npm test # root tests
153
162
  npm run ci:local # full local gate (build + tests + validators)
154
163
  ```
155
164
 
165
+ ## 📚 Code Documentation
166
+
167
+ Source-backed engineering documentation starts at
168
+ [`openwiki/README.md`](openwiki/README.md). Regenerate the local fact
169
+ ledger with `npm run docs:openwiki:extract`, validate it with
170
+ `npm run docs:openwiki:check`, and use `npm run docs:openwiki:verify` for the
171
+ independent read-only review. The model-backed update command expects credentials
172
+ from the caller's environment and never reads them from this repository.
173
+
156
174
  ---
157
175
 
158
176
  ## 🔧 Troubleshooting
@@ -176,7 +194,15 @@ If a tool you use shows as not configured, run `tokentracker activate-if-needed`
176
194
 
177
195
  <br/>
178
196
 
179
- The server auto-picks the next free port (`7681`, `7682`, …) and logs it on startup. To force one: `PORT=7700 tokentracker serve`. To see what's holding the port: `lsof -i :7680`.
197
+ The server auto-picks the next free port (`7681`, `7682`, …) and logs it on startup. To force one, use the Bash or PowerShell command in [Configuration](#configuration). To see what's holding port `7680`:
198
+
199
+ ```bash
200
+ lsof -i :7680
201
+ ```
202
+
203
+ ```powershell
204
+ Get-NetTCPConnection -LocalPort 7680 -ErrorAction SilentlyContinue
205
+ ```
180
206
 
181
207
  </details>
182
208
 
@@ -204,17 +230,23 @@ tokentracker doctor
204
230
  </details>
205
231
 
206
232
  <details>
207
- <summary><b>Windows / PowerShell service starts but no browser opens</b></summary>
233
+ <summary><b>Windows / PowerShell: start TokenTracker with npx</b></summary>
208
234
 
209
235
  <br/>
210
236
 
211
- This is expected for background tasks. Scheduled tasks and the Windows tray app run:
237
+ For an interactive PowerShell session:
238
+
239
+ ```powershell
240
+ npx --yes @ipv9/tokentracker-cli serve --open
241
+ ```
242
+
243
+ For headless PowerShell, CI, or a background process, keep browser opening disabled:
212
244
 
213
245
  ```powershell
214
- tokentracker serve --no-sync --no-open
246
+ npx --yes @ipv9/tokentracker-cli serve --no-sync --no-open
215
247
  ```
216
248
 
217
- Open the printed local URL in your browser or use the tray app WebView. For an interactive PowerShell session, use `tokentracker serve --open`; TokenTracker uses the Windows shell opener instead of `xdg-open`.
249
+ TokenTracker never stops another process to free a port. When no port is specified it tries the next one up (`7681`, `7682`, …); an explicit `--port` or `$env:PORT` that is already in use fails startup and prints an alternative command to run.
218
250
 
219
251
  </details>
220
252
 
@@ -1 +1 @@
1
- import{j as r}from"./main-pi07CfeC.js";function t({children:i,title:a,subtitle:o,className:s="",bodyClassName:d=""}){return r.jsxs("div",{className:`rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 transition-colors duration-200 ${s}`,children:[(a||o)&&r.jsxs("div",{className:"px-5 py-4 border-b border-oai-gray-200 dark:border-oai-gray-800 transition-colors duration-200",children:[a&&r.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide transition-colors duration-200",children:a}),o&&r.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-300 mt-1 transition-colors duration-200",children:o})]}),r.jsx("div",{className:`p-5 ${d}`,children:i})]})}export{t as C};
1
+ import{j as r}from"./main-Ck4SUH4m.js";function t({children:i,title:a,subtitle:o,className:s="",bodyClassName:d=""}){return r.jsxs("div",{className:`rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 transition-colors duration-200 ${s}`,children:[(a||o)&&r.jsxs("div",{className:"px-5 py-4 border-b border-oai-gray-200 dark:border-oai-gray-800 transition-colors duration-200",children:[a&&r.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide transition-colors duration-200",children:a}),o&&r.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-300 mt-1 transition-colors duration-200",children:o})]}),r.jsx("div",{className:`p-5 ${d}`,children:i})]})}export{t as C};