vibe-coding-tracker 1.11.0__tar.gz → 2.0.0__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.11.0
3
+ Version: 2.0.0
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
@@ -45,7 +45,7 @@ Description-Content-Type: text/markdown
45
45
 
46
46
  </div>
47
47
 
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, OpenCode, Cursor, and Hermes usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
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, OpenCode, Cursor, Hermes, and Grok usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
49
49
 
50
50
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
51
51
 
@@ -74,7 +74,7 @@ Choose your preferred view:
74
74
 
75
75
  ### Zero Configuration
76
76
 
77
- Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
77
+ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
78
78
 
79
79
  ### Rich Insights
80
80
 
@@ -88,15 +88,15 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
88
88
 
89
89
  ## Key Features
90
90
 
91
- | Feature | Description |
92
- | --------------------- | ------------------------------------------------------------------------------------ |
93
- | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes all in one place |
94
- | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
95
- | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
96
- | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
97
- | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
98
- | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
99
- | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
91
+ | Feature | Description |
92
+ | --------------------- | ----------------------------------------------------------------------- |
93
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok |
94
+ | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
95
+ | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
96
+ | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
97
+ | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
98
+ | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming session parse — built with Rust |
99
+ | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
100
100
 
101
101
  ---
102
102
 
@@ -170,7 +170,7 @@ vct <COMMAND> [OPTIONS]
170
170
  # Replace with `vibe_coding_tracker` if you are using the full binary name
171
171
 
172
172
  Commands:
173
- analysis Analyze JSONL conversation files (single file or all sessions)
173
+ analysis Analyze local session data (single file or all sessions)
174
174
  usage Display token usage statistics
175
175
  version Display version information
176
176
  update Update to the latest version from GitHub releases
