vibe-coding-tracker 1.2.0__tar.gz → 1.3.1__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.
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/PKG-INFO +140 -53
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/README.md +139 -52
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/pyproject.toml +1 -1
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/linux-arm64-gnu/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/linux-x64-gnu/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/macos-arm64/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/macos-x64/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/windows-arm64/vibe_coding_tracker.exe +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/binaries/windows-x64/vibe_coding_tracker.exe +0 -0
- {vibe_coding_tracker-1.2.0 → vibe_coding_tracker-1.3.1}/src/vibe_coding_tracker/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: vibe-coding-tracker
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
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
|
[](https://crates.io/crates/vibe_coding_tracker)
|
|
34
32
|
[](https://crates.io/crates/vibe_coding_tracker)
|
|
35
33
|
[](https://www.npmjs.com/package/vibe-coding-tracker)
|
|
@@ -43,6 +41,8 @@ Description-Content-Type: text/markdown
|
|
|
43
41
|
[](https://github.com/Mai0313/VibeCodingTracker)
|
|
44
42
|
[](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
|
|
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** |
|
|
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
|
|
237
|
+
│ Model Input Output Cache Read Cache Write Total Cost (USD) │
|
|
235
238
|
│ │
|
|
236
|
-
│ gemini-3.1-pro-preview 129K 10.3K
|
|
237
|
-
│ claude-haiku-4-5-20251001 5.57K 19.8K
|
|
238
|
-
│ claude-opus-4-
|
|
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
|
|
244
|
+
│ Provider Tokens Cost │
|
|
242
245
|
│ │
|
|
243
|
-
│ Claude Code
|
|
244
|
-
│ Gemini
|
|
246
|
+
│ Claude Code 48.9M $78.93 │
|
|
247
|
+
│ Gemini 207K $0.40 │
|
|
245
248
|
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
246
249
|
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
247
|
-
│
|
|
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:
|
|
@@ -261,27 +309,28 @@ The tool automatically scans these directories:
|
|
|
261
309
|
|
|
262
310
|
### Live Quota Panels
|
|
263
311
|
|
|
264
|
-
`vct usage` shows **live remaining quota for Claude Code and
|
|
312
|
+
`vct usage` shows **live remaining quota for Claude Code, Codex, GitHub Copilot, and Cursor right in the dashboard — with zero setup.** No status-line hook, no config file: vct reads each provider's own credentials, calls its usage API on a background thread, and keeps the panels current while you work.
|
|
265
313
|
|
|
266
314
|
```
|
|
267
|
-
┌
|
|
268
|
-
│
|
|
269
|
-
│
|
|
270
|
-
│
|
|
271
|
-
│
|
|
272
|
-
│
|
|
273
|
-
|
|
274
|
-
└───────────────────────────┴────────────────────────────┴────────────────────────────┘
|
|
315
|
+
┌ Claude ─────────────────┐┌ Codex ──────────────────┐┌ Copilot ────────────────┐┌ Cursor ─────────────────┐
|
|
316
|
+
│ Plan: max 20x ││ Plan: plus ││ Plan: individual ││ Plan: free │
|
|
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 │
|
|
320
|
+
│ Balance: - $0.00 used ││ updated just now ││ ││ updated just now │
|
|
321
|
+
└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
|
|
275
322
|
```
|
|
276
323
|
|
|
277
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.
|
|
278
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)`).
|
|
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.
|
|
279
328
|
|
|
280
|
-
**Automatic token refresh.** For
|
|
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.
|
|
281
330
|
|
|
282
|
-
A panel appears only for a provider whose credentials are present. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
331
|
+
A panel appears only for a provider whose credentials are present. When four panels are shown the Provider Usage table folds out of the band, and at narrow widths the panels wrap to a 2×2 grid. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
283
332
|
|
|
284
|
-
> **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS.
|
|
333
|
+
> **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS. Cursor's `~/.config/cursor` credential path is Linux-oriented.
|
|
285
334
|
|
|
286
335
|
---
|
|
287
336
|
|
|
@@ -334,25 +383,58 @@ vct analysis --output today.json --daily
|
|
|
334
383
|
### Preview: Interactive Dashboard (`vct analysis`)
|
|
335
384
|
|
|
336
385
|
```
|
|
337
|
-
|
|
338
|
-
│ Model
|
|
339
|
-
│
|
|
340
|
-
│ claude-haiku-4-5-20251001
|
|
341
|
-
│ claude-opus-4-
|
|
342
|
-
│ gemini-3.1-pro-preview
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
│ Provider
|
|
346
|
-
│
|
|
347
|
-
│ Claude Code
|
|
348
|
-
│ Gemini
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
│
|
|
352
|
-
|
|
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
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
353
402
|
↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
|
|
354
403
|
```
|
|
355
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
|
+
|
|
356
438
|
---
|
|
357
439
|
|
|
358
440
|
## Update Command
|
|
@@ -377,9 +459,9 @@ vct update --force
|
|
|
377
459
|
### Preview (`vct update --check`)
|
|
378
460
|
|
|
379
461
|
```
|
|
380
|
-
Current version:
|
|
462
|
+
Current version: v1.3.0
|
|
381
463
|
Checking for latest release...
|
|
382
|
-
Latest version:
|
|
464
|
+
Latest version: v1.3.0 — you are up to date!
|
|
383
465
|
```
|
|
384
466
|
|
|
385
467
|
---
|
|
@@ -394,6 +476,14 @@ vct version --text # One-field-per-line, script-friendly
|
|
|
394
476
|
vct version --json # Machine-readable JSON
|
|
395
477
|
```
|
|
396
478
|
|
|
479
|
+
```text
|
|
480
|
+
┌───────────────┬──────────┐
|
|
481
|
+
│ Version ┆ 1.3.0 │
|
|
482
|
+
│ Rust Version ┆ 1.96.0 │
|
|
483
|
+
│ Cargo Version ┆ 1.96.0 │
|
|
484
|
+
└───────────────┴──────────┘
|
|
485
|
+
```
|
|
486
|
+
|
|
397
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.
|
|
398
488
|
|
|
399
489
|
---
|
|
@@ -417,6 +507,12 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
417
507
|
4. **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)
|
|
418
508
|
5. **Fallback**: Shows $0.00 if no match found
|
|
419
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
|
+
|
|
420
516
|
---
|
|
421
517
|
|
|
422
518
|
## Docker Support
|
|
@@ -424,13 +520,4 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
424
520
|
```bash
|
|
425
521
|
# Build image
|
|
426
522
|
docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
|
|
427
|
-
|
|
428
|
-
# Run with your sessions
|
|
429
|
-
docker run --rm \
|
|
430
|
-
-v ~/.claude:/root/.claude \
|
|
431
|
-
-v ~/.codex:/root/.codex \
|
|
432
|
-
-v ~/.copilot:/root/.copilot \
|
|
433
|
-
-v ~/.gemini:/root/.gemini \
|
|
434
|
-
-v ~/.local/share/opencode:/root/.local/share/opencode \
|
|
435
|
-
vibe_coding_tracker:latest usage
|
|
436
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
|
[](https://crates.io/crates/vibe_coding_tracker)
|
|
8
6
|
[](https://crates.io/crates/vibe_coding_tracker)
|
|
9
7
|
[](https://www.npmjs.com/package/vibe-coding-tracker)
|
|
@@ -17,6 +15,8 @@
|
|
|
17
15
|
[](https://github.com/Mai0313/VibeCodingTracker)
|
|
18
16
|
[](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
|
|
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** |
|
|
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
|
|
211
|
+
│ Model Input Output Cache Read Cache Write Total Cost (USD) │
|
|
209
212
|
│ │
|
|
210
|
-
│ gemini-3.1-pro-preview 129K 10.3K
|
|
211
|
-
│ claude-haiku-4-5-20251001 5.57K 19.8K
|
|
212
|
-
│ claude-opus-4-
|
|
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
|
|
218
|
+
│ Provider Tokens Cost │
|
|
216
219
|
│ │
|
|
217
|
-
│ Claude Code
|
|
218
|
-
│ Gemini
|
|
220
|
+
│ Claude Code 48.9M $78.93 │
|
|
221
|
+
│ Gemini 207K $0.40 │
|
|
219
222
|
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
220
223
|
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
221
|
-
│
|
|
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:
|
|
@@ -235,27 +283,28 @@ The tool automatically scans these directories:
|
|
|
235
283
|
|
|
236
284
|
### Live Quota Panels
|
|
237
285
|
|
|
238
|
-
`vct usage` shows **live remaining quota for Claude Code and
|
|
286
|
+
`vct usage` shows **live remaining quota for Claude Code, Codex, GitHub Copilot, and Cursor right in the dashboard — with zero setup.** No status-line hook, no config file: vct reads each provider's own credentials, calls its usage API on a background thread, and keeps the panels current while you work.
|
|
239
287
|
|
|
240
288
|
```
|
|
241
|
-
┌
|
|
242
|
-
│
|
|
243
|
-
│
|
|
244
|
-
│
|
|
245
|
-
│
|
|
246
|
-
│
|
|
247
|
-
|
|
248
|
-
└───────────────────────────┴────────────────────────────┴────────────────────────────┘
|
|
289
|
+
┌ Claude ─────────────────┐┌ Codex ──────────────────┐┌ Copilot ────────────────┐┌ Cursor ─────────────────┐
|
|
290
|
+
│ Plan: max 20x ││ Plan: plus ││ Plan: individual ││ Plan: free │
|
|
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 │
|
|
294
|
+
│ Balance: - $0.00 used ││ updated just now ││ ││ updated just now │
|
|
295
|
+
└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
|
|
249
296
|
```
|
|
250
297
|
|
|
251
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.
|
|
252
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)`).
|
|
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.
|
|
253
302
|
|
|
254
|
-
**Automatic token refresh.** For
|
|
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.
|
|
255
304
|
|
|
256
|
-
A panel appears only for a provider whose credentials are present. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
305
|
+
A panel appears only for a provider whose credentials are present. When four panels are shown the Provider Usage table folds out of the band, and at narrow widths the panels wrap to a 2×2 grid. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
257
306
|
|
|
258
|
-
> **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS.
|
|
307
|
+
> **Platform note:** on macOS, Claude Code stores its OAuth credentials in the system Keychain rather than `~/.claude/.credentials.json`, so the Claude panel is not shown on macOS. Cursor's `~/.config/cursor` credential path is Linux-oriented.
|
|
259
308
|
|
|
260
309
|
---
|
|
261
310
|
|
|
@@ -308,25 +357,58 @@ vct analysis --output today.json --daily
|
|
|
308
357
|
### Preview: Interactive Dashboard (`vct analysis`)
|
|
309
358
|
|
|
310
359
|
```
|
|
311
|
-
|
|
312
|
-
│ Model
|
|
313
|
-
│
|
|
314
|
-
│ claude-haiku-4-5-20251001
|
|
315
|
-
│ claude-opus-4-
|
|
316
|
-
│ gemini-3.1-pro-preview
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
│ Provider
|
|
320
|
-
│
|
|
321
|
-
│ Claude Code
|
|
322
|
-
│ Gemini
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
│
|
|
326
|
-
|
|
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
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
327
376
|
↑/↓ scroll PgUp/PgDn page g/G top/end r refresh q quit | ★ github.com/Mai0313/VibeCodingTracker
|
|
328
377
|
```
|
|
329
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
|
+
|
|
330
412
|
---
|
|
331
413
|
|
|
332
414
|
## Update Command
|
|
@@ -351,9 +433,9 @@ vct update --force
|
|
|
351
433
|
### Preview (`vct update --check`)
|
|
352
434
|
|
|
353
435
|
```
|
|
354
|
-
Current version:
|
|
436
|
+
Current version: v1.3.0
|
|
355
437
|
Checking for latest release...
|
|
356
|
-
Latest version:
|
|
438
|
+
Latest version: v1.3.0 — you are up to date!
|
|
357
439
|
```
|
|
358
440
|
|
|
359
441
|
---
|
|
@@ -368,6 +450,14 @@ vct version --text # One-field-per-line, script-friendly
|
|
|
368
450
|
vct version --json # Machine-readable JSON
|
|
369
451
|
```
|
|
370
452
|
|
|
453
|
+
```text
|
|
454
|
+
┌───────────────┬──────────┐
|
|
455
|
+
│ Version ┆ 1.3.0 │
|
|
456
|
+
│ Rust Version ┆ 1.96.0 │
|
|
457
|
+
│ Cargo Version ┆ 1.96.0 │
|
|
458
|
+
└───────────────┴──────────┘
|
|
459
|
+
```
|
|
460
|
+
|
|
371
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.
|
|
372
462
|
|
|
373
463
|
---
|
|
@@ -391,6 +481,12 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
391
481
|
4. **Fuzzy (AI-powered)**: Uses Jaro-Winkler similarity (70% threshold)
|
|
392
482
|
5. **Fallback**: Shows $0.00 if no match found
|
|
393
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
|
+
|
|
394
490
|
---
|
|
395
491
|
|
|
396
492
|
## Docker Support
|
|
@@ -398,13 +494,4 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
398
494
|
```bash
|
|
399
495
|
# Build image
|
|
400
496
|
docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
|
|
401
|
-
|
|
402
|
-
# Run with your sessions
|
|
403
|
-
docker run --rm \
|
|
404
|
-
-v ~/.claude:/root/.claude \
|
|
405
|
-
-v ~/.codex:/root/.codex \
|
|
406
|
-
-v ~/.copilot:/root/.copilot \
|
|
407
|
-
-v ~/.gemini:/root/.gemini \
|
|
408
|
-
-v ~/.local/share/opencode:/root/.local/share/opencode \
|
|
409
|
-
vibe_coding_tracker:latest usage
|
|
410
497
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "vibe_coding_tracker"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.1"
|
|
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" }
|
|
index 0a93841..b254eed 100755
|
|
|
Binary file
|
|
index 637af18..04ba14e 100755
|
|
|
Binary file
|
|
index cd81630..cc20eac 100755
|
|
|
Binary file
|
|
index 75d7639..9b21f80 100755
|
|
|
Binary file
|
|
index 8ef885f..adcb531 100644
|
|
|
Binary file
|
|
index d92ac25..a952e62 100644
|
|
|
Binary file
|
|
File without changes
|