vibe-coding-tracker 2.2.3__tar.gz → 2.3.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.
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/PKG-INFO +69 -64
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/README.md +68 -63
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/pyproject.toml +1 -1
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/linux-arm64-gnu/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/linux-x64-gnu/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/macos-arm64/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/macos-x64/vibe_coding_tracker +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/windows-arm64/vibe_coding_tracker.exe +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/src/vibe_coding_tracker/binaries/windows-x64/vibe_coding_tracker.exe +0 -0
- {vibe_coding_tracker-2.2.3 → vibe_coding_tracker-2.3.0}/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: 2.
|
|
3
|
+
Version: 2.3.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
|
|
@@ -94,7 +94,7 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
|
|
|
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
|
|
97
|
+
| **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, and Grok |
|
|
98
98
|
| **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, compact incremental scans — built with Rust |
|
|
99
99
|
| **Live Updates** | Responsive loading and background refreshes with change highlighting |
|
|
100
100
|
|
|
@@ -242,23 +242,24 @@ vct usage --table --merge-providers
|
|
|
242
242
|
### Preview: Interactive Dashboard (`vct usage`)
|
|
243
243
|
|
|
244
244
|
```
|
|
245
|
-
|
|
246
|
-
│
|
|
247
|
-
│
|
|
248
|
-
│
|
|
249
|
-
│
|
|
250
|
-
│
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
│
|
|
256
|
-
│
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
│
|
|
260
|
-
|
|
261
|
-
|
|
245
|
+
┌ Models · $79.33 · 49.1M tokens · 3 models ────────────────────────── −2 cols ┐┌ Providers ───────────────────────────┐
|
|
246
|
+
│Model Input Output Total Cost (USD) █│Provider Tokens Cost │
|
|
247
|
+
│ █│ │
|
|
248
|
+
│gemini-3.1-pro-preview 129K 10.3K 207K $0.40█│Claude 48.9M $78.93 │
|
|
249
|
+
│claude-haiku-4-5-20251001 5.57K 19.8K 5.28M $1.34█│Gemini 207K $0.40 │
|
|
250
|
+
│claude-opus-4-8 25.7K 179K 43.6M $77.59█│ │
|
|
251
|
+
│ █│ │
|
|
252
|
+
│ █│ │
|
|
253
|
+
└──────────────────────────────────────────────────────────────────────────────┘└──────────────────────────────────────┘
|
|
254
|
+
┌ Claude ──────────────┐┌ Codex ───────────────┐┌ Copilot ─────────────┐┌ Cursor ────────LIMIT ┐┌ Grok ────────────────┐
|
|
255
|
+
│max 20x just now││plus just now││individual just now││free just now││SuperGrok just now│
|
|
256
|
+
│5h ▰▱▱▱▱ 13% 1h42m││5h ▰▰▱▱▱ 33% 12m ││prem ▰▱▱▱▱ 3% 24d0h││total ▰▰▰▰▰ 94% 16d0h││week ▰▰▱▱▱ 38% 3d4h │
|
|
257
|
+
│7d ▰▰▰▱▱ 58% 1d23h││7d ▰▰▱▱▱ 36% 1h54m││reqs ▰▱▱▱▱ 45/1500 ││auto ▰▰▰▰▰ 100% 16d0h││ondmd $4.20/$50.00 │
|
|
258
|
+
│Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
|
|
259
|
+
│bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
|
|
260
|
+
└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
|
|
261
|
+
Total Cost: $79.33 | Total Tokens: 49.1M | Models: 3 | Memory: 4.7 MB | CPU: 0.0%
|
|
262
|
+
↑/↓ scroll m merge p hide Q quota r refresh q quit | Star on GitHub
|
|
262
263
|
```
|
|
263
264
|
|
|
264
265
|
Both interactive dashboards draw a centered `Loading sessions...` spinner as soon as terminal setup finishes. Loading stays responsive to `q`, Ctrl+C, and resize events. Later scans run in one background worker, keep the last successful data visible with a `Refreshing...` footer, and coalesce repeated refresh requests into at most one pending scan. A failed refresh keeps the last-known-good view and retries on the next scheduled or manual refresh.
|
|
@@ -324,33 +325,33 @@ The tool automatically scans these directories:
|
|
|
324
325
|
- `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
|
|
325
326
|
- `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
|
|
326
327
|
|
|
327
|
-
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`.
|
|
328
|
+
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`. For your actual billed allowance, see the Grok quota panel below.
|
|
328
329
|
|
|
329
330
|
For noninteractive `usage` and `analysis` scans, vct exits with an error when every discovered source fails. If only some sources fail, it keeps the successful results and prints one diagnostic summary to stderr. The TUI stays best-effort and preserves its last successful payload instead.
|
|
330
331
|
|
|
331
332
|
### Live Quota Panels
|
|
332
333
|
|
|
333
|
-
`vct usage` shows **live
|
|
334
|
+
`vct usage` shows **live quota usage for Claude Code, Codex, GitHub Copilot, Cursor, and Grok right in the dashboard — with zero setup.** No status-line hook, no credentials to enter: vct reads each provider's own credentials, calls its usage API on a background thread, and keeps the panels current while you work. Every gauge is percent **used**, so a full bar means the window is spent, not untouched. (Prefer a quieter dashboard? Trim `panels` under `[usage.quota]` in [`config.toml`](#configuration), or set it to `[]` to hide the quota cards entirely. The Provider Usage pane is local scan data, not a quota panel, so it keeps its own `p` toggle.)
|
|
334
335
|
|
|
335
336
|
```
|
|
336
|
-
┌ Claude
|
|
337
|
-
│
|
|
338
|
-
│
|
|
339
|
-
│
|
|
340
|
-
│
|
|
341
|
-
│
|
|
342
|
-
|
|
343
|
-
└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
|
|
337
|
+
┌ Claude ──────────────┐┌ Codex ───────────────┐┌ Copilot ─────────────┐┌ Cursor ────────LIMIT ┐┌ Grok ────────────────┐
|
|
338
|
+
│max 20x just now││plus just now││individual just now││free just now││SuperGrok just now│
|
|
339
|
+
│5h ▰▱▱▱▱ 13% 1h42m││5h ▰▰▱▱▱ 33% 12m ││prem ▰▱▱▱▱ 3% 24d0h││total ▰▰▰▰▰ 94% 16d0h││week ▰▰▱▱▱ 38% 3d4h │
|
|
340
|
+
│7d ▰▰▰▱▱ 58% 1d23h││7d ▰▰▱▱▱ 36% 1h54m││reqs ▰▱▱▱▱ 45/1500 ││auto ▰▰▰▰▰ 100% 16d0h││ondmd $4.20/$50.00 │
|
|
341
|
+
│Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
|
|
342
|
+
│bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
|
|
343
|
+
└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
|
|
344
344
|
```
|
|
345
345
|
|
|
346
346
|
- **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.
|
|
347
347
|
- **Codex** — plan tier, 5-hour and weekly usage, credit balance, and the earliest fetched available earned-reset expiry from the ChatGPT backend (`wham/usage` + `wham/rate-limit-reset-credits`) 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)`).
|
|
348
348
|
- **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.
|
|
349
349
|
- **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.
|
|
350
|
+
- **Grok** — plan tier plus your included-allowance usage for the current weekly or monthly period, from the Grok CLI's own billing endpoint (`GET /v1/billing?format=credits`), read from `~/.grok/auth.json`. A prepaid balance is shown only once it is non-zero, and pay-as-you-go spend once you have either spent something or set a cap. The request impersonates the Grok CLI; a `401` / `403` shows a `run: grok login` hint.
|
|
350
351
|
|
|
351
|
-
**Automatic token refresh.** For Claude and
|
|
352
|
+
**Automatic token refresh.** For Claude, Codex, and Grok, 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. Grok's token endpoint is resolved from its login issuer rather than hardcoded, the way its own CLI does it, and every other login in the file is preserved on write. 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.
|
|
352
353
|
|
|
353
|
-
A panel appears only for a provider whose credentials are present.
|
|
354
|
+
A panel appears only for a provider whose credentials are present. Panels are placed on a uniform grid that fits as many cards per row as the terminal allows and wraps the rest onto the next row, so a new provider costs a card and never a new layout rule. On a terminal too short to spend rows on the grid, it folds into a one-line digest showing the gauges that still fit and counting the rest; press `Q` for the full-detail overlay, where every card has room for every line whatever the terminal size, and `p` to toggle the Provider Usage side pane. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
354
355
|
|
|
355
356
|
> **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.
|
|
356
357
|
|
|
@@ -408,23 +409,22 @@ vct analysis --json --daily > today.json
|
|
|
408
409
|
### Preview: Interactive Dashboard (`vct analysis`)
|
|
409
410
|
|
|
410
411
|
```
|
|
411
|
-
|
|
412
|
-
│
|
|
413
|
-
│
|
|
414
|
-
│
|
|
415
|
-
│
|
|
416
|
-
│
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
│
|
|
421
|
-
│
|
|
422
|
-
│
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
↑/↓ scroll r refresh q quit | Star on GitHub
|
|
412
|
+
┌ Models · 135K lines · 1.80K tool calls · 3 models ───────────────────────────────────────────────────────────────────┐
|
|
413
|
+
│Model Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write █
|
|
414
|
+
│ █
|
|
415
|
+
│claude-opus-4-8 12.4K 88.1K 9.02K 412 231 604 96 88█
|
|
416
|
+
│gemini-3.1-pro-preview 2.10K 14.8K 1.62K 84 44 112 16 15█
|
|
417
|
+
│claude-haiku-4-5-20251001 840 5.40K 610 31 16 42 6 5█
|
|
418
|
+
│ █
|
|
419
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
420
|
+
┌ Providers ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
421
|
+
│Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days │
|
|
422
|
+
│ │
|
|
423
|
+
│Claude 13.2K 93.5K 9.63K 443 247 646 102 93 12 │
|
|
424
|
+
│Gemini 2.10K 14.8K 1.62K 84 44 112 16 15 3 │
|
|
425
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
426
|
+
Total Lines: 135K | Total Tools: 1.80K | Models: 3 | Memory: 4.8 MB | CPU: 0.0%
|
|
427
|
+
↑/↓ scroll r refresh q quit | Star on GitHub
|
|
428
428
|
```
|
|
429
429
|
|
|
430
430
|
### Preview: Table & JSON (`vct analysis`)
|
|
@@ -539,7 +539,7 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
539
539
|
|
|
540
540
|
**Print a provider's raw quota/usage API response — no parsing, no aggregation.**
|
|
541
541
|
|
|
542
|
-
Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent`).
|
|
542
|
+
Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor / Grok) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent` / `grok`).
|
|
543
543
|
|
|
544
544
|
> The previous name `vct fetch` is kept as a hidden alias, so existing scripts keep working.
|
|
545
545
|
|
|
@@ -560,6 +560,7 @@ vct quota claude
|
|
|
560
560
|
vct quota codex
|
|
561
561
|
vct quota copilot
|
|
562
562
|
vct quota cursor
|
|
563
|
+
vct quota grok
|
|
563
564
|
|
|
564
565
|
# Flattened plain text
|
|
565
566
|
vct quota codex --text
|
|
@@ -575,7 +576,7 @@ vct quota copilot --table
|
|
|
575
576
|
|
|
576
577
|
## Configuration
|
|
577
578
|
|
|
578
|
-
vct keeps its user settings in `~/.vct/config.toml`. The file is **created with defaults on first run**, so you never have to write it by hand — edit it only when you want to change a default. It is generated from vct's typed settings and carries a `#:schema` directive on the first line, so a schema-aware TOML editor (taplo / VS Code "Even Better TOML") gives you autocomplete and validation. Print the schema yourself with `vct config schema`. A file written by an older vct is upgraded to the current layout in place the next time vct reads it (or on demand with `vct config migrate`), so an upgrade never leaves you on a stale format.
|
|
579
|
+
vct keeps its user settings in `~/.vct/config.toml`. The file is **created with defaults on first run**, so you never have to write it by hand — edit it only when you want to change a default. It is generated from vct's typed settings and carries a `#:schema` directive on the first line, so a schema-aware TOML editor (taplo / VS Code "Even Better TOML") gives you autocomplete and validation. Print the schema yourself with `vct config schema`. A file written by an older vct is upgraded to the current layout in place the next time vct reads it (or on demand with `vct config migrate`), so an upgrade never leaves you on a stale format. That upgrade also adds a quota panel released after your file was written — once. Remove the name again and it stays removed, and a panel you had already dropped is never brought back.
|
|
579
580
|
|
|
580
581
|
```toml
|
|
581
582
|
#:schema https://raw.githubusercontent.com/Mai0313/VibeCodingTracker/main/vct.schema.json
|
|
@@ -584,6 +585,9 @@ vct keeps its user settings in `~/.vct/config.toml`. The file is **created with
|
|
|
584
585
|
# Default time range when no --daily/--weekly/--monthly/--all flag is given.
|
|
585
586
|
# One of: "daily" | "weekly" | "monthly" | "all".
|
|
586
587
|
default_time_range = "all"
|
|
588
|
+
# Layout version of this file, stamped by vct. Only the upgrade pass reads it;
|
|
589
|
+
# leave it alone unless you want a past upgrade to run again.
|
|
590
|
+
version = 2
|
|
587
591
|
|
|
588
592
|
[usage]
|
|
589
593
|
# Start the usage dashboard with models merged across provider prefixes.
|
|
@@ -594,8 +598,8 @@ refresh_interval = 10
|
|
|
594
598
|
|
|
595
599
|
[usage.quota]
|
|
596
600
|
# Which live quota panels to show. Remove a name to hide that panel; use an
|
|
597
|
-
# empty list ([]) to hide
|
|
598
|
-
panels = ["claude", "codex", "copilot", "cursor"]
|
|
601
|
+
# empty list ([]) to hide them all.
|
|
602
|
+
panels = ["claude", "codex", "copilot", "cursor", "grok"]
|
|
599
603
|
# Seconds between live quota-panel polls, shared by every provider (minimum 1).
|
|
600
604
|
refresh_interval = 60
|
|
601
605
|
|
|
@@ -628,18 +632,19 @@ level = "warn"
|
|
|
628
632
|
retention_days = 7
|
|
629
633
|
```
|
|
630
634
|
|
|
631
|
-
| Setting | Effect
|
|
632
|
-
| ------------------------------ |
|
|
633
|
-
| `general.default_time_range` | Period used when you pass no `--daily/--weekly/--monthly/--all`. An explicit flag always wins.
|
|
634
|
-
| `
|
|
635
|
-
| `usage.
|
|
636
|
-
| `usage.
|
|
637
|
-
| `usage.quota.
|
|
638
|
-
| `
|
|
639
|
-
| `
|
|
640
|
-
| `
|
|
641
|
-
| `
|
|
642
|
-
| `logging.
|
|
635
|
+
| Setting | Effect |
|
|
636
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
637
|
+
| `general.default_time_range` | Period used when you pass no `--daily/--weekly/--monthly/--all`. An explicit flag always wins. |
|
|
638
|
+
| `general.version` | Layout version vct stamps on the file, so a panel added by a later release is offered to you exactly once. |
|
|
639
|
+
| `usage.merge_models` | Seeds the dashboard merged; the `m` toggle saves your last choice back here. `--merge-providers` forces on. |
|
|
640
|
+
| `usage.refresh_interval` | Redraw cadence of the `usage` dashboard (seconds). |
|
|
641
|
+
| `usage.quota.panels` | Which quota panels to show (`claude` / `codex` / `copilot` / `cursor` / `grok`); drop a name to hide it, `[]` to hide them all. |
|
|
642
|
+
| `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
|
|
643
|
+
| `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
|
|
644
|
+
| `performance.scan_threads` | CLI scan workers. `0` uses `RAYON_NUM_THREADS` when positive, otherwise at most two workers; every value is CPU-capped. |
|
|
645
|
+
| `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
|
|
646
|
+
| `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
|
|
647
|
+
| `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
|
|
643
648
|
|
|
644
649
|
> [!NOTE]
|
|
645
650
|
> 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.
|
|
@@ -68,7 +68,7 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
|
|
|
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
|
|
71
|
+
| **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, and Grok |
|
|
72
72
|
| **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, compact incremental scans — built with Rust |
|
|
73
73
|
| **Live Updates** | Responsive loading and background refreshes with change highlighting |
|
|
74
74
|
|
|
@@ -216,23 +216,24 @@ vct usage --table --merge-providers
|
|
|
216
216
|
### Preview: Interactive Dashboard (`vct usage`)
|
|
217
217
|
|
|
218
218
|
```
|
|
219
|
-
|
|
220
|
-
│
|
|
221
|
-
│
|
|
222
|
-
│
|
|
223
|
-
│
|
|
224
|
-
│
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
│
|
|
230
|
-
│
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
│
|
|
234
|
-
|
|
235
|
-
|
|
219
|
+
┌ Models · $79.33 · 49.1M tokens · 3 models ────────────────────────── −2 cols ┐┌ Providers ───────────────────────────┐
|
|
220
|
+
│Model Input Output Total Cost (USD) █│Provider Tokens Cost │
|
|
221
|
+
│ █│ │
|
|
222
|
+
│gemini-3.1-pro-preview 129K 10.3K 207K $0.40█│Claude 48.9M $78.93 │
|
|
223
|
+
│claude-haiku-4-5-20251001 5.57K 19.8K 5.28M $1.34█│Gemini 207K $0.40 │
|
|
224
|
+
│claude-opus-4-8 25.7K 179K 43.6M $77.59█│ │
|
|
225
|
+
│ █│ │
|
|
226
|
+
│ █│ │
|
|
227
|
+
└──────────────────────────────────────────────────────────────────────────────┘└──────────────────────────────────────┘
|
|
228
|
+
┌ Claude ──────────────┐┌ Codex ───────────────┐┌ Copilot ─────────────┐┌ Cursor ────────LIMIT ┐┌ Grok ────────────────┐
|
|
229
|
+
│max 20x just now││plus just now││individual just now││free just now││SuperGrok just now│
|
|
230
|
+
│5h ▰▱▱▱▱ 13% 1h42m││5h ▰▰▱▱▱ 33% 12m ││prem ▰▱▱▱▱ 3% 24d0h││total ▰▰▰▰▰ 94% 16d0h││week ▰▰▱▱▱ 38% 3d4h │
|
|
231
|
+
│7d ▰▰▰▱▱ 58% 1d23h││7d ▰▰▱▱▱ 36% 1h54m││reqs ▰▱▱▱▱ 45/1500 ││auto ▰▰▰▰▰ 100% 16d0h││ondmd $4.20/$50.00 │
|
|
232
|
+
│Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
|
|
233
|
+
│bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
|
|
234
|
+
└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
|
|
235
|
+
Total Cost: $79.33 | Total Tokens: 49.1M | Models: 3 | Memory: 4.7 MB | CPU: 0.0%
|
|
236
|
+
↑/↓ scroll m merge p hide Q quota r refresh q quit | Star on GitHub
|
|
236
237
|
```
|
|
237
238
|
|
|
238
239
|
Both interactive dashboards draw a centered `Loading sessions...` spinner as soon as terminal setup finishes. Loading stays responsive to `q`, Ctrl+C, and resize events. Later scans run in one background worker, keep the last successful data visible with a `Refreshing...` footer, and coalesce repeated refresh requests into at most one pending scan. A failed refresh keeps the last-known-good view and retries on the next scheduled or manual refresh.
|
|
@@ -298,33 +299,33 @@ The tool automatically scans these directories:
|
|
|
298
299
|
- `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
|
|
299
300
|
- `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
|
|
300
301
|
|
|
301
|
-
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`.
|
|
302
|
+
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`. For your actual billed allowance, see the Grok quota panel below.
|
|
302
303
|
|
|
303
304
|
For noninteractive `usage` and `analysis` scans, vct exits with an error when every discovered source fails. If only some sources fail, it keeps the successful results and prints one diagnostic summary to stderr. The TUI stays best-effort and preserves its last successful payload instead.
|
|
304
305
|
|
|
305
306
|
### Live Quota Panels
|
|
306
307
|
|
|
307
|
-
`vct usage` shows **live
|
|
308
|
+
`vct usage` shows **live quota usage for Claude Code, Codex, GitHub Copilot, Cursor, and Grok right in the dashboard — with zero setup.** No status-line hook, no credentials to enter: vct reads each provider's own credentials, calls its usage API on a background thread, and keeps the panels current while you work. Every gauge is percent **used**, so a full bar means the window is spent, not untouched. (Prefer a quieter dashboard? Trim `panels` under `[usage.quota]` in [`config.toml`](#configuration), or set it to `[]` to hide the quota cards entirely. The Provider Usage pane is local scan data, not a quota panel, so it keeps its own `p` toggle.)
|
|
308
309
|
|
|
309
310
|
```
|
|
310
|
-
┌ Claude
|
|
311
|
-
│
|
|
312
|
-
│
|
|
313
|
-
│
|
|
314
|
-
│
|
|
315
|
-
│
|
|
316
|
-
|
|
317
|
-
└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘└─────────────────────────┘
|
|
311
|
+
┌ Claude ──────────────┐┌ Codex ───────────────┐┌ Copilot ─────────────┐┌ Cursor ────────LIMIT ┐┌ Grok ────────────────┐
|
|
312
|
+
│max 20x just now││plus just now││individual just now││free just now││SuperGrok just now│
|
|
313
|
+
│5h ▰▱▱▱▱ 13% 1h42m││5h ▰▰▱▱▱ 33% 12m ││prem ▰▱▱▱▱ 3% 24d0h││total ▰▰▰▰▰ 94% 16d0h││week ▰▰▱▱▱ 38% 3d4h │
|
|
314
|
+
│7d ▰▰▰▱▱ 58% 1d23h││7d ▰▰▱▱▱ 36% 1h54m││reqs ▰▱▱▱▱ 45/1500 ││auto ▰▰▰▰▰ 100% 16d0h││ondmd $4.20/$50.00 │
|
|
315
|
+
│Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
|
|
316
|
+
│bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
|
|
317
|
+
└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
|
|
318
318
|
```
|
|
319
319
|
|
|
320
320
|
- **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.
|
|
321
321
|
- **Codex** — plan tier, 5-hour and weekly usage, credit balance, and the earliest fetched available earned-reset expiry from the ChatGPT backend (`wham/usage` + `wham/rate-limit-reset-credits`) 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)`).
|
|
322
322
|
- **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.
|
|
323
323
|
- **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.
|
|
324
|
+
- **Grok** — plan tier plus your included-allowance usage for the current weekly or monthly period, from the Grok CLI's own billing endpoint (`GET /v1/billing?format=credits`), read from `~/.grok/auth.json`. A prepaid balance is shown only once it is non-zero, and pay-as-you-go spend once you have either spent something or set a cap. The request impersonates the Grok CLI; a `401` / `403` shows a `run: grok login` hint.
|
|
324
325
|
|
|
325
|
-
**Automatic token refresh.** For Claude and
|
|
326
|
+
**Automatic token refresh.** For Claude, Codex, and Grok, 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. Grok's token endpoint is resolved from its login issuer rather than hardcoded, the way its own CLI does it, and every other login in the file is preserved on write. 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.
|
|
326
327
|
|
|
327
|
-
A panel appears only for a provider whose credentials are present.
|
|
328
|
+
A panel appears only for a provider whose credentials are present. Panels are placed on a uniform grid that fits as many cards per row as the terminal allows and wraps the rest onto the next row, so a new provider costs a card and never a new layout rule. On a terminal too short to spend rows on the grid, it folds into a one-line digest showing the gauges that still fit and counting the rest; press `Q` for the full-detail overlay, where every card has room for every line whatever the terminal size, and `p` to toggle the Provider Usage side pane. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
328
329
|
|
|
329
330
|
> **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.
|
|
330
331
|
|
|
@@ -382,23 +383,22 @@ vct analysis --json --daily > today.json
|
|
|
382
383
|
### Preview: Interactive Dashboard (`vct analysis`)
|
|
383
384
|
|
|
384
385
|
```
|
|
385
|
-
|
|
386
|
-
│
|
|
387
|
-
│
|
|
388
|
-
│
|
|
389
|
-
│
|
|
390
|
-
│
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
│
|
|
395
|
-
│
|
|
396
|
-
│
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
↑/↓ scroll r refresh q quit | Star on GitHub
|
|
386
|
+
┌ Models · 135K lines · 1.80K tool calls · 3 models ───────────────────────────────────────────────────────────────────┐
|
|
387
|
+
│Model Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write █
|
|
388
|
+
│ █
|
|
389
|
+
│claude-opus-4-8 12.4K 88.1K 9.02K 412 231 604 96 88█
|
|
390
|
+
│gemini-3.1-pro-preview 2.10K 14.8K 1.62K 84 44 112 16 15█
|
|
391
|
+
│claude-haiku-4-5-20251001 840 5.40K 610 31 16 42 6 5█
|
|
392
|
+
│ █
|
|
393
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
394
|
+
┌ Providers ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
395
|
+
│Provider Edit Lines Read Lines Write Lines Bash Edit Read TodoWrite Write Days │
|
|
396
|
+
│ │
|
|
397
|
+
│Claude 13.2K 93.5K 9.63K 443 247 646 102 93 12 │
|
|
398
|
+
│Gemini 2.10K 14.8K 1.62K 84 44 112 16 15 3 │
|
|
399
|
+
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
400
|
+
Total Lines: 135K | Total Tools: 1.80K | Models: 3 | Memory: 4.8 MB | CPU: 0.0%
|
|
401
|
+
↑/↓ scroll r refresh q quit | Star on GitHub
|
|
402
402
|
```
|
|
403
403
|
|
|
404
404
|
### Preview: Table & JSON (`vct analysis`)
|
|
@@ -513,7 +513,7 @@ The binary version is produced at build time by `build.rs` from `git describe`,
|
|
|
513
513
|
|
|
514
514
|
**Print a provider's raw quota/usage API response — no parsing, no aggregation.**
|
|
515
515
|
|
|
516
|
-
Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent`).
|
|
516
|
+
Calls the same quota endpoint the `usage` dashboard uses (Claude / Codex / Copilot / Cursor / Grok) exactly once and prints the raw body, so you can inspect the exact API shape or sanity-check your credentials. It reads each provider's stored credentials and does **not** refresh tokens: if a token is expired, re-auth with that provider's own CLI (`claude` / `codex` / `copilot` / `cursor-agent` / `grok`).
|
|
517
517
|
|
|
518
518
|
> The previous name `vct fetch` is kept as a hidden alias, so existing scripts keep working.
|
|
519
519
|
|
|
@@ -534,6 +534,7 @@ vct quota claude
|
|
|
534
534
|
vct quota codex
|
|
535
535
|
vct quota copilot
|
|
536
536
|
vct quota cursor
|
|
537
|
+
vct quota grok
|
|
537
538
|
|
|
538
539
|
# Flattened plain text
|
|
539
540
|
vct quota codex --text
|
|
@@ -549,7 +550,7 @@ vct quota copilot --table
|
|
|
549
550
|
|
|
550
551
|
## Configuration
|
|
551
552
|
|
|
552
|
-
vct keeps its user settings in `~/.vct/config.toml`. The file is **created with defaults on first run**, so you never have to write it by hand — edit it only when you want to change a default. It is generated from vct's typed settings and carries a `#:schema` directive on the first line, so a schema-aware TOML editor (taplo / VS Code "Even Better TOML") gives you autocomplete and validation. Print the schema yourself with `vct config schema`. A file written by an older vct is upgraded to the current layout in place the next time vct reads it (or on demand with `vct config migrate`), so an upgrade never leaves you on a stale format.
|
|
553
|
+
vct keeps its user settings in `~/.vct/config.toml`. The file is **created with defaults on first run**, so you never have to write it by hand — edit it only when you want to change a default. It is generated from vct's typed settings and carries a `#:schema` directive on the first line, so a schema-aware TOML editor (taplo / VS Code "Even Better TOML") gives you autocomplete and validation. Print the schema yourself with `vct config schema`. A file written by an older vct is upgraded to the current layout in place the next time vct reads it (or on demand with `vct config migrate`), so an upgrade never leaves you on a stale format. That upgrade also adds a quota panel released after your file was written — once. Remove the name again and it stays removed, and a panel you had already dropped is never brought back.
|
|
553
554
|
|
|
554
555
|
```toml
|
|
555
556
|
#:schema https://raw.githubusercontent.com/Mai0313/VibeCodingTracker/main/vct.schema.json
|
|
@@ -558,6 +559,9 @@ vct keeps its user settings in `~/.vct/config.toml`. The file is **created with
|
|
|
558
559
|
# Default time range when no --daily/--weekly/--monthly/--all flag is given.
|
|
559
560
|
# One of: "daily" | "weekly" | "monthly" | "all".
|
|
560
561
|
default_time_range = "all"
|
|
562
|
+
# Layout version of this file, stamped by vct. Only the upgrade pass reads it;
|
|
563
|
+
# leave it alone unless you want a past upgrade to run again.
|
|
564
|
+
version = 2
|
|
561
565
|
|
|
562
566
|
[usage]
|
|
563
567
|
# Start the usage dashboard with models merged across provider prefixes.
|
|
@@ -568,8 +572,8 @@ refresh_interval = 10
|
|
|
568
572
|
|
|
569
573
|
[usage.quota]
|
|
570
574
|
# Which live quota panels to show. Remove a name to hide that panel; use an
|
|
571
|
-
# empty list ([]) to hide
|
|
572
|
-
panels = ["claude", "codex", "copilot", "cursor"]
|
|
575
|
+
# empty list ([]) to hide them all.
|
|
576
|
+
panels = ["claude", "codex", "copilot", "cursor", "grok"]
|
|
573
577
|
# Seconds between live quota-panel polls, shared by every provider (minimum 1).
|
|
574
578
|
refresh_interval = 60
|
|
575
579
|
|
|
@@ -602,18 +606,19 @@ level = "warn"
|
|
|
602
606
|
retention_days = 7
|
|
603
607
|
```
|
|
604
608
|
|
|
605
|
-
| Setting | Effect
|
|
606
|
-
| ------------------------------ |
|
|
607
|
-
| `general.default_time_range` | Period used when you pass no `--daily/--weekly/--monthly/--all`. An explicit flag always wins.
|
|
608
|
-
| `
|
|
609
|
-
| `usage.
|
|
610
|
-
| `usage.
|
|
611
|
-
| `usage.quota.
|
|
612
|
-
| `
|
|
613
|
-
| `
|
|
614
|
-
| `
|
|
615
|
-
| `
|
|
616
|
-
| `logging.
|
|
609
|
+
| Setting | Effect |
|
|
610
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
611
|
+
| `general.default_time_range` | Period used when you pass no `--daily/--weekly/--monthly/--all`. An explicit flag always wins. |
|
|
612
|
+
| `general.version` | Layout version vct stamps on the file, so a panel added by a later release is offered to you exactly once. |
|
|
613
|
+
| `usage.merge_models` | Seeds the dashboard merged; the `m` toggle saves your last choice back here. `--merge-providers` forces on. |
|
|
614
|
+
| `usage.refresh_interval` | Redraw cadence of the `usage` dashboard (seconds). |
|
|
615
|
+
| `usage.quota.panels` | Which quota panels to show (`claude` / `codex` / `copilot` / `cursor` / `grok`); drop a name to hide it, `[]` to hide them all. |
|
|
616
|
+
| `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
|
|
617
|
+
| `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
|
|
618
|
+
| `performance.scan_threads` | CLI scan workers. `0` uses `RAYON_NUM_THREADS` when positive, otherwise at most two workers; every value is CPU-capped. |
|
|
619
|
+
| `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
|
|
620
|
+
| `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
|
|
621
|
+
| `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
|
|
617
622
|
|
|
618
623
|
> [!NOTE]
|
|
619
624
|
> 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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "vibe_coding_tracker"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.3.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" }
|
|
index fb6b02d..5bd8421 100755
|
|
|
Binary file
|
|
index eeb7178..07bd87e 100755
|
|
|
Binary file
|
|
index 567e955..7c02775 100755
|
|
|
Binary file
|
|
index acf50b6..55f516e 100755
|
|
|
Binary file
|
|
index 7a93fec..0c295c6 100644
|
|
|
Binary file
|
|
index a6fa465..3d4c7c6 100644
|
|
|
Binary file
|
|
File without changes
|