vibe-coding-tracker 0.2.12__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.
@@ -0,0 +1,779 @@
1
+ Metadata-Version: 2.3
2
+ Name: vibe-coding-tracker
3
+ Version: 0.2.12
4
+ Summary: Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results
5
+ Keywords: cli,ai,coding-assistant,telemetry,claude,codex,gemini,usage-tracker,analytics
6
+ Author: Wei Lee
7
+ Author-email: Wei Lee <mai@mai0313.com>
8
+ License: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.8
22
+ Project-URL: Bug Tracker, https://github.com/Mai0313/VibeCodingTracker/issues
23
+ Project-URL: Homepage, https://github.com/Mai0313/VibeCodingTracker
24
+ Project-URL: Repository, https://github.com/Mai0313/VibeCodingTracker
25
+ Description-Content-Type: text/markdown
26
+
27
+ <center>
28
+
29
+ # Vibe Coding Tracker — AI Coding Assistant Usage Tracker
30
+
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)
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)
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)
34
+ [![npm downloads](https://img.shields.io/npm/dt/vibe_coding_tracker?logo=npm&style=flat-square)](https://www.npmjs.com/package/vibe_coding_tracker)
35
+ [![PyPI version](https://img.shields.io/pypi/v/vibe_coding_tracker?logo=python&style=flat-square&color=3776AB)](https://pypi.org/project/vibe_coding_tracker/)
36
+ [![PyPI downloads](https://img.shields.io/pypi/dm/vibe_coding_tracker?logo=python&style=flat-square)](https://pypi.org/project/vibe_coding_tracker/)
37
+ [![rust](https://img.shields.io/badge/Rust-stable-orange?logo=rust&logoColor=white&style=flat-square)](https://www.rust-lang.org/)
38
+ [![tests](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/test.yml?label=tests&logo=github&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/test.yml)
39
+ [![code-quality](https://img.shields.io/github/actions/workflow/status/Mai0313/VibeCodingTracker/code-quality-check.yml?label=code-quality&logo=github&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/code-quality-check.yml)
40
+ [![license](https://img.shields.io/badge/License-MIT-green.svg?labelColor=gray&style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/tree/master?tab=License-1-ov-file)
41
+ [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Mai0313/VibeCodingTracker/pulls)
42
+
43
+ </center>
44
+
45
+ **Track your AI coding costs in real-time.** Vibe Coding Tracker is a powerful CLI tool that helps you monitor and analyze your Claude Code, Codex, and Gemini usage, providing detailed cost breakdowns, token statistics, and code operation insights.
46
+
47
+ [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
48
+
49
+ > Note: CLI examples use the short alias `vct`. If you built from source, the compiled binary is named `vibe_coding_tracker`; create an alias or replace `vct` with the full name when running commands.
50
+
51
+ ---
52
+
53
+ ## 🎯 Why Vibe Coding Tracker?
54
+
55
+ ### 💰 Know Your Costs
56
+
57
+ Stop wondering how much your AI coding sessions cost. Get **real-time cost tracking** with automatic pricing updates from [LiteLLM](https://github.com/BerriAI/litellm).
58
+
59
+ ### 📊 Beautiful Visualizations
60
+
61
+ Choose your preferred view:
62
+
63
+ - **Interactive Dashboard**: Auto-refreshing terminal UI with live updates
64
+ - **Static Reports**: Professional tables for documentation
65
+ - **Script-Friendly**: Plain text and JSON for automation
66
+ - **Full Precision**: Export exact costs for accounting
67
+
68
+ ### 🚀 Zero Configuration
69
+
70
+ Automatically detects and processes logs from Claude Code, Codex, and Gemini. No setup required—just run and analyze.
71
+
72
+ ### 🎨 Rich Insights
73
+
74
+ - Token usage by model and date
75
+ - Cost breakdown by cache types
76
+ - File operations tracking
77
+ - Command execution history
78
+ - Git repository information
79
+
80
+ ---
81
+
82
+ ## ✨ Key Features
83
+
84
+ | Feature | Description |
85
+ | -------------------------- | ----------------------------------------------------------- |
86
+ | 🤖 **Auto-Detection** | Intelligently identifies Claude Code, Codex, or Gemini logs |
87
+ | 💵 **Smart Pricing** | Fuzzy model matching + daily cache for speed |
88
+ | 🎨 **4 Display Modes** | Interactive, Table, Text, and JSON outputs |
89
+ | 📈 **Comprehensive Stats** | Tokens, costs, file ops, and tool calls |
90
+ | ⚡ **High Performance** | Built with Rust for speed and reliability |
91
+ | 🔄 **Live Updates** | Real-time dashboard refreshes every second |
92
+ | 💾 **Efficient Caching** | Smart daily cache reduces API calls |
93
+
94
+ ---
95
+
96
+ ## 🚀 Quick Start
97
+
98
+ ### Installation
99
+
100
+ Choose the installation method that works best for you:
101
+
102
+ #### Method 1: Install from npm (Recommended ✨)
103
+
104
+ **The easiest way to install** - includes pre-compiled binaries for your platform, no build step required!
105
+
106
+ Choose any of the following package names (all are identical):
107
+
108
+ ```bash
109
+ # Main package
110
+ npm install -g vibe_coding_tracker
111
+
112
+ # Short alias with scope
113
+ npm install -g @mai0313/vct
114
+
115
+ # Full name with scope
116
+ npm install -g @mai0313/vibe_coding_tracker
117
+ ```
118
+
119
+ **Prerequisites**: [Node.js](https://nodejs.org/) v22 or higher
120
+
121
+ **Supported Platforms**:
122
+
123
+ - Linux (x64, ARM64)
124
+ - macOS (x64, ARM64)
125
+ - Windows (x64, ARM64)
126
+
127
+ #### Method 2: Install from PyPI
128
+
129
+ **For Python users** - includes pre-compiled binaries for your platform, no build step required!
130
+
131
+ ```bash
132
+ # Install with pip
133
+ pip install vibe_coding_tracker
134
+
135
+ # Install with uv (recommended for faster installation)
136
+ uv pip install vibe_coding_tracker
137
+ ```
138
+
139
+ **Prerequisites**: Python 3.8 or higher
140
+
141
+ **Supported Platforms**:
142
+
143
+ - Linux (x64, ARM64)
144
+ - macOS (x64, ARM64)
145
+ - Windows (x64, ARM64)
146
+
147
+ #### Method 3: Install from crates.io
148
+
149
+ Install using Cargo from the official Rust package registry:
150
+
151
+ ```bash
152
+ cargo install vibe_coding_tracker
153
+ ```
154
+
155
+ **Prerequisites**: [Rust toolchain](https://rustup.rs/) 1.70 or higher
156
+
157
+ #### Method 4: Build from Source
158
+
159
+ For users who want to customize the build or contribute to development:
160
+
161
+ ```bash
162
+ # 1. Clone the repository
163
+ git clone https://github.com/Mai0313/VibeCodingTracker.git
164
+ cd VibeCodingTracker
165
+
166
+ # 2. Build release version
167
+ cargo build --release
168
+
169
+ # 3. Binary location
170
+ ./target/release/vibe_coding_tracker
171
+
172
+ # 4. Optional: create a short alias
173
+ # Linux/macOS:
174
+ sudo ln -sf "$(pwd)/target/release/vibe_coding_tracker" /usr/local/bin/vct
175
+
176
+ # Or install to user directory:
177
+ mkdir -p ~/.local/bin
178
+ ln -sf "$(pwd)/target/release/vibe_coding_tracker" ~/.local/bin/vct
179
+ # Make sure ~/.local/bin is in your PATH
180
+ ```
181
+
182
+ **Prerequisites**: [Rust toolchain](https://rustup.rs/) 1.70 or higher
183
+
184
+ ### First Run
185
+
186
+ ```bash
187
+ # View your usage with the short alias (if available)
188
+ vct usage
189
+
190
+ # Or run the binary built by Cargo
191
+ ./target/release/vibe_coding_tracker usage
192
+
193
+ # Analyze a specific conversation
194
+ ./target/release/vibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl
195
+ ```
196
+
197
+ > 💡 **Tip**: Use `vct` as a short alias for `vibe_coding_tracker` to save typing—create it manually with `ln -sf ./target/release/vibe_coding_tracker ~/.local/bin/vct` (or any path you prefer).
198
+
199
+ ---
200
+
201
+ ## 📖 Command Guide
202
+
203
+ ### 🔍 Quick Reference
204
+
205
+ ```bash
206
+ vct <COMMAND> [OPTIONS]
207
+ # Replace with `vibe_coding_tracker` if you are using the full binary name
208
+
209
+ Commands:
210
+ usage Show token usage and costs (default: interactive)
211
+ analysis Analyze conversation files and export data
212
+ version Display version information
213
+ update Update to the latest version from GitHub releases
214
+ help Show help information
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 💰 Usage Command
220
+
221
+ **Track your spending across all AI coding sessions.**
222
+
223
+ ### Basic Usage
224
+
225
+ ```bash
226
+ # Interactive dashboard (recommended)
227
+ vct usage
228
+
229
+ # Static table for reports
230
+ vct usage --table
231
+
232
+ # Plain text for scripts
233
+ vct usage --text
234
+
235
+ # JSON for data processing
236
+ vct usage --json
237
+ ```
238
+
239
+ ### What You Get
240
+
241
+ The tool scans these directories automatically:
242
+
243
+ - `~/.claude/projects/*.jsonl` (Claude Code)
244
+ - `~/.codex/sessions/*.jsonl` (Codex)
245
+ - `~/.gemini/tmp/<project_hash>/chats/*.json` (Gemini)
246
+
247
+ ### 🎨 Interactive Mode (Default)
248
+
249
+ **Live dashboard that updates every second**
250
+
251
+ ```
252
+ ┌──────────────────────────────────────────────────────────────────┐
253
+ │ 📊 Token Usage Statistics │
254
+ └──────────────────────────────────────────────────────────────────┘
255
+ ┌────────────┬──────────────────────┬────────────┬────────────┬────────────┬──────────────┬────────────┬────────────┐
256
+ │ Date │ Model │ Input │ Output │ Cache Read │ Cache Create │ Total │ Cost (USD) │
257
+ ├────────────┼──────────────────────┼────────────┼────────────┼────────────┼──────────────┼────────────┼────────────┤
258
+ │ 2025-10-01 │ claude-sonnet-4-20… │ 45,230 │ 12,450 │ 230,500 │ 50,000 │ 338,180 │ $2.15 │
259
+ │ 2025-10-02 │ claude-sonnet-4-20… │ 32,100 │ 8,920 │ 180,000 │ 30,000 │ 251,020 │ $1.58 │
260
+ │ 2025-10-03 │ claude-sonnet-4-20… │ 28,500 │ 7,200 │ 150,000 │ 25,000 │ 210,700 │ $1.32 │
261
+ │ 2025-10-03 │ gpt-4-turbo │ 15,000 │ 5,000 │ 0 │ 0 │ 20,000 │ $0.25 │
262
+ │ │ TOTAL │ 120,830 │ 33,570 │ 560,500 │ 105,000 │ 819,900 │ $5.30 │
263
+ └────────────┴──────────────────────┴────────────┴────────────┴────────────┴──────────────┴────────────┴────────────┘
264
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
265
+ │ 💰 Total Cost: $5.30 | 🔢 Total Tokens: 819,900 | 📅 Entries: 4 | 🧠 Memory: 12.5 MB │
266
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
267
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
268
+ │ 📈 Daily Averages │
269
+ │ │
270
+ │ Claude Code: 266,667 tokens/day | $1.68/day │
271
+ │ Codex: 20,000 tokens/day | $0.25/day │
272
+ │ Overall: 204,975 tokens/day | $1.33/day │
273
+ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
274
+
275
+ Press 'q', 'Esc', or 'Ctrl+C' to quit
276
+ ```
277
+
278
+ **Features**:
279
+
280
+ - ✨ Auto-refreshes every second
281
+ - 🎯 Highlights today's entries
282
+ - 🔄 Shows recently updated rows
283
+ - 💾 Displays memory usage
284
+ - 📊 Summary statistics
285
+ - 📈 Daily averages by provider (Claude Code, Codex, Gemini)
286
+
287
+ **Controls**: Press `q`, `Esc`, or `Ctrl+C` to exit
288
+
289
+ ### 📋 Static Table Mode
290
+
291
+ **Perfect for documentation and reports**
292
+
293
+ ```bash
294
+ vct usage --table
295
+ ```
296
+
297
+ ```
298
+ 📊 Token Usage Statistics
299
+
300
+ ╔════════════╦══════════════════════╦════════════╦════════════╦════════════╦══════════════╦══════════════╦════════════╗
301
+ ║ Date ║ Model ║ Input ║ Output ║ Cache Read ║ Cache Create ║ Total Tokens ║ Cost (USD) ║
302
+ ╠════════════╬══════════════════════╬════════════╬════════════╬════════════╬══════════════╬══════════════╬════════════╣
303
+ ║ 2025-10-01 ║ claude-sonnet-4-20… ║ 45,230 ║ 12,450 ║ 230,500 ║ 50,000 ║ 338,180 ║ $2.15 ║
304
+ ║ 2025-10-02 ║ claude-sonnet-4-20… ║ 32,100 ║ 8,920 ║ 180,000 ║ 30,000 ║ 251,020 ║ $1.58 ║
305
+ ║ 2025-10-03 ║ claude-sonnet-4-20… ║ 28,500 ║ 7,200 ║ 150,000 ║ 25,000 ║ 210,700 ║ $1.32 ║
306
+ ║ 2025-10-03 ║ gpt-4-turbo ║ 15,000 ║ 5,000 ║ 0 ║ 0 ║ 20,000 ║ $0.25 ║
307
+ ║ ║ TOTAL ║ 120,830 ║ 33,570 ║ 560,500 ║ 105,000 ║ 819,900 ║ $5.30 ║
308
+ ╚════════════╩══════════════════════╩════════════╩════════════╩════════════╩══════════════╩══════════════╩════════════╝
309
+
310
+ 📈 Daily Averages (by Provider)
311
+
312
+ ╔═════════════╦════════════════╦══════════════╦══════╗
313
+ ║ Provider ║ Avg Tokens/Day ║ Avg Cost/Day ║ Days ║
314
+ ╠═════════════╬════════════════╬══════════════╬══════╣
315
+ ║ Claude Code ║ 266,667 ║ $1.68 ║ 3 ║
316
+ ╠═════════════╬════════════════╬══════════════╬══════╣
317
+ ║ Codex ║ 20,000 ║ $0.25 ║ 1 ║
318
+ ╠═════════════╬════════════════╬══════════════╬══════╣
319
+ ║ OVERALL ║ 204,975 ║ $1.33 ║ 4 ║
320
+ ╚═════════════╩════════════════╩══════════════╩══════╝
321
+ ```
322
+
323
+ ### 📝 Text Mode
324
+
325
+ **Ideal for scripting and parsing**
326
+
327
+ ```bash
328
+ vct usage --text
329
+ ```
330
+
331
+ ```
332
+ 2025-10-01 > claude-sonnet-4-20250514: $2.154230
333
+ 2025-10-02 > claude-sonnet-4-20250514: $1.583450
334
+ 2025-10-03 > claude-sonnet-4-20250514: $1.321200
335
+ 2025-10-03 > gpt-4-turbo: $0.250000
336
+ ```
337
+
338
+ ### 🗂️ JSON Mode
339
+
340
+ **Full precision for accounting and integration**
341
+
342
+ ```bash
343
+ vct usage --json
344
+ ```
345
+
346
+ ```json
347
+ {
348
+ "2025-10-01": [
349
+ {
350
+ "model": "claude-sonnet-4-20250514",
351
+ "usage": {
352
+ "input_tokens": 45230,
353
+ "output_tokens": 12450,
354
+ "cache_read_input_tokens": 230500,
355
+ "cache_creation_input_tokens": 50000,
356
+ "cache_creation": {
357
+ "ephemeral_5m_input_tokens": 50000
358
+ },
359
+ "service_tier": "standard"
360
+ },
361
+ "cost_usd": 2.1542304567890125
362
+ }
363
+ ]
364
+ }
365
+ ```
366
+
367
+ ### 🔍 Output Comparison
368
+
369
+ | Feature | Interactive | Table | Text | JSON |
370
+ | --------------- | ----------- | ------- | --------- | ------------------ |
371
+ | **Best For** | Monitoring | Reports | Scripts | Integration |
372
+ | **Cost Format** | $2.15 | $2.15 | $2.154230 | 2.1542304567890123 |
373
+ | **Updates** | Real-time | Static | Static | Static |
374
+ | **Colors** | ✅ | ✅ | ❌ | ❌ |
375
+ | **Parseable** | ❌ | ❌ | ✅ | ✅ |
376
+
377
+ ### 💡 Use Cases
378
+
379
+ - **Budget Tracking**: Monitor your daily AI spending
380
+ - **Cost Optimization**: Identify expensive sessions
381
+ - **Team Reporting**: Generate usage reports for management
382
+ - **Billing**: Export precise costs for invoicing
383
+ - **Monitoring**: Real-time dashboard for active development
384
+
385
+ ---
386
+
387
+ ## 📊 Analysis Command
388
+
389
+ **Deep dive into conversation files - single file or batch analysis.**
390
+
391
+ ### Basic Usage
392
+
393
+ ```bash
394
+ # Single file: Analyze and display
395
+ vct analysis --path ~/.claude/projects/session.jsonl
396
+
397
+ # Single file: Save to file
398
+ vct analysis --path ~/.claude/projects/session.jsonl --output report.json
399
+
400
+ # Batch: Analyze all sessions with interactive table (default)
401
+ vct analysis
402
+
403
+ # Batch: Save aggregated results to JSON
404
+ vct analysis --output batch_report.json
405
+
406
+ # Batch with provider grouping: Output complete records grouped by provider (JSON format)
407
+ vct analysis --all
408
+
409
+ # Save the grouped results to a file
410
+ vct analysis --all --output grouped_report.json
411
+ ```
412
+
413
+ ### What You Get
414
+
415
+ **Single File Analysis**:
416
+
417
+ - **Token Usage**: Input, output, and cache statistics by model
418
+ - **File Operations**: Every read, write, and edit with full details
419
+ - **Command History**: All shell commands executed
420
+ - **Tool Usage**: Counts of each tool type used
421
+ - **Metadata**: User, machine ID, Git repo, timestamps
422
+
423
+ **Batch Analysis**:
424
+
425
+ - **Aggregated Metrics**: Grouped by date and model
426
+ - **Line Counts**: Edit, read, and write operations
427
+ - **Tool Statistics**: Bash, Edit, Read, TodoWrite, Write counts
428
+ - **Interactive Display**: Real-time TUI table (default)
429
+ - **JSON Export**: Structured data for further processing
430
+
431
+ ### Sample Output - Single File
432
+
433
+ ```json
434
+ {
435
+ "extensionName": "Claude-Code",
436
+ "insightsVersion": "0.1.0",
437
+ "user": "wei",
438
+ "machineId": "5b0dfa41ada84d5180a514698f67bd80",
439
+ "records": [
440
+ {
441
+ "conversationUsage": {
442
+ "claude-sonnet-4-20250514": {
443
+ "input_tokens": 252,
444
+ "output_tokens": 3921,
445
+ "cache_read_input_tokens": 1298818,
446
+ "cache_creation_input_tokens": 124169
447
+ }
448
+ },
449
+ "toolCallCounts": {
450
+ "Read": 15,
451
+ "Write": 4,
452
+ "Edit": 2,
453
+ "Bash": 5,
454
+ "TodoWrite": 3
455
+ },
456
+ "totalUniqueFiles": 8,
457
+ "totalWriteLines": 80,
458
+ "totalReadLines": 120,
459
+ "folderPath": "/home/wei/repo/project",
460
+ "gitRemoteUrl": "https://github.com/user/project.git"
461
+ }
462
+ ]
463
+ }
464
+ ```
465
+
466
+ ### Sample Output - Batch Analysis
467
+
468
+ **Interactive Table** (default when running `vct analysis`):
469
+
470
+ ```
471
+ ┌──────────────────────────────────────────────────────────────────┐
472
+ │ 🔍 Analysis Statistics │
473
+ └──────────────────────────────────────────────────────────────────┘
474
+ ┌────────────┬────────────────────┬────────────┬────────────┬────────────┬──────┬──────┬──────┬───────────┬───────┐
475
+ │ Date │ Model │ Edit Lines │ Read Lines │ Write Lines│ Bash │ Edit │ Read │ TodoWrite │ Write │
476
+ ├────────────┼────────────────────┼────────────┼────────────┼────────────┼──────┼──────┼──────┼───────────┼───────┤
477
+ │ 2025-10-02 │ claude-sonnet-4-5…│ 901 │ 11,525 │ 53 │ 13 │ 26 │ 27 │ 10 │ 1 │
478
+ │ 2025-10-03 │ claude-sonnet-4-5…│ 574 │ 10,057 │ 1,415 │ 53 │ 87 │ 78 │ 30 │ 8 │
479
+ │ 2025-10-03 │ gpt-5-codex │ 0 │ 1,323 │ 0 │ 75 │ 0 │ 20 │ 0 │ 0 │
480
+ │ │ TOTAL │ 1,475 │ 22,905 │ 1,468 │ 141 │ 113 │ 125 │ 40 │ 9 │
481
+ └────────────┴────────────────────┴────────────┴────────────┴────────────┴──────┴──────┴──────┴───────────┴───────┘
482
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
483
+ │ 📝 Total Lines: 25,848 | 🔧 Total Tools: 428 | 📅 Entries: 3 | 🧠 Memory: 8.2 MB │
484
+ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
485
+
486
+ Press 'q', 'Esc', or 'Ctrl+C' to quit
487
+ ```
488
+
489
+ **JSON Export** (with `--output`):
490
+
491
+ ```json
492
+ [
493
+ {
494
+ "date": "2025-10-02",
495
+ "model": "claude-sonnet-4-5-20250929",
496
+ "editLines": 901,
497
+ "readLines": 11525,
498
+ "writeLines": 53,
499
+ "bashCount": 13,
500
+ "editCount": 26,
501
+ "readCount": 27,
502
+ "todoWriteCount": 10,
503
+ "writeCount": 1
504
+ },
505
+ {
506
+ "date": "2025-10-03",
507
+ "model": "claude-sonnet-4-5-20250929",
508
+ "editLines": 574,
509
+ "readLines": 10057,
510
+ "writeLines": 1415,
511
+ "bashCount": 53,
512
+ "editCount": 87,
513
+ "readCount": 78,
514
+ "todoWriteCount": 30,
515
+ "writeCount": 8
516
+ }
517
+ ]
518
+ ```
519
+
520
+ ### 💡 Use Cases
521
+
522
+ **Single File Analysis**:
523
+
524
+ - **Usage Auditing**: Track what the AI did in each session
525
+ - **Cost Attribution**: Calculate costs per project or feature
526
+ - **Compliance**: Export detailed activity logs
527
+ - **Analysis**: Understand coding patterns and tool usage
528
+
529
+ **Batch Analysis**:
530
+
531
+ - **Productivity Tracking**: Monitor coding activity over time
532
+ - **Tool Usage Patterns**: Identify most-used tools across sessions
533
+ - **Model Comparison**: Compare efficiency between different AI models
534
+ - **Historical Analysis**: Track trends in code operations by date
535
+
536
+ ---
537
+
538
+ ## 🔧 Version Command
539
+
540
+ **Check your installation.**
541
+
542
+ ```bash
543
+ # Formatted output
544
+ vct version
545
+
546
+ # JSON format
547
+ vct version --json
548
+
549
+ # Plain text
550
+ vct version --text
551
+ ```
552
+
553
+ ### Output
554
+
555
+ ```
556
+ 🚀 Vibe Coding Tracker
557
+
558
+ ╔════════════════╦═════════╗
559
+ ║ Version ║ 0.1.0 ║
560
+ ╠════════════════╬═════════╣
561
+ ║ Rust Version ║ 1.89.0 ║
562
+ ╠════════════════╬═════════╣
563
+ ║ Cargo Version ║ 1.89.0 ║
564
+ ╚════════════════╩═════════╝
565
+ ```
566
+
567
+ ---
568
+
569
+ ## 🔄 Update Command
570
+
571
+ **Keep your installation up-to-date automatically.**
572
+
573
+ The update command checks GitHub releases and downloads the latest version for your platform.
574
+
575
+ ### Basic Usage
576
+
577
+ ```bash
578
+ # Interactive update with confirmation
579
+ vct update
580
+
581
+ # Check for updates without installing
582
+ vct update --check
583
+
584
+ # Force update without confirmation prompt
585
+ vct update --force
586
+ ```
587
+
588
+ ### How It Works
589
+
590
+ 1. **Check Latest Version**: Fetches the latest release from GitHub API
591
+ 2. **Compare Versions**: Compares current version with the latest available
592
+ 3. **Download Binary**: Downloads the appropriate binary for your platform (Linux/macOS/Windows)
593
+ 4. **Smart Replacement**:
594
+ - **Linux/macOS**: Automatically replaces the binary (backs up old version to `.old`)
595
+ - **Windows**: Downloads as `.new` and creates a batch script for safe replacement
596
+
597
+ ### Platform Support
598
+
599
+ The update command automatically detects your platform and downloads the correct archive:
600
+
601
+ - **Linux**: `vibe_coding_tracker-v{version}-linux-x64-gnu.tar.gz`, `vibe_coding_tracker-v{version}-linux-arm64-gnu.tar.gz`
602
+ - **macOS**: `vibe_coding_tracker-v{version}-macos-x64.tar.gz`, `vibe_coding_tracker-v{version}-macos-arm64.tar.gz`
603
+ - **Windows**: `vibe_coding_tracker-v{version}-windows-x64.zip`, `vibe_coding_tracker-v{version}-windows-arm64.zip`
604
+
605
+ ### Windows Update Process
606
+
607
+ On Windows, the binary cannot be replaced while running. The update command:
608
+
609
+ 1. Downloads the new version as `vct.new`
610
+ 2. Creates an update script (`update_vct.bat`)
611
+ 3. Displays instructions to complete the update
612
+
613
+ Run the batch script after closing the application to finish the update.
614
+
615
+ ---
616
+
617
+ ## 💡 Smart Pricing System
618
+
619
+ ### How It Works
620
+
621
+ 1. **Automatic Updates**: Fetches pricing from [LiteLLM](https://github.com/BerriAI/litellm) daily
622
+ 2. **Smart Caching**: Stores pricing in `~/.vibe_coding_tracker/` for 24 hours
623
+ 3. **Fuzzy Matching**: Finds best match even for custom model names
624
+ 4. **Always Accurate**: Ensures you get the latest pricing
625
+
626
+ ### Model Matching
627
+
628
+ **Priority Order**:
629
+
630
+ 1. ✅ **Exact Match**: `claude-sonnet-4` → `claude-sonnet-4`
631
+ 2. 🔄 **Normalized**: `claude-sonnet-4-20250514` → `claude-sonnet-4`
632
+ 3. 🔍 **Substring**: `custom-gpt-4` → `gpt-4`
633
+ 4. 🎯 **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)
634
+ 5. 💵 **Fallback**: Shows $0.00 if no match found
635
+
636
+ ### Cost Calculation
637
+
638
+ ```
639
+ Total Cost = (Input Tokens × Input Cost) +
640
+ (Output Tokens × Output Cost) +
641
+ (Cache Read × Cache Read Cost) +
642
+ (Cache Creation × Cache Creation Cost)
643
+ ```
644
+
645
+ ---
646
+
647
+ ## 🐳 Docker Support
648
+
649
+ ```bash
650
+ # Build image
651
+ docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
652
+
653
+ # Run with your sessions
654
+ docker run --rm \
655
+ -v ~/.claude:/root/.claude \
656
+ -v ~/.codex:/root/.codex \
657
+ -v ~/.gemini:/root/.gemini \
658
+ vibe_coding_tracker:latest usage
659
+ ```
660
+
661
+ ---
662
+
663
+ ## 🔍 Troubleshooting
664
+
665
+ ### Pricing Data Not Loading
666
+
667
+ ```bash
668
+ # Check cache
669
+ ls -la ~/.vibe_coding_tracker/
670
+
671
+ # Force refresh
672
+ rm -rf ~/.vibe_coding_tracker/
673
+ vct usage
674
+
675
+ # Debug mode
676
+ RUST_LOG=debug vct usage
677
+ ```
678
+
679
+ ### No Usage Data Shown
680
+
681
+ ```bash
682
+ # Verify session directories
683
+ ls -la ~/.claude/projects/
684
+ ls -la ~/.codex/sessions/
685
+ ls -la ~/.gemini/tmp/
686
+
687
+ # Count session files
688
+ find ~/.claude/projects -name "*.jsonl" | wc -l
689
+ find ~/.codex/sessions -name "*.jsonl" | wc -l
690
+ find ~/.gemini/tmp -name "*.json" | wc -l
691
+ ```
692
+
693
+ ### Analysis Command Fails
694
+
695
+ ```bash
696
+ # Validate JSONL format
697
+ jq empty < your-file.jsonl
698
+
699
+ # Check file permissions
700
+ ls -la your-file.jsonl
701
+
702
+ # Run with debug output
703
+ RUST_LOG=debug vct analysis --path your-file.jsonl
704
+ ```
705
+
706
+ ### Interactive Mode Issues
707
+
708
+ ```bash
709
+ # Reset terminal if broken
710
+ reset
711
+
712
+ # Check terminal type
713
+ echo $TERM # Should be xterm-256color or compatible
714
+
715
+ # Use static table as fallback
716
+ vct usage --table
717
+ ```
718
+
719
+ ---
720
+
721
+ ## ⚡ Performance
722
+
723
+ Built with Rust for **speed** and **reliability**:
724
+
725
+ | Operation | Time |
726
+ | ------------------- | ------ |
727
+ | Parse 10MB JSONL | ~320ms |
728
+ | Analyze 1000 events | ~45ms |
729
+ | Load cached pricing | ~2ms |
730
+ | Interactive refresh | ~30ms |
731
+
732
+ **Binary Size**: ~3-5 MB (stripped)
733
+
734
+ ---
735
+
736
+ ## 📚 Learn More
737
+
738
+ - **Developer Docs**: See [.github/copilot-instructions.md](.github/copilot-instructions.md)
739
+ - **Report Issues**: [GitHub Issues](https://github.com/Mai0313/VibeCodingTracker/issues)
740
+ - **Source Code**: [GitHub Repository](https://github.com/Mai0313/VibeCodingTracker)
741
+
742
+ ---
743
+
744
+ ## 🤝 Contributing
745
+
746
+ Contributions welcome! Here's how:
747
+
748
+ 1. Fork the repository
749
+ 2. Create your feature branch
750
+ 3. Make your changes
751
+ 4. Submit a pull request
752
+
753
+ For development setup and guidelines, see [.github/copilot-instructions.md](.github/copilot-instructions.md).
754
+
755
+ ---
756
+
757
+ ## 📄 License
758
+
759
+ MIT License - see [LICENSE](LICENSE) for details.
760
+
761
+ ---
762
+
763
+ ## 🙏 Credits
764
+
765
+ - [LiteLLM](https://github.com/BerriAI/litellm) for model pricing data
766
+ - Claude Code, Codex, and Gemini teams for creating amazing AI coding assistants
767
+ - The Rust community for excellent tooling
768
+
769
+ ---
770
+
771
+ <center>
772
+
773
+ **Save money. Track usage. Code smarter.**
774
+
775
+ [⭐ Star this project](https://github.com/Mai0313/VibeCodingTracker) if you find it useful!
776
+
777
+ Made with 🦀 Rust
778
+
779
+ </center>