vibe-coding-tracker 1.3.0__tar.gz → 1.3.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: vibe-coding-tracker
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results
5
5
  Keywords: cli,ai,coding-assistant,telemetry,claude,codex,gemini,usage-tracker,analytics
6
6
  Author: Wei Lee
@@ -28,8 +28,6 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  # Vibe Coding Tracker — AI Coding Assistant Usage Tracker
30
30
 
31
- <img src="assets/social-preview.png" alt="Vibe Coding Tracker social preview" width="640">
32
-
33
31
  [![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/vibe_coding_tracker)
34
32
  [![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust&style=flat-square)](https://crates.io/crates/vibe_coding_tracker)
35
33
  [![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)
@@ -43,6 +41,8 @@ Description-Content-Type: text/markdown
43
41
  [![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social&label=Star)](https://github.com/Mai0313/VibeCodingTracker)
44
42
  [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/pulls)
45
43
 
44
+ <img src="assets/social-preview.png" alt="Vibe Coding Tracker social preview" width="640">
45
+
46
46
  </div>
47
47
 
48
48
  **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, and OpenCode usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
@@ -90,13 +90,13 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
90
90
 
91
91
  | Feature | Description |
92
92
  | --------------------- | -------------------------------------------------------------------- |
93
- | **Multi-Provider** | Claude Code, Codex, Copilot, and Gemini — all in one place |
93
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, and OpenCode — all in one place |
94
94
  | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
95
95
  | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
96
96
  | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
97
+ | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
97
98
  | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
98
- | **Live Updates** | Real-time dashboard refreshes every second |
99
- | **Efficient Caching** | Smart daily cache reduces API calls |
99
+ | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
100
100
 
101
101
  ---
102
102
 
@@ -133,6 +133,9 @@ npm install -g @mai0313/vibe-coding-tracker
133
133
  pip install vibe_coding_tracker
134
134
  # Or with uv
135
135
  uv pip install vibe_coding_tracker
136
+
137
+ # Run without installing, straight from PyPI (uv)
138
+ uvx vibe_coding_tracker usage
136
139
  ```
137
140
 
138
141
  #### Method 3: Install from crates.io
@@ -231,24 +234,69 @@ vct usage --json --daily
231
234
 
232
235
  ```
233
236
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
234
- │ Model Input Output Cache Read Cache Write Total Cost (USD)
237
+ │ Model Input Output Cache Read Cache Write Total Cost (USD)
235
238
  │ │
236
- │ gemini-3.1-pro-preview 129K 10.3K 67.4K 0 207K $0.40
237
- │ claude-haiku-4-5-20251001 5.57K 19.8K 4.63M 620K 5.27M $1.34
238
- │ claude-opus-4-6 25.7K 179K 40.8M 2.57M 43.6M $77.59
239
+ │ gemini-3.1-pro-preview 129K 10.3K 67.4K 0 207K $0.40
240
+ │ claude-haiku-4-5-20251001 5.57K 19.8K 4.63M 620K 5.27M $1.34
241
+ │ claude-opus-4-8 25.7K 179K 40.8M 2.57M 43.6M $77.59
239
242
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
240
243
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
241
- │ Provider Tokens Cost Active Days
244
+ │ Provider Tokens Cost
242
245
  │ │
243
- │ Claude Code 48.9M $78.93 3
244
- │ Gemini 207K $0.40 1
246
+ │ Claude Code 48.9M $78.93
247
+ │ Gemini 207K $0.40
245
248
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
246
249
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
247
- Total Cost: $79.33 | Total Tokens: 49.3M | Models: 3 | Memory: 42.8 MB
250
+ Total Cost: $79.33 | Total Tokens: 49.3M | Models: 3 | Memory: 42.8 MB
248
251
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
249
252
  ↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
250
253
  ```
251
254
 
255
+ ### Preview: Table & JSON (`vct usage`)
256
+
257
+ `--table` prints the same numbers as a static report with a per-provider summary; `--json` emits one enriched row per model (each with `cost_usd`) for scripting.
258
+
259
+ ```text
260
+ Token Usage Statistics
261
+
262
+ ┌───────────────────────────┬─────────┬─────────┬─────────────┬─────────────┬──────────────┬────────────┐
263
+ │ Model ┆ Input ┆ Output ┆ Cache Read ┆ Cache Write ┆ Total Tokens ┆ Cost (USD) │
264
+ ╞═══════════════════════════╪═════════╪═════════╪═════════════╪═════════════╪══════════════╪════════════╡
265
+ │ opencode/gemini-3.5-flash ┆ 19,421 ┆ 254 ┆ 0 ┆ 0 ┆ 19,675 ┆ $0.03 │
266
+ │ gpt-5.5 ┆ 242,227 ┆ 16,229 ┆ 2,406,912 ┆ 0 ┆ 2,665,368 ┆ $5.56 │
267
+ │ claude-opus-4-8 ┆ 401,937 ┆ 936,186 ┆ 138,099,926 ┆ 6,057,836 ┆ 145,495,885 ┆ $151.29 │
268
+ │ TOTAL ┆ 663,585 ┆ 952,669 ┆ 140,506,838 ┆ 6,057,836 ┆ 148,180,928 ┆ $156.88 │
269
+ └───────────────────────────┴─────────┴─────────┴─────────────┴─────────────┴──────────────┴────────────┘
270
+
271
+ Totals (by Provider)
272
+
273
+ ┌───────────────┬─────────────┬─────────┐
274
+ │ Provider ┆ Tokens ┆ Cost │
275
+ ╞═══════════════╪═════════════╪═════════╡
276
+ │ Claude Code ┆ 145,495,885 ┆ $151.29 │
277
+ │ OpenAI Codex ┆ 2,665,368 ┆ $5.56 │
278
+ │ OpenCode ┆ 19,675 ┆ $0.03 │
279
+ │ All Providers ┆ 148,180,928 ┆ $156.88 │
280
+ └───────────────┴─────────────┴─────────┘
281
+ ```
282
+
283
+ ```json
284
+ // vct usage --json (one model shown; rows are sorted by cost)
285
+ [
286
+ {
287
+ "model": "claude-opus-4-8",
288
+ "cost_usd": 151.29,
289
+ "usage": {
290
+ "input_tokens": 401937,
291
+ "output_tokens": 936186,
292
+ "cache_read_input_tokens": 138099926,
293
+ "cache_creation_input_tokens": 6057836,
294
+ "reasoning_output_tokens": 0
295
+ }
296
+ }
297
+ ]
298
+ ```
299
+
252
300
  ### What It Scans
253
301
 
254
302
  The tool automatically scans these directories:
@@ -266,17 +314,17 @@ The tool automatically scans these directories:
266
314
  ```
267
315
  ┌ Claude ─────────────────┐┌ Codex ──────────────────┐┌ Copilot ────────────────┐┌ Cursor ─────────────────┐
268
316
  │ Plan: max 20x ││ Plan: plus ││ Plan: individual ││ Plan: free │
269
- │ 5h ▰▱▱▱▱ 16% ↻ 2h0m ││ 5h ▰▰▱▱▱ 37% ↻ 2h33m││ prem ▰▱▱▱▱ 2% ↻ 25d ││ total ▰▰▰▰▰ 94% ↻ 17d
270
- │ 7d ▰▰▱▱▱ 41% ↻ 5d ││ 7d ▰▰▱▱▱ 24% ↻ 3d16h││ 1464/1500 · chat/compl ∞││ auto ▰▰▰▰▰ 100% ↻ 17d
271
- Opus ▰▰▰▱▱ 61% ↻ 5d ││ Credits: 0 +3 reset ││ updated just now ││ api ▰▰▰▱▱ 44% ↻ 17d
317
+ │ 5h ▰▱▱▱▱ 13% ↻ 1h42m││ 5h ▰▰▱▱▱ 33% ↻ 12m ││ prem ▰▱▱▱▱ 3% ↻ 24d ││ total ▰▱▱▱▱ 6% ↻ 16d
318
+ │ 7d ▰▰▰▱▱ 58% ↻ 1d23h││ 7d ▰▰▱▱▱ 36% ↻ 1h54m││ reqs ▰▱▱▱▱ 45/1500 ││ auto ▱▱▱▱▱ 0% ↻ 16d
319
+ Fable ▰▰▰▰▱ 79% ↻ 1d23h││ Credits: 0 +3 reset ││ updated just now ││ api ▰▰▰▱▱ 56% ↻ 16d
272
320
  │ Balance: - $0.00 used ││ updated just now ││ ││ updated just now │
273
321
  └─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
274
322
  ```
275
323
 
276
324
  - **Claude** — plan tier, 5-hour, weekly, and per-model weekly usage from the official OAuth usage API (`GET /api/oauth/usage`), read from `~/.claude/.credentials.json`, plus your credit balance. Polled about once a minute to stay under the endpoint's rate limit; a red `LIMIT` flag appears in the title when a cap is hit. The per-model weekly row is best-effort and simply hides when that scope is not returned.
277
325
  - **Codex** — plan tier, 5-hour and weekly usage, and credit balance from the ChatGPT backend (`wham/usage`) using `~/.codex/auth.json` (with approximate remaining messages / spend cap when applicable); falls back to the newest `rate_limits` in your Codex session logs when the API is unavailable (the title shows `Codex` vs `Codex (session)`).
278
- - **Copilot** — plan tier, premium-request quota (remaining / entitlement plus a gauge), and unlimited chat / completions from GitHub's Copilot API (`GET /copilot_internal/user`), read from `~/.copilot/config.json`. The request impersonates the Copilot CLI. The token is long-lived, so there is no refresh; a `401` / `403` shows a `run: copilot login` hint.
279
- - **Cursor** — plan tier, total / auto / API usage percentages, and on-demand spend from cursor.com (`GET /api/usage-summary`), using the session token in `~/.config/cursor/auth.json`. Refresh is reactive: vct re-reads the file each poll and uses the token while it is valid, since the official Cursor client keeps it fresh.
326
+ - **Copilot** — plan tier plus your premium-request quota, shown as two gauges: percent used and the used / total request count (e.g. `45/1500`), from GitHub's Copilot API (`GET /copilot_internal/user`), read from `~/.copilot/config.json`. The request impersonates the Copilot CLI. The token is long-lived, so there is no refresh; a `401` / `403` shows a `run: copilot login` hint.
327
+ - **Cursor** — plan tier, total / auto / API percent **used**, and on-demand spend from cursor.com (`GET /api/usage-summary`), using the session token in `~/.config/cursor/auth.json`. Refresh is reactive: vct re-reads the file each poll and uses the token while it is valid, since the official Cursor client keeps it fresh.
280
328
 
281
329
  **Automatic token refresh.** For Claude and Codex, when a token is near expiry or rejected, vct refreshes it and writes the new token back to the provider's own credential file (in that CLI's exact format), so a token is reused across checks rather than refreshed every time. If a refresh cannot proceed, the panel shows a `run: <provider> auth login` hint instead of breaking. Copilot (long-lived token) and Cursor (kept fresh by its own client) are read-only — vct never writes their credential files.
282
330
 
@@ -335,25 +383,58 @@ vct analysis --output today.json --daily
335
383
  ### Preview: Interactive Dashboard (`vct analysis`)
336
384
 
337
385
  ```
338
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
339
- │ Model Edit Lines Read Lines Write Lines Bash Edit Read Write
340
-
341
- │ claude-haiku-4-5-20251001 0 0 0 43 0 59 0
342
- │ claude-opus-4-6 1.28K 13.3K 1.58K 82 146 209 62
343
- │ gemini-3.1-pro-preview 0 0 0 0 0 0 0
344
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
345
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
346
- │ Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days
347
-
348
- │ Claude Code 1.28K 13.3K 1.58K 125 146 268 18 62 3
349
- │ Gemini 0 0 0 0 0 0 0 0 1
350
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
351
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
352
- Total Lines: 16.1K | Total Tools: 619 | Models: 3 | Memory: 41.2 MB
353
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
386
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
387
+ │ Model Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write
388
+
389
+ │ claude-haiku-4-5-20251001 0 0 0 43 0 59 0 0
390
+ │ claude-opus-4-8 1.28K 13.3K 1.58K 82 146 209 18 62
391
+ │ gemini-3.1-pro-preview 0 0 0 0 0 0 0 0
392
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
393
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
394
+ │ Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days
395
+
396
+ │ Claude Code 1.28K 13.3K 1.58K 125 146 268 18 62 3
397
+ │ Gemini 0 0 0 0 0 0 0 0 1
398
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
399
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
400
+ Total Lines: 16.1K | Total Tools: 619 | Models: 3 | Memory: 41.2 MB
401
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
354
402
  ↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
355
403
  ```
356
404
 
405
+ ### Preview: Table & JSON (`vct analysis`)
406
+
407
+ `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column); `--json` emits one aggregated row per model.
408
+
409
+ ```text
410
+ Analysis Statistics
411
+
412
+ ┌─────────────────┬────────────┬────────────┬─────────────┬──────┬──────┬──────┬───────────┬───────┐
413
+ │ Model ┆ Edit Lines ┆ Read Lines ┆ Write Lines ┆ Bash ┆ Edit ┆ Read ┆ TodoWrite ┆ Write │
414
+ ╞═════════════════╪════════════╪════════════╪═════════════╪══════╪══════╪══════╪═══════════╪═══════╡
415
+ │ gpt-5.5 ┆ 0 ┆ 3,087 ┆ 0 ┆ 25 ┆ 0 ┆ 10 ┆ 0 ┆ 0 │
416
+ │ claude-opus-4-8 ┆ 1,493 ┆ 15,564 ┆ 970 ┆ 123 ┆ 134 ┆ 144 ┆ 0 ┆ 12 │
417
+ │ TOTAL ┆ 1,493 ┆ 18,651 ┆ 970 ┆ 148 ┆ 134 ┆ 154 ┆ 0 ┆ 12 │
418
+ └─────────────────┴────────────┴────────────┴─────────────┴──────┴──────┴──────┴───────────┴───────┘
419
+ ```
420
+
421
+ ```json
422
+ // vct analysis --json (one model shown)
423
+ [
424
+ {
425
+ "model": "claude-opus-4-8",
426
+ "editLines": 1493,
427
+ "readLines": 15564,
428
+ "writeLines": 970,
429
+ "bashCount": 124,
430
+ "editCount": 134,
431
+ "readCount": 144,
432
+ "todoWriteCount": 0,
433
+ "writeCount": 12
434
+ }
435
+ ]
436
+ ```
437
+
357
438
  ---
358
439
 
359
440
  ## Update Command
@@ -378,9 +459,9 @@ vct update --force
378
459
  ### Preview (`vct update --check`)
379
460
 
380
461
  ```
381
- Current version: v0.10.3
462
+ Current version: v1.3.0
382
463
  Checking for latest release...
383
- Latest version: v0.10.3 — you are up to date!
464
+ Latest version: v1.3.0 — you are up to date!
384
465
  ```
385
466
 
386
467
  ---
@@ -395,6 +476,14 @@ vct version --text # One-field-per-line, script-friendly
395
476
  vct version --json # Machine-readable JSON
396
477
  ```
397
478
 
479
+ ```text
480
+ ┌───────────────┬──────────┐
481
+ │ Version ┆ 1.3.0 │
482
+ │ Rust Version ┆ 1.96.0 │
483
+ │ Cargo Version ┆ 1.96.0 │
484
+ └───────────────┴──────────┘
485
+ ```
486
+
398
487
  The binary version is produced at build time by `build.rs` from `git describe`, so development builds include commit count + short SHA + `dirty` suffix when applicable.
399
488
 
400
489
  ---
@@ -418,6 +507,12 @@ The binary version is produced at build time by `build.rs` from `git describe`,
418
507
  4. **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)
419
508
  5. **Fallback**: Shows $0.00 if no match found
420
509
 
510
+ ### Cost Details
511
+
512
+ - **Beyond tokens**: Claude web-search tool calls (`server_tool_use.web_search_requests`) are billed per query on top of the token cost; every other model's per-query charge is $0.
513
+ - **OpenCode**: a novel model name is priced from its tokens only on an **exact** LiteLLM match; with no exact match, vct trusts the assistant message's own stored cost instead of guessing from a loosely-similar name.
514
+ - **Cache is raw**: the daily cache stores the filtered upstream LiteLLM JSON (not a derived shape), so tiered / batch pricing stays available without re-fetching, and a small in-process LRU keeps repeated lookups cheap during a TUI refresh.
515
+
421
516
  ---
422
517
 
423
518
  ## Docker Support
@@ -425,13 +520,4 @@ The binary version is produced at build time by `build.rs` from `git describe`,
425
520
  ```bash
426
521
  # Build image
427
522
  docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
428
-
429
- # Run with your sessions
430
- docker run --rm \
431
- -v ~/.claude:/root/.claude \
432
- -v ~/.codex:/root/.codex \
433
- -v ~/.copilot:/root/.copilot \
434
- -v ~/.gemini:/root/.gemini \
435
- -v ~/.local/share/opencode:/root/.local/share/opencode \
436
- vibe_coding_tracker:latest usage
437
523
  ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  # Vibe Coding Tracker — AI Coding Assistant Usage Tracker
4
4
 
5
- <img src="assets/social-preview.png" alt="Vibe Coding Tracker social preview" width="640">
6
-
7
5
  [![Crates.io](https://img.shields.io/crates/v/vibe_coding_tracker?logo=rust&style=flat-square&color=E05D44)](https://crates.io/crates/vibe_coding_tracker)
8
6
  [![Crates.io Downloads](https://img.shields.io/crates/d/vibe_coding_tracker?logo=rust&style=flat-square)](https://crates.io/crates/vibe_coding_tracker)
9
7
  [![npm version](https://img.shields.io/npm/v/vibe-coding-tracker?logo=npm&style=flat-square&color=CB3837)](https://www.npmjs.com/package/vibe-coding-tracker)
@@ -17,6 +15,8 @@
17
15
  [![Star on GitHub](https://img.shields.io/github/stars/Mai0313/VibeCodingTracker?style=social&label=Star)](https://github.com/Mai0313/VibeCodingTracker)
18
16
  [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/pulls)
19
17
 
18
+ <img src="assets/social-preview.png" alt="Vibe Coding Tracker social preview" width="640">
19
+
20
20
  </div>
21
21
 
22
22
  **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, and OpenCode usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
@@ -64,13 +64,13 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
64
64
 
65
65
  | Feature | Description |
66
66
  | --------------------- | -------------------------------------------------------------------- |
67
- | **Multi-Provider** | Claude Code, Codex, Copilot, and Gemini — all in one place |
67
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, and OpenCode — all in one place |
68
68
  | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
69
  | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
70
  | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
+ | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
71
72
  | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
72
- | **Live Updates** | Real-time dashboard refreshes every second |
73
- | **Efficient Caching** | Smart daily cache reduces API calls |
73
+ | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
74
74
 
75
75
  ---
76
76
 
@@ -107,6 +107,9 @@ npm install -g @mai0313/vibe-coding-tracker
107
107
  pip install vibe_coding_tracker
108
108
  # Or with uv
109
109
  uv pip install vibe_coding_tracker
110
+
111
+ # Run without installing, straight from PyPI (uv)
112
+ uvx vibe_coding_tracker usage
110
113
  ```
111
114
 
112
115
  #### Method 3: Install from crates.io
@@ -205,24 +208,69 @@ vct usage --json --daily
205
208
 
206
209
  ```
207
210
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
208
- │ Model Input Output Cache Read Cache Write Total Cost (USD)
211
+ │ Model Input Output Cache Read Cache Write Total Cost (USD)
209
212
  │ │
210
- │ gemini-3.1-pro-preview 129K 10.3K 67.4K 0 207K $0.40
211
- │ claude-haiku-4-5-20251001 5.57K 19.8K 4.63M 620K 5.27M $1.34
212
- │ claude-opus-4-6 25.7K 179K 40.8M 2.57M 43.6M $77.59
213
+ │ gemini-3.1-pro-preview 129K 10.3K 67.4K 0 207K $0.40
214
+ │ claude-haiku-4-5-20251001 5.57K 19.8K 4.63M 620K 5.27M $1.34
215
+ │ claude-opus-4-8 25.7K 179K 40.8M 2.57M 43.6M $77.59
213
216
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
214
217
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
215
- │ Provider Tokens Cost Active Days
218
+ │ Provider Tokens Cost
216
219
  │ │
217
- │ Claude Code 48.9M $78.93 3
218
- │ Gemini 207K $0.40 1
220
+ │ Claude Code 48.9M $78.93
221
+ │ Gemini 207K $0.40
219
222
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
220
223
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
221
- Total Cost: $79.33 | Total Tokens: 49.3M | Models: 3 | Memory: 42.8 MB
224
+ Total Cost: $79.33 | Total Tokens: 49.3M | Models: 3 | Memory: 42.8 MB
222
225
  └─────────────────────────────────────────────────────────────────────────────────────────────┘
223
226
  ↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
224
227
  ```
225
228
 
229
+ ### Preview: Table & JSON (`vct usage`)
230
+
231
+ `--table` prints the same numbers as a static report with a per-provider summary; `--json` emits one enriched row per model (each with `cost_usd`) for scripting.
232
+
233
+ ```text
234
+ Token Usage Statistics
235
+
236
+ ┌───────────────────────────┬─────────┬─────────┬─────────────┬─────────────┬──────────────┬────────────┐
237
+ │ Model ┆ Input ┆ Output ┆ Cache Read ┆ Cache Write ┆ Total Tokens ┆ Cost (USD) │
238
+ ╞═══════════════════════════╪═════════╪═════════╪═════════════╪═════════════╪══════════════╪════════════╡
239
+ │ opencode/gemini-3.5-flash ┆ 19,421 ┆ 254 ┆ 0 ┆ 0 ┆ 19,675 ┆ $0.03 │
240
+ │ gpt-5.5 ┆ 242,227 ┆ 16,229 ┆ 2,406,912 ┆ 0 ┆ 2,665,368 ┆ $5.56 │
241
+ │ claude-opus-4-8 ┆ 401,937 ┆ 936,186 ┆ 138,099,926 ┆ 6,057,836 ┆ 145,495,885 ┆ $151.29 │
242
+ │ TOTAL ┆ 663,585 ┆ 952,669 ┆ 140,506,838 ┆ 6,057,836 ┆ 148,180,928 ┆ $156.88 │
243
+ └───────────────────────────┴─────────┴─────────┴─────────────┴─────────────┴──────────────┴────────────┘
244
+
245
+ Totals (by Provider)
246
+
247
+ ┌───────────────┬─────────────┬─────────┐
248
+ │ Provider ┆ Tokens ┆ Cost │
249
+ ╞═══════════════╪═════════════╪═════════╡
250
+ │ Claude Code ┆ 145,495,885 ┆ $151.29 │
251
+ │ OpenAI Codex ┆ 2,665,368 ┆ $5.56 │
252
+ │ OpenCode ┆ 19,675 ┆ $0.03 │
253
+ │ All Providers ┆ 148,180,928 ┆ $156.88 │
254
+ └───────────────┴─────────────┴─────────┘
255
+ ```
256
+
257
+ ```json
258
+ // vct usage --json (one model shown; rows are sorted by cost)
259
+ [
260
+ {
261
+ "model": "claude-opus-4-8",
262
+ "cost_usd": 151.29,
263
+ "usage": {
264
+ "input_tokens": 401937,
265
+ "output_tokens": 936186,
266
+ "cache_read_input_tokens": 138099926,
267
+ "cache_creation_input_tokens": 6057836,
268
+ "reasoning_output_tokens": 0
269
+ }
270
+ }
271
+ ]
272
+ ```
273
+
226
274
  ### What It Scans
227
275
 
228
276
  The tool automatically scans these directories:
@@ -240,17 +288,17 @@ The tool automatically scans these directories:
240
288
  ```
241
289
  ┌ Claude ─────────────────┐┌ Codex ──────────────────┐┌ Copilot ────────────────┐┌ Cursor ─────────────────┐
242
290
  │ Plan: max 20x ││ Plan: plus ││ Plan: individual ││ Plan: free │
243
- │ 5h ▰▱▱▱▱ 16% ↻ 2h0m ││ 5h ▰▰▱▱▱ 37% ↻ 2h33m││ prem ▰▱▱▱▱ 2% ↻ 25d ││ total ▰▰▰▰▰ 94% ↻ 17d
244
- │ 7d ▰▰▱▱▱ 41% ↻ 5d ││ 7d ▰▰▱▱▱ 24% ↻ 3d16h││ 1464/1500 · chat/compl ∞││ auto ▰▰▰▰▰ 100% ↻ 17d
245
- Opus ▰▰▰▱▱ 61% ↻ 5d ││ Credits: 0 +3 reset ││ updated just now ││ api ▰▰▰▱▱ 44% ↻ 17d
291
+ │ 5h ▰▱▱▱▱ 13% ↻ 1h42m││ 5h ▰▰▱▱▱ 33% ↻ 12m ││ prem ▰▱▱▱▱ 3% ↻ 24d ││ total ▰▱▱▱▱ 6% ↻ 16d
292
+ │ 7d ▰▰▰▱▱ 58% ↻ 1d23h││ 7d ▰▰▱▱▱ 36% ↻ 1h54m││ reqs ▰▱▱▱▱ 45/1500 ││ auto ▱▱▱▱▱ 0% ↻ 16d
293
+ Fable ▰▰▰▰▱ 79% ↻ 1d23h││ Credits: 0 +3 reset ││ updated just now ││ api ▰▰▰▱▱ 56% ↻ 16d
246
294
  │ Balance: - $0.00 used ││ updated just now ││ ││ updated just now │
247
295
  └─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
248
296
  ```
249
297
 
250
298
  - **Claude** — plan tier, 5-hour, weekly, and per-model weekly usage from the official OAuth usage API (`GET /api/oauth/usage`), read from `~/.claude/.credentials.json`, plus your credit balance. Polled about once a minute to stay under the endpoint's rate limit; a red `LIMIT` flag appears in the title when a cap is hit. The per-model weekly row is best-effort and simply hides when that scope is not returned.
251
299
  - **Codex** — plan tier, 5-hour and weekly usage, and credit balance from the ChatGPT backend (`wham/usage`) using `~/.codex/auth.json` (with approximate remaining messages / spend cap when applicable); falls back to the newest `rate_limits` in your Codex session logs when the API is unavailable (the title shows `Codex` vs `Codex (session)`).
252
- - **Copilot** — plan tier, premium-request quota (remaining / entitlement plus a gauge), and unlimited chat / completions from GitHub's Copilot API (`GET /copilot_internal/user`), read from `~/.copilot/config.json`. The request impersonates the Copilot CLI. The token is long-lived, so there is no refresh; a `401` / `403` shows a `run: copilot login` hint.
253
- - **Cursor** — plan tier, total / auto / API usage percentages, and on-demand spend from cursor.com (`GET /api/usage-summary`), using the session token in `~/.config/cursor/auth.json`. Refresh is reactive: vct re-reads the file each poll and uses the token while it is valid, since the official Cursor client keeps it fresh.
300
+ - **Copilot** — plan tier plus your premium-request quota, shown as two gauges: percent used and the used / total request count (e.g. `45/1500`), from GitHub's Copilot API (`GET /copilot_internal/user`), read from `~/.copilot/config.json`. The request impersonates the Copilot CLI. The token is long-lived, so there is no refresh; a `401` / `403` shows a `run: copilot login` hint.
301
+ - **Cursor** — plan tier, total / auto / API percent **used**, and on-demand spend from cursor.com (`GET /api/usage-summary`), using the session token in `~/.config/cursor/auth.json`. Refresh is reactive: vct re-reads the file each poll and uses the token while it is valid, since the official Cursor client keeps it fresh.
254
302
 
255
303
  **Automatic token refresh.** For Claude and Codex, when a token is near expiry or rejected, vct refreshes it and writes the new token back to the provider's own credential file (in that CLI's exact format), so a token is reused across checks rather than refreshed every time. If a refresh cannot proceed, the panel shows a `run: <provider> auth login` hint instead of breaking. Copilot (long-lived token) and Cursor (kept fresh by its own client) are read-only — vct never writes their credential files.
256
304
 
@@ -309,25 +357,58 @@ vct analysis --output today.json --daily
309
357
  ### Preview: Interactive Dashboard (`vct analysis`)
310
358
 
311
359
  ```
312
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
313
- │ Model Edit Lines Read Lines Write Lines Bash Edit Read Write
314
-
315
- │ claude-haiku-4-5-20251001 0 0 0 43 0 59 0
316
- │ claude-opus-4-6 1.28K 13.3K 1.58K 82 146 209 62
317
- │ gemini-3.1-pro-preview 0 0 0 0 0 0 0
318
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
319
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
320
- │ Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days
321
-
322
- │ Claude Code 1.28K 13.3K 1.58K 125 146 268 18 62 3
323
- │ Gemini 0 0 0 0 0 0 0 0 1
324
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
325
- ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
326
- Total Lines: 16.1K | Total Tools: 619 | Models: 3 | Memory: 41.2 MB
327
- └─────────────────────────────────────────────────────────────────────────────────────────────┘
360
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
361
+ │ Model Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write
362
+
363
+ │ claude-haiku-4-5-20251001 0 0 0 43 0 59 0 0
364
+ │ claude-opus-4-8 1.28K 13.3K 1.58K 82 146 209 18 62
365
+ │ gemini-3.1-pro-preview 0 0 0 0 0 0 0 0
366
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
367
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
368
+ │ Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days
369
+
370
+ │ Claude Code 1.28K 13.3K 1.58K 125 146 268 18 62 3
371
+ │ Gemini 0 0 0 0 0 0 0 0 1
372
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
373
+ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
374
+ Total Lines: 16.1K | Total Tools: 619 | Models: 3 | Memory: 41.2 MB
375
+ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
328
376
  ↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
329
377
  ```
330
378
 
379
+ ### Preview: Table & JSON (`vct analysis`)
380
+
381
+ `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column); `--json` emits one aggregated row per model.
382
+
383
+ ```text
384
+ Analysis Statistics
385
+
386
+ ┌─────────────────┬────────────┬────────────┬─────────────┬──────┬──────┬──────┬───────────┬───────┐
387
+ │ Model ┆ Edit Lines ┆ Read Lines ┆ Write Lines ┆ Bash ┆ Edit ┆ Read ┆ TodoWrite ┆ Write │
388
+ ╞═════════════════╪════════════╪════════════╪═════════════╪══════╪══════╪══════╪═══════════╪═══════╡
389
+ │ gpt-5.5 ┆ 0 ┆ 3,087 ┆ 0 ┆ 25 ┆ 0 ┆ 10 ┆ 0 ┆ 0 │
390
+ │ claude-opus-4-8 ┆ 1,493 ┆ 15,564 ┆ 970 ┆ 123 ┆ 134 ┆ 144 ┆ 0 ┆ 12 │
391
+ │ TOTAL ┆ 1,493 ┆ 18,651 ┆ 970 ┆ 148 ┆ 134 ┆ 154 ┆ 0 ┆ 12 │
392
+ └─────────────────┴────────────┴────────────┴─────────────┴──────┴──────┴──────┴───────────┴───────┘
393
+ ```
394
+
395
+ ```json
396
+ // vct analysis --json (one model shown)
397
+ [
398
+ {
399
+ "model": "claude-opus-4-8",
400
+ "editLines": 1493,
401
+ "readLines": 15564,
402
+ "writeLines": 970,
403
+ "bashCount": 124,
404
+ "editCount": 134,
405
+ "readCount": 144,
406
+ "todoWriteCount": 0,
407
+ "writeCount": 12
408
+ }
409
+ ]
410
+ ```
411
+
331
412
  ---
332
413
 
333
414
  ## Update Command
@@ -352,9 +433,9 @@ vct update --force
352
433
  ### Preview (`vct update --check`)
353
434
 
354
435
  ```
355
- Current version: v0.10.3
436
+ Current version: v1.3.0
356
437
  Checking for latest release...
357
- Latest version: v0.10.3 — you are up to date!
438
+ Latest version: v1.3.0 — you are up to date!
358
439
  ```
359
440
 
360
441
  ---
@@ -369,6 +450,14 @@ vct version --text # One-field-per-line, script-friendly
369
450
  vct version --json # Machine-readable JSON
370
451
  ```
371
452
 
453
+ ```text
454
+ ┌───────────────┬──────────┐
455
+ │ Version ┆ 1.3.0 │
456
+ │ Rust Version ┆ 1.96.0 │
457
+ │ Cargo Version ┆ 1.96.0 │
458
+ └───────────────┴──────────┘
459
+ ```
460
+
372
461
  The binary version is produced at build time by `build.rs` from `git describe`, so development builds include commit count + short SHA + `dirty` suffix when applicable.
373
462
 
374
463
  ---
@@ -392,6 +481,12 @@ The binary version is produced at build time by `build.rs` from `git describe`,
392
481
  4. **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)
393
482
  5. **Fallback**: Shows $0.00 if no match found
394
483
 
484
+ ### Cost Details
485
+
486
+ - **Beyond tokens**: Claude web-search tool calls (`server_tool_use.web_search_requests`) are billed per query on top of the token cost; every other model's per-query charge is $0.
487
+ - **OpenCode**: a novel model name is priced from its tokens only on an **exact** LiteLLM match; with no exact match, vct trusts the assistant message's own stored cost instead of guessing from a loosely-similar name.
488
+ - **Cache is raw**: the daily cache stores the filtered upstream LiteLLM JSON (not a derived shape), so tiered / batch pricing stays available without re-fetching, and a small in-process LRU keeps repeated lookups cheap during a TUI refresh.
489
+
395
490
  ---
396
491
 
397
492
  ## Docker Support
@@ -399,13 +494,4 @@ The binary version is produced at build time by `build.rs` from `git describe`,
399
494
  ```bash
400
495
  # Build image
401
496
  docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
402
-
403
- # Run with your sessions
404
- docker run --rm \
405
- -v ~/.claude:/root/.claude \
406
- -v ~/.codex:/root/.codex \
407
- -v ~/.copilot:/root/.copilot \
408
- -v ~/.gemini:/root/.gemini \
409
- -v ~/.local/share/opencode:/root/.local/share/opencode \
410
- vibe_coding_tracker:latest usage
411
497
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "vibe_coding_tracker"
3
- version = "1.3.0"
3
+ version = "1.3.2"
4
4
  description = "Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results"
5
5
  authors = [
6
6
  { name = "Wei Lee", email = "mai@mai0313.com" }