@@ -202,7 +202,6 @@ Time range flags (shared by `usage` and `analysis`, mutually exclusive, default
202
202
  | `--table` | Static table, no TUI |
203
203
  | `--text` | Plain text, script-friendly |
204
204
  | `--json` | JSON with enriched pricing metadata |
205
- | `--output <FILE>` | Save enriched JSON to a file |
206
205
  | `--merge-providers` | Merge models sharing a base name across provider prefixes (ignored for `--json`) |
207
206
  | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |
208
207
 
@@ -221,8 +220,8 @@ vct usage --text
221
220
  # JSON for data processing (includes cost_usd and matched_model fields)
222
221
  vct usage --json
223
222
 
224
- # Save enriched JSON straight to a file
225
- vct usage --output report.json
223
+ # Save enriched JSON with shell redirection
224
+ vct usage --json > report.json
226
225
 
227
226
  # Combine time range with output format
228
227
  vct usage --weekly
@@ -318,6 +317,9 @@ The tool automatically scans these directories:
318
317
  - `~/.local/share/opencode/opencode.db` (OpenCode — SQLite database; honors `$XDG_DATA_HOME`)
319
318
  - `~/.cursor/chats/*/*/store.db` (Cursor — SQLite chat stores, used for `analysis` and a local `usage` estimate consistent with the other providers)
320
319
  - `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
320
+ - `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
321
+
322
+ Grok `usage` is one point-in-time local context estimate: vct records `signals.json`'s `contextTokensUsed` as cache-read tokens and estimates cost at the model's cache-read price. It is not cumulative billed usage. `analysis` reconstructs completed Read / Write / Edit / Bash / TodoWrite operations from the sibling `updates.jsonl`. Grok does not support quota panels or `vct fetch`.
321
323
 
322
324
  ### Live Quota Panels
323
325
 
@@ -350,19 +352,18 @@ A panel appears only for a provider whose credentials are present. When four pan
350
352
 
351
353
  **Deep dive into code operations — see exactly what your AI assistant did.**
352
354
 
353
- ### Flags
355
+ ### Arguments and Flags
354
356
 
355
- | Flag | Purpose |
356
- | ---------------------------------------------- | ----------------------------------------------------------- |
357
- | *(none)* | Interactive TUI dashboard over all sessions |
358
- | `--path <FILE>` | Analyze a single JSONL/JSON conversation file (prints JSON) |
359
- | `--table` | Static table with per-provider totals |
360
- | `--text` | Plain text, script-friendly |
361
- | `--json` | JSON array of aggregated rows printed to stdout |
362
- | `--output <FILE>` | Save results as pretty-printed JSON |
363
- | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |
357
+ | Argument / Flag | Purpose |
358
+ | ---------------------------------------------- | ---------------------------------------------------------------------------------------- |
359
+ | *(none)* | Interactive TUI dashboard over all sessions |
360
+ | `<FILE>` | Analyze one JSONL/JSON session file and print its complete `CodeAnalysis` JSON |
361
+ | `--table` | Static summary table with per-provider totals |
362
+ | `--text` | Plain-text summary, script-friendly |
363
+ | `--json` | Complete parser results as JSON: one object for `<FILE>`, otherwise an array of objects |
364
+ | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter for all-session analysis (see table above; not accepted with `<FILE>`) |
364
365
 
365
- See [`examples/`](examples/) for sample inputs and matching JSON outputs for all four providers.
366
+ See [`examples/`](examples/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`examples/grok_session/`](examples/grok_session/).
366
367
 
367
368
  ### Basic Usage
368
369
 
@@ -376,20 +377,24 @@ vct analysis --table
376
377
  # Plain text for scripts
377
378
  vct analysis --text
378
379
 
379
- # JSON of aggregated rows for data processing
380
+ # Complete parser results for every session
380
381
  vct analysis --json
381
382
 
382
383
  # Analyze a single conversation file → stdout JSON
383
- vct analysis --path ~/.claude/projects/session.jsonl
384
+ vct analysis ~/.claude/projects/session.jsonl
385
+
386
+ # Summarize only that conversation
387
+ vct analysis ~/.claude/projects/session.jsonl --table
384
388
 
385
- # Save results to JSON
386
- vct analysis --output report.json
389
+ # Save complete JSON with shell redirection
390
+ vct analysis --json > report.json
391
+ vct analysis ~/.claude/projects/session.jsonl > session-analysis.json
387
392
 
388
393
  # Combine time range with output format
389
394
  vct analysis --weekly
390
395
  vct analysis --table --monthly
391
396
  vct analysis --json --daily
392
- vct analysis --output today.json --daily
397
+ vct analysis --json --daily > today.json
393
398
  ```
394
399
 
395
400
  ### Preview: Interactive Dashboard (`vct analysis`)
@@ -416,7 +421,7 @@ vct analysis --output today.json --daily
416
421
 
417
422
  ### Preview: Table & JSON (`vct analysis`)
418
423
 
419
- `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column); `--json` emits one aggregated row per model.
424
+ `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column). `--text` and `--table` are compact projections of the same normalized parser records. `--json` keeps the complete records, including per-operation details and token usage. With no `<FILE>`, the outer array contains one `CodeAnalysis` object per session; with `<FILE>`, stdout is that single object and matches the corresponding shape under [`examples/`](examples/).
420
425
 
421
426
  ```text
422
427
  Analysis Statistics
@@ -430,23 +435,45 @@ Analysis Statistics
430
435
  └─────────────────┴────────────┴────────────┴─────────────┴──────┴──────┴──────┴───────────┴───────┘
431
436
  ```
432
437
 
433
- ```json
434
- // vct analysis --json (one model shown)
438
+ ```jsonc
439
+ // vct analysis --json (one abbreviated session shown)
435
440
  [
436
441
  {
437
- "model": "claude-opus-4-8",
438
- "editLines": 1493,
439
- "readLines": 15564,
440
- "writeLines": 970,
441
- "bashCount": 124,
442
- "editCount": 134,
443
- "readCount": 144,
444
- "todoWriteCount": 0,
445
- "writeCount": 12
442
+ "user": "alice",
443
+ "extensionName": "Claude-Code",
444
+ "insightsVersion": "...",
445
+ "machineId": "...",
446
+ "records": [
447
+ {
448
+ "totalUniqueFiles": 3,
449
+ "totalReadLines": 120,
450
+ "readFileDetails": [
451
+ {
452
+ "filePath": "/repo/src/main.rs",
453
+ "lineCount": 120,
454
+ "characterCount": 4102,
455
+ "timestamp": 1783872000000
456
+ }
457
+ ],
458
+ "toolCallCounts": { "Bash": 1, "Edit": 0, "Read": 1, "TodoWrite": 0, "Write": 0 },
459
+ "conversationUsage": { "claude-opus-4-8": { "input_tokens": 42, "output_tokens": 18 } }
460
+ }
461
+ ]
446
462
  }
447
463
  ]
448
464
  ```
449
465
 
466
+ > [!WARNING]
467
+ > Complete analysis JSON can be large and may contain source text, edit bodies, shell commands, absolute paths, repository URLs, user names, machine identifiers, and token metadata. Review it before sharing.
468
+
469
+ Batch analysis reads live provider stores. If an assistant appends to a session during the scan, later runs can legitimately contain newer data. Unchanged inputs serialize in a deterministic order.
470
+
471
+ Noninteractive analysis returns an error when every discovered source fails or uses an unrecognized schema. If only some sources fail, successful output is preserved and a warning is written to stderr.
472
+
473
+ `analysis FILE` follows the same rule for malformed or unsupported records inside one file: parsed JSON/text/table output is preserved on stdout and a generic skipped-record warning is written to stderr.
474
+
475
+ Codex code-mode sessions expose a completed JavaScript `exec` cell but no structured trace for its nested tools. VCT counts that cell as one Bash call and preserves its source in complete JSON, but does not guess nested Read/Edit/Write operations.
476
+
450
477
  ---
451
478
 
452
479
  ## Update Command
@@ -575,6 +602,15 @@ copilot = true
575
602
  gemini = true
576
603
  opencode = true
577
604
  cursor = true
605
+ hermes = true
606
+ grok = true
607
+
608
+ [logging]
609
+ # Minimum level written to ~/.vct/logs/vct-YYYY-MM-DD.log.
610
+ # One of: "off" | "error" | "warn" | "info" | "debug" | "trace".
611
+ level = "warn"
612
+ # Days of daily log files to keep; older files are pruned on startup. 0 keeps every file.
613
+ retention_days = 7
578
614
  ```
579
615
 
580
616
  | Setting | Effect |
@@ -586,10 +622,15 @@ cursor = true
586
622
  | `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
587
623
  | `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
588
624
  | `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
625
+ | `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
626
+ | `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
589
627
 
590
628
  > [!NOTE]
591
629
  > Cursor `usage` is a **local estimate** from the chat stores, so it behaves like Claude Code / Codex / Copilot / Gemini (all computed from local session files) and needs no network. It undercounts Cursor's real spend, because much of it is billed under Cursor-internal model names the local data cannot price — treat Cursor cost as approximate.
592
630
 
631
+ > [!NOTE]
632
+ > vct writes diagnostics to `~/.vct/logs/vct-YYYY-MM-DD.log` (plain text, file only — never shown in the dashboard). It stays quiet when healthy (default level `warn`) and the file is created lazily, so a healthy run leaves nothing behind. When a quota fetch fails or a session is skipped, that is where the reason is recorded — bump `logging.level` to `debug` for the full detail.
633
+
593
634
  ### Managing the file
594
635
 
595
636
  ```bash
@@ -635,6 +676,7 @@ vct config migrate
635
676
  - **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.
636
677
  - **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.
637
678
  - **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
679
+ - **Grok**: `contextTokensUsed` is priced as cache-read tokens only; this is a point-in-time local context estimate, not cumulative billed usage.
638
680
  - **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.
639
681
 
640
682
  ---
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
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, OpenCode, Cursor, and Hermes usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
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, OpenCode, Cursor, Hermes, and Grok usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@ Choose your preferred view:
48
48
 
49
49
  ### Zero Configuration
50
50
 
51
- Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
51
+ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
52
52
 
53
53
  ### Rich Insights
54
54
 
@@ -62,15 +62,15 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
62
62
 
63
63
  ## Key Features
64
64
 
65
- | Feature | Description |
66
- | --------------------- | ------------------------------------------------------------------------------------ |
67
- | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes all in one place |
68
- | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
- | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
- | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
- | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
72
- | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
73
- | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
65
+ | Feature | Description |
66
+ | --------------------- | ----------------------------------------------------------------------- |
67
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, and Grok |
68
+ | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
+ | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
+ | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
+ | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
72
+ | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming session parse — built with Rust |
73
+ | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
74
74
 
75
75
  ---
76
76
 
@@ -144,7 +144,7 @@ vct <COMMAND> [OPTIONS]
144
144
  # Replace with `vibe_coding_tracker` if you are using the full binary name
145
145
 
146
146
  Commands:
147
- analysis Analyze JSONL conversation files (single file or all sessions)
147
+ analysis Analyze local session data (single file or all sessions)
148
148
  usage Display token usage statistics
149
149
  version Display version information
150
150
  update Update to the latest version from GitHub releases
@@ -176,7 +176,6 @@ Time range flags (shared by `usage` and `analysis`, mutually exclusive, default
176
176
  | `--table` | Static table, no TUI |
177
177
  | `--text` | Plain text, script-friendly |
178
178
  | `--json` | JSON with enriched pricing metadata |
179
- | `--output <FILE>` | Save enriched JSON to a file |
180
179
  | `--merge-providers` | Merge models sharing a base name across provider prefixes (ignored for `--json`) |
181
180
  | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |
182
181
 
@@ -195,8 +194,8 @@ vct usage --text
195
194
  # JSON for data processing (includes cost_usd and matched_model fields)
196
195
  vct usage --json
197
196
 
198
- # Save enriched JSON straight to a file
199
- vct usage --output report.json
197
+ # Save enriched JSON with shell redirection
198
+ vct usage --json > report.json
200
199
 
201
200
  # Combine time range with output format
202
201
  vct usage --weekly
@@ -292,6 +291,9 @@ The tool automatically scans these directories:
292
291
  - `~/.local/share/opencode/opencode.db` (OpenCode — SQLite database; honors `$XDG_DATA_HOME`)
293
292
  - `~/.cursor/chats/*/*/store.db` (Cursor — SQLite chat stores, used for `analysis` and a local `usage` estimate consistent with the other providers)
294
293
  - `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
294
+ - `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
295
+
296
+ Grok `usage` is one point-in-time local context estimate: vct records `signals.json`'s `contextTokensUsed` as cache-read tokens and estimates cost at the model's cache-read price. It is not cumulative billed usage. `analysis` reconstructs completed Read / Write / Edit / Bash / TodoWrite operations from the sibling `updates.jsonl`. Grok does not support quota panels or `vct fetch`.
295
297
 
296
298
  ### Live Quota Panels
297
299
 
@@ -324,19 +326,18 @@ A panel appears only for a provider whose credentials are present. When four pan
324
326
 
325
327
  **Deep dive into code operations — see exactly what your AI assistant did.**
326
328
 
327
- ### Flags
329
+ ### Arguments and Flags
328
330
 
329
- | Flag | Purpose |
330
- | ---------------------------------------------- | ----------------------------------------------------------- |
331
- | *(none)* | Interactive TUI dashboard over all sessions |
332
- | `--path <FILE>` | Analyze a single JSONL/JSON conversation file (prints JSON) |
333
- | `--table` | Static table with per-provider totals |
334
- | `--text` | Plain text, script-friendly |
335
- | `--json` | JSON array of aggregated rows printed to stdout |
336
- | `--output <FILE>` | Save results as pretty-printed JSON |
337
- | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |
331
+ | Argument / Flag | Purpose |
332
+ | ---------------------------------------------- | ---------------------------------------------------------------------------------------- |
333
+ | *(none)* | Interactive TUI dashboard over all sessions |
334
+ | `<FILE>` | Analyze one JSONL/JSON session file and print its complete `CodeAnalysis` JSON |
335
+ | `--table` | Static summary table with per-provider totals |
336
+ | `--text` | Plain-text summary, script-friendly |
337
+ | `--json` | Complete parser results as JSON: one object for `<FILE>`, otherwise an array of objects |
338
+ | `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter for all-session analysis (see table above; not accepted with `<FILE>`) |
338
339
 
339
- See [`examples/`](examples/) for sample inputs and matching JSON outputs for all four providers.
340
+ See [`examples/`](examples/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`examples/grok_session/`](examples/grok_session/).
340
341
 
341
342
  ### Basic Usage
342
343
 
@@ -350,20 +351,24 @@ vct analysis --table
350
351
  # Plain text for scripts
351
352
  vct analysis --text
352
353
 
353
- # JSON of aggregated rows for data processing
354
+ # Complete parser results for every session
354
355
  vct analysis --json
355
356
 
356
357
  # Analyze a single conversation file → stdout JSON
357
- vct analysis --path ~/.claude/projects/session.jsonl
358
+ vct analysis ~/.claude/projects/session.jsonl
359
+
360
+ # Summarize only that conversation
361
+ vct analysis ~/.claude/projects/session.jsonl --table
358
362
 
359
- # Save results to JSON
360
- vct analysis --output report.json
363
+ # Save complete JSON with shell redirection
364
+ vct analysis --json > report.json
365
+ vct analysis ~/.claude/projects/session.jsonl > session-analysis.json
361
366
 
362
367
  # Combine time range with output format
363
368
  vct analysis --weekly
364
369
  vct analysis --table --monthly
365
370
  vct analysis --json --daily
366
- vct analysis --output today.json --daily
371
+ vct analysis --json --daily > today.json
367
372
  ```
368
373
 
369
374
  ### Preview: Interactive Dashboard (`vct analysis`)
@@ -390,7 +395,7 @@ vct analysis --output today.json --daily
390
395
 
391
396
  ### Preview: Table & JSON (`vct analysis`)
392
397
 
393
- `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column); `--json` emits one aggregated row per model.
398
+ `--table` renders the per-model breakdown plus a per-provider summary (with an Active Days column). `--text` and `--table` are compact projections of the same normalized parser records. `--json` keeps the complete records, including per-operation details and token usage. With no `<FILE>`, the outer array contains one `CodeAnalysis` object per session; with `<FILE>`, stdout is that single object and matches the corresponding shape under [`examples/`](examples/).
394
399
 
395
400
  ```text
396
401
  Analysis Statistics
@@ -404,23 +409,45 @@ Analysis Statistics
404
409
  └─────────────────┴────────────┴────────────┴─────────────┴──────┴──────┴──────┴───────────┴───────┘
405
410
  ```
406
411
 
407
- ```json
408
- // vct analysis --json (one model shown)
412
+ ```jsonc
413
+ // vct analysis --json (one abbreviated session shown)
409
414
  [
410
415
  {
411
- "model": "claude-opus-4-8",
412
- "editLines": 1493,
413
- "readLines": 15564,
414
- "writeLines": 970,
415
- "bashCount": 124,
416
- "editCount": 134,
417
- "readCount": 144,
418
- "todoWriteCount": 0,
419
- "writeCount": 12
416
+ "user": "alice",
417
+ "extensionName": "Claude-Code",
418
+ "insightsVersion": "...",
419
+ "machineId": "...",
420
+ "records": [
421
+ {
422
+ "totalUniqueFiles": 3,
423
+ "totalReadLines": 120,
424
+ "readFileDetails": [
425
+ {
426
+ "filePath": "/repo/src/main.rs",
427
+ "lineCount": 120,
428
+ "characterCount": 4102,
429
+ "timestamp": 1783872000000
430
+ }
431
+ ],
432
+ "toolCallCounts": { "Bash": 1, "Edit": 0, "Read": 1, "TodoWrite": 0, "Write": 0 },
433
+ "conversationUsage": { "claude-opus-4-8": { "input_tokens": 42, "output_tokens": 18 } }
434
+ }
435
+ ]
420
436
  }
421
437
  ]
422
438
  ```
423
439
 
440
+ > [!WARNING]
441
+ > Complete analysis JSON can be large and may contain source text, edit bodies, shell commands, absolute paths, repository URLs, user names, machine identifiers, and token metadata. Review it before sharing.
442
+
443
+ Batch analysis reads live provider stores. If an assistant appends to a session during the scan, later runs can legitimately contain newer data. Unchanged inputs serialize in a deterministic order.
444
+
445
+ Noninteractive analysis returns an error when every discovered source fails or uses an unrecognized schema. If only some sources fail, successful output is preserved and a warning is written to stderr.
446
+
447
+ `analysis FILE` follows the same rule for malformed or unsupported records inside one file: parsed JSON/text/table output is preserved on stdout and a generic skipped-record warning is written to stderr.
448
+
449
+ Codex code-mode sessions expose a completed JavaScript `exec` cell but no structured trace for its nested tools. VCT counts that cell as one Bash call and preserves its source in complete JSON, but does not guess nested Read/Edit/Write operations.
450
+
424
451
  ---
425
452
 
426
453
  ## Update Command
@@ -549,6 +576,15 @@ copilot = true
549
576
  gemini = true
550
577
  opencode = true
551
578
  cursor = true
579
+ hermes = true
580
+ grok = true
581
+
582
+ [logging]
583
+ # Minimum level written to ~/.vct/logs/vct-YYYY-MM-DD.log.
584
+ # One of: "off" | "error" | "warn" | "info" | "debug" | "trace".
585
+ level = "warn"
586
+ # Days of daily log files to keep; older files are pruned on startup. 0 keeps every file.
587
+ retention_days = 7
552
588
  ```
553
589
 
554
590
  | Setting | Effect |
@@ -560,10 +596,15 @@ cursor = true
560
596
  | `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
561
597
  | `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
562
598
  | `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
599
+ | `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
600
+ | `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
563
601
 
564
602
  > [!NOTE]
565
603
  > Cursor `usage` is a **local estimate** from the chat stores, so it behaves like Claude Code / Codex / Copilot / Gemini (all computed from local session files) and needs no network. It undercounts Cursor's real spend, because much of it is billed under Cursor-internal model names the local data cannot price — treat Cursor cost as approximate.
566
604
 
605
+ > [!NOTE]
606
+ > vct writes diagnostics to `~/.vct/logs/vct-YYYY-MM-DD.log` (plain text, file only — never shown in the dashboard). It stays quiet when healthy (default level `warn`) and the file is created lazily, so a healthy run leaves nothing behind. When a quota fetch fails or a session is skipped, that is where the reason is recorded — bump `logging.level` to `debug` for the full detail.
607
+
567
608
  ### Managing the file
568
609
 
569
610
  ```bash
@@ -609,6 +650,7 @@ vct config migrate
609
650
  - **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.
610
651
  - **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.
611
652
  - **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
653
+ - **Grok**: `contextTokensUsed` is priced as cache-read tokens only; this is a point-in-time local context estimate, not cumulative billed usage.
612
654
  - **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.
613
655
 
614
656
  ---
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "vibe_coding_tracker"
3
- version = "1.11.0"
3
+ version = "2.0.0"
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" }