@mai0313/vct 2.7.0 → 2.8.0
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.
- package/README.md +51 -172
- package/README.zh-CN.md +53 -173
- package/README.zh-TW.md +53 -173
- package/binaries/linux-arm64-gnu/vibe_coding_tracker +0 -0
- package/binaries/linux-x64-gnu/vibe_coding_tracker +0 -0
- package/binaries/macos-arm64/vibe_coding_tracker +0 -0
- package/binaries/macos-x64/vibe_coding_tracker +0 -0
- package/binaries/windows-arm64/vibe_coding_tracker.exe +0 -0
- package/binaries/windows-x64/vibe_coding_tracker.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,24 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Vibe Coding Tracker — AI Coding Assistant Usage Tracker
|
|
4
4
|
|
|
5
|
-
[](https://crates.io/crates/vct-cli)
|
|
6
|
-
[](https://crates.io/crates/vct-cli)
|
|
7
|
-
[](https://www.npmjs.com/package/vibe-coding-tracker)
|
|
8
|
-
[](https://www.npmjs.com/package/vibe-coding-tracker)
|
|
9
|
-
[](https://pypi.org/project/vibe_coding_tracker/)
|
|
10
|
-
[](https://pypi.org/project/vibe-coding-tracker)
|
|
11
|
-
[](https://www.rust-lang.org/)
|
|
12
|
-
[](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/test.yml)
|
|
13
|
-
[](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/code-quality-check.yml)
|
|
14
|
-
[](https://github.com/Mai0313/VibeCodingTracker/tree/main?tab=License-1-ov-file)
|
|
15
|
-
[](https://github.com/Mai0313/VibeCodingTracker)
|
|
16
|
-
[](https://github.com/Mai0313/VibeCodingTracker/pulls)
|
|
5
|
+
[](https://crates.io/crates/vct-cli) [](https://crates.io/crates/vct-cli) [](https://www.npmjs.com/package/vibe-coding-tracker) [](https://www.npmjs.com/package/vibe-coding-tracker) [](https://pypi.org/project/vibe_coding_tracker/) [](https://pypi.org/project/vibe-coding-tracker) [](https://www.rust-lang.org/) [](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/test.yml) [](https://github.com/Mai0313/VibeCodingTracker/actions/workflows/code-quality-check.yml) [](https://github.com/Mai0313/VibeCodingTracker/tree/main?tab=License-1-ov-file) [](https://github.com/Mai0313/VibeCodingTracker) [](https://github.com/Mai0313/VibeCodingTracker/pulls)
|
|
17
6
|
|
|
18
7
|
<img src="assets/social-preview.png" alt="Vibe Coding Tracker social preview" width="640">
|
|
19
8
|
|
|
20
9
|
</div>
|
|
21
10
|
|
|
22
|
-
**Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok,
|
|
11
|
+
**Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, DeepSeek Harness, and Antigravity usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
|
|
23
12
|
|
|
24
13
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
|
|
25
14
|
|
|
@@ -35,7 +24,7 @@ Stop wondering how much your AI coding sessions cost. Get **real-time cost track
|
|
|
35
24
|
|
|
36
25
|
### Ultra-Lightweight
|
|
37
26
|
|
|
38
|
-
Built with Rust for minimal resource footprint. The interactive TUI dashboard typically sits at **around 60 MB of resident memory** once the first refresh is done, even with thousands of sessions on disk — no Electron, no bloated runtimes. A persistent per-session ledger under `~/.vct/sessions/` means only new or changed sources are ever parsed again, even across runs
|
|
27
|
+
Built with Rust for minimal resource footprint. The interactive TUI dashboard typically sits at **around 60 MB of resident memory** once the first refresh is done, even with thousands of sessions on disk — no Electron, no bloated runtimes. A persistent per-session ledger under `~/.vct/sessions/` means only new or changed sources are ever parsed again, even across runs.
|
|
39
28
|
|
|
40
29
|
### Beautiful Visualizations
|
|
41
30
|
|
|
@@ -48,7 +37,7 @@ Choose your preferred view:
|
|
|
48
37
|
|
|
49
38
|
### Zero Configuration
|
|
50
39
|
|
|
51
|
-
Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok,
|
|
40
|
+
Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, DeepSeek Harness, and Antigravity. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
|
|
52
41
|
|
|
53
42
|
### Rich Insights
|
|
54
43
|
|
|
@@ -62,15 +51,15 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
|
|
|
62
51
|
|
|
63
52
|
## Key Features
|
|
64
53
|
|
|
65
|
-
| Feature | Description
|
|
66
|
-
| --------------------- |
|
|
67
|
-
| **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok,
|
|
68
|
-
| **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM
|
|
69
|
-
| **4 Display Modes** | Interactive TUI, static table, plain text, and JSON
|
|
70
|
-
| **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`)
|
|
71
|
-
| **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, and
|
|
72
|
-
| **Ultra-Lightweight** |
|
|
73
|
-
| **Live Updates** | Responsive loading and background refreshes with change highlighting
|
|
54
|
+
| Feature | Description |
|
|
55
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
56
|
+
| **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, Hermes, Grok, DeepSeek Harness, and Antigravity |
|
|
57
|
+
| **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
|
|
58
|
+
| **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
|
|
59
|
+
| **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
|
|
60
|
+
| **Live Quota Panels** | Live quota usage for Claude, Codex, Copilot, Cursor, Grok, and Antigravity |
|
|
61
|
+
| **Ultra-Lightweight** | Around 60 MB RSS in the TUI, compact incremental scans — built with Rust |
|
|
62
|
+
| **Live Updates** | Responsive loading and background refreshes with change highlighting |
|
|
74
63
|
|
|
75
64
|
---
|
|
76
65
|
|
|
@@ -80,8 +69,6 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
|
|
|
80
69
|
|
|
81
70
|
Choose the installation method that works best for you:
|
|
82
71
|
|
|
83
|
-
> **Developers**: If you want to build from source or contribute to development, please see [CONTRIBUTING.md](.github/CONTRIBUTING.md).
|
|
84
|
-
|
|
85
72
|
#### Method 1: Install from npm
|
|
86
73
|
|
|
87
74
|
**Prerequisites**: [Node.js](https://nodejs.org/) v22 or higher
|
|
@@ -137,21 +124,7 @@ vct analysis
|
|
|
137
124
|
|
|
138
125
|
## Command Guide
|
|
139
126
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
vct <COMMAND> [OPTIONS]
|
|
144
|
-
# Replace with `vibe_coding_tracker` if you are using the full binary name
|
|
145
|
-
|
|
146
|
-
Commands:
|
|
147
|
-
analysis Analyze local session data (single file or all sessions)
|
|
148
|
-
usage Display token usage statistics
|
|
149
|
-
version Display version information
|
|
150
|
-
update Update to the latest version from GitHub releases
|
|
151
|
-
quota Fetch a provider's raw quota/usage API response
|
|
152
|
-
config Show or edit the persistent settings file (~/.vct/config.toml)
|
|
153
|
-
help Print this message or the help of the given subcommand(s)
|
|
154
|
-
```
|
|
127
|
+
Run `vct --help` to list the commands, and `vct <command> --help` for a command's flags.
|
|
155
128
|
|
|
156
129
|
Time range flags (shared by `usage` and `analysis`, mutually exclusive, default `--all`):
|
|
157
130
|
|
|
@@ -168,17 +141,6 @@ Time range flags (shared by `usage` and `analysis`, mutually exclusive, default
|
|
|
168
141
|
|
|
169
142
|
**Track your spending across all AI coding sessions.**
|
|
170
143
|
|
|
171
|
-
### Flags
|
|
172
|
-
|
|
173
|
-
| Flag | Purpose |
|
|
174
|
-
| ---------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
175
|
-
| *(none)* | Interactive TUI dashboard (default) |
|
|
176
|
-
| `--table` | Static table, no TUI |
|
|
177
|
-
| `--text` | Plain text, script-friendly |
|
|
178
|
-
| `--json` | JSON with enriched pricing metadata |
|
|
179
|
-
| `--merge-providers` | Merge models sharing a base name across provider prefixes (ignored for `--json`) |
|
|
180
|
-
| `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter (see table above) |
|
|
181
|
-
|
|
182
144
|
### Basic Usage
|
|
183
145
|
|
|
184
146
|
```bash
|
|
@@ -191,7 +153,7 @@ vct usage --table
|
|
|
191
153
|
# Plain text for scripts
|
|
192
154
|
vct usage --text
|
|
193
155
|
|
|
194
|
-
# JSON for data processing (
|
|
156
|
+
# JSON for data processing (every row has cost_usd; matched_model only when priced under another model name)
|
|
195
157
|
vct usage --json
|
|
196
158
|
|
|
197
159
|
# Save enriched JSON with shell redirection
|
|
@@ -208,7 +170,7 @@ vct usage --table --merge-providers
|
|
|
208
170
|
```
|
|
209
171
|
|
|
210
172
|
> [!NOTE]
|
|
211
|
-
> Model rows are sorted by cost in ascending order, so the highest-spending model is listed last (right above the `TOTAL` row in `--table`). This applies to the interactive dashboard, `--table`, and `--text` output; `--json`
|
|
173
|
+
> Model rows are sorted by cost in ascending order, so the highest-spending model is listed last (right above the `TOTAL` row in `--table`). This applies to the interactive dashboard, `--table`, and `--text` output; `--json` lists its rows in no fixed order. The interactive dashboard also hides models with zero usage in the selected range.
|
|
212
174
|
|
|
213
175
|
> [!TIP]
|
|
214
176
|
> The same model can show up as several rows when it is routed under different provider prefixes (`openai/gpt-5.5`, `azure/gpt-5.5`, plain `gpt-5.5`). `--merge-providers` collapses rows that share the base name after the first `/` (versions like `gpt-5.5` vs `gpt-5.4` stay separate) and sums their already-priced cost. In the interactive dashboard, press `m` to toggle it live (the choice is saved to `~/.vct/config.toml`, so the next launch remembers it); `--merge-providers` opens the dashboard already merged. `--json` is left as the raw per-model export.
|
|
@@ -237,7 +199,7 @@ vct usage --table --merge-providers
|
|
|
237
199
|
↑/↓ scroll m merge p providers Q quota r refresh q quit | Star on GitHub
|
|
238
200
|
```
|
|
239
201
|
|
|
240
|
-
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
|
|
202
|
+
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 keep the last successful data visible with a `Refreshing...` footer. A failed refresh keeps the last-known-good view and retries on the next scheduled or manual refresh.
|
|
241
203
|
|
|
242
204
|
### Preview: Table & JSON (`vct usage`)
|
|
243
205
|
|
|
@@ -268,16 +230,20 @@ Totals (by Provider)
|
|
|
268
230
|
```
|
|
269
231
|
|
|
270
232
|
```json
|
|
271
|
-
// vct usage --json (one model shown; rows
|
|
233
|
+
// vct usage --json (one model shown; rows come in no fixed order)
|
|
272
234
|
[
|
|
273
235
|
{
|
|
274
|
-
"model": "claude-opus-4-8",
|
|
275
236
|
"cost_usd": 151.29,
|
|
237
|
+
"model": "claude-opus-4-8",
|
|
276
238
|
"usage": {
|
|
239
|
+
"cache_creation": {
|
|
240
|
+
"ephemeral_1h_input_tokens": 0,
|
|
241
|
+
"ephemeral_5m_input_tokens": 6057836
|
|
242
|
+
},
|
|
243
|
+
"cache_creation_input_tokens": 6057836,
|
|
244
|
+
"cache_read_input_tokens": 138099926,
|
|
277
245
|
"input_tokens": 401937,
|
|
278
246
|
"output_tokens": 936186,
|
|
279
|
-
"cache_read_input_tokens": 138099926,
|
|
280
|
-
"cache_creation_input_tokens": 6057836,
|
|
281
247
|
"reasoning_output_tokens": 0,
|
|
282
248
|
"total_tokens": 145495885
|
|
283
249
|
}
|
|
@@ -285,7 +251,7 @@ Totals (by Provider)
|
|
|
285
251
|
]
|
|
286
252
|
```
|
|
287
253
|
|
|
288
|
-
Every row
|
|
254
|
+
Every row carries the same flat token fields regardless of provider. A few keys appear only on a row that has something to put in them: `cache_creation` splits the cache writes into their 5-minute and 1-hour TTL shares, `server_tool_use` counts Claude web searches, `above_tier` holds the tokens of requests whose prompt crossed a long-context price tier, and a Gemini row that spent tool tokens carries `tool_tokens`, which LiteLLM has no rate for and which are counted in `total_tokens` alone.
|
|
289
255
|
|
|
290
256
|
### What It Scans
|
|
291
257
|
|
|
@@ -300,6 +266,7 @@ The tool automatically scans these directories:
|
|
|
300
266
|
- `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
|
|
301
267
|
- `$GROK_HOME/sessions/*/*/signals.json` (Grok CLI — defaults to `~/.grok`; sibling `updates.jsonl` supplies `analysis` data)
|
|
302
268
|
- `$DSH_HOME/sessions/*/*/session.jsonl.zstd` (DeepSeek Harness — defaults to `~/.dsh`; a root configured with `compression = "none"` writes `session.jsonl` instead, and both are read)
|
|
269
|
+
- `~/.gemini/{antigravity-cli,antigravity,jetski}/brain/*/.system_generated/logs/transcript_full.jsonl` (Antigravity — the `agy` CLI, the Desktop app and Jetski, counted as one provider; each conversation's model comes from the sibling `conversations/<id>.db`)
|
|
303
270
|
|
|
304
271
|
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.
|
|
305
272
|
|
|
@@ -311,7 +278,7 @@ Every `usage` and `analysis` scan reads and writes a per-session ledger under `~
|
|
|
311
278
|
|
|
312
279
|
### Live Quota Panels
|
|
313
280
|
|
|
314
|
-
`vct usage` shows **live quota usage for Claude Code, Codex, GitHub Copilot, Cursor, and
|
|
281
|
+
`vct usage` shows **live quota usage for Claude Code, Codex, GitHub Copilot, Cursor, Grok, and Antigravity 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 (for Antigravity, asks the `agy` CLI) 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 per-provider cost line under the table is local scan data, not a quota panel, so it stays whatever you set here.)
|
|
315
282
|
|
|
316
283
|
```
|
|
317
284
|
┌ Claude ──────────────┐┌ Codex ───────────────┐┌ Copilot ─────────────┐┌ Cursor ────────LIMIT ┐┌ Grok ────────────────┐
|
|
@@ -321,19 +288,27 @@ Every `usage` and `analysis` scan reads and writes a per-session ledger under `~
|
|
|
321
288
|
│Fable ▰▰▰▰▱ 79% 1d23h││credits 0 · +3 reset ││ ││api ▰▰▰▱▱ 44% 16d0h││balance $12.00 │
|
|
322
289
|
│bal - · $0.00 used ││reset expires 17d0h ││ ││ ││ │
|
|
323
290
|
└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘└──────────────────────┘
|
|
291
|
+
┌ Antigravity ─────────┐
|
|
292
|
+
│- just now│
|
|
293
|
+
│G 7d ▰▱▱▱▱ 8% 2d18h│
|
|
294
|
+
│G 5h ▰▰▱▱▱ 23% 2h50m│
|
|
295
|
+
│C 7d ▰▰▰▱▱ 57% 20h5m│
|
|
296
|
+
│C 5h ▱▱▱▱▱ 0% 4h59m│
|
|
297
|
+
└──────────────────────┘
|
|
324
298
|
```
|
|
325
299
|
|
|
326
300
|
- **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.
|
|
327
301
|
- **Codex** — plan tier, available 5-hour and weekly usage windows, 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)`).
|
|
328
302
|
- **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.
|
|
329
|
-
- **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`.
|
|
303
|
+
- **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`.
|
|
330
304
|
- **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.
|
|
305
|
+
- **Antigravity** — the weekly and 5-hour limits of each shared model pool (Gemini, and Claude / GPT), from the `agy` CLI's own `/usage` command (`agy -p /usage --output-format json`). The card names each limit by its pool's first word, or only its initial in a narrow card (`G 7d` is the Gemini weekly limit). `/usage` reports no plan, so the first line shows only the age. agy keeps its own sign-in fresh, so vct only checks that `~/.gemini/antigravity-cli/antigravity-oauth-token` exists and never reads or writes it. Each poll starts agy (a few seconds and about 260 MB), so this card refreshes at most every 5 minutes. When agy cannot sign in, the card shows a `run: agy acp --login` hint and the dashboard does not run agy again until that file changes.
|
|
331
306
|
|
|
332
|
-
**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)
|
|
307
|
+
**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). For Grok, 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. Antigravity's token belongs to agy, which refreshes it whenever vct asks it for `/usage`.
|
|
333
308
|
|
|
334
|
-
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
|
|
309
|
+
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. 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` for the Provider Usage panel with per-provider tokens and share. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
335
310
|
|
|
336
|
-
> **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.
|
|
311
|
+
> **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. agy keeps its sign-in in the Keychain there too, so the Antigravity panel is not shown on macOS either. Cursor's `~/.config/cursor` credential path is Linux-oriented.
|
|
337
312
|
|
|
338
313
|
---
|
|
339
314
|
|
|
@@ -341,18 +316,7 @@ A panel appears only for a provider whose credentials are present. Panels are pl
|
|
|
341
316
|
|
|
342
317
|
**Deep dive into code operations — see exactly what your AI assistant did.**
|
|
343
318
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
| Argument / Flag | Purpose |
|
|
347
|
-
| ---------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
348
|
-
| *(none)* | Interactive TUI dashboard over all sessions |
|
|
349
|
-
| `<FILE>` | Analyze one JSONL/JSON session file and print its complete `CodeAnalysis` JSON |
|
|
350
|
-
| `--table` | Static summary table with per-provider totals |
|
|
351
|
-
| `--text` | Plain-text summary, script-friendly |
|
|
352
|
-
| `--json` | Complete parser results as JSON: one object for `<FILE>`, otherwise an array of objects |
|
|
353
|
-
| `--daily` / `--weekly` / `--monthly` / `--all` | Time range filter for all-session analysis (see table above; not accepted with `<FILE>`) |
|
|
354
|
-
|
|
355
|
-
See [`tests/fixtures/sessions/`](tests/fixtures/sessions/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) and the DeepSeek Harness one under [`tests/fixtures/sessions/dsh/`](tests/fixtures/sessions/dsh/).
|
|
319
|
+
See [`tests/fixtures/sessions/`](tests/fixtures/sessions/) for sample inputs and matching JSON outputs for the four JSONL providers, plus the Grok session fixture under [`tests/fixtures/sessions/grok/`](tests/fixtures/sessions/grok/) the DeepSeek Harness one under [`tests/fixtures/sessions/dsh/`](tests/fixtures/sessions/dsh/), and the Antigravity one under [`tests/fixtures/sessions/antigravity/`](tests/fixtures/sessions/antigravity/).
|
|
356
320
|
|
|
357
321
|
### Basic Usage
|
|
358
322
|
|
|
@@ -515,27 +479,16 @@ vct version --json # Machine-readable JSON
|
|
|
515
479
|
└───────────────┴──────────┘
|
|
516
480
|
```
|
|
517
481
|
|
|
518
|
-
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.
|
|
519
|
-
|
|
520
482
|
---
|
|
521
483
|
|
|
522
484
|
## Quota Command
|
|
523
485
|
|
|
524
486
|
**Print a provider's raw quota/usage API response — no parsing, no aggregation.**
|
|
525
487
|
|
|
526
|
-
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`).
|
|
488
|
+
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`). `vct quota antigravity` instead runs `agy -p /usage --output-format json` once and prints what agy printed; agy refreshes its own token as it does so.
|
|
527
489
|
|
|
528
490
|
> The previous name `vct fetch` is kept as a hidden alias, so existing scripts keep working.
|
|
529
491
|
|
|
530
|
-
### Flags
|
|
531
|
-
|
|
532
|
-
| Flag | Purpose |
|
|
533
|
-
| --------- | --------------------------------------------- |
|
|
534
|
-
| *(none)* | Pretty JSON (default) |
|
|
535
|
-
| `--json` | Pretty JSON |
|
|
536
|
-
| `--text` | Flattened `key: value` lines, script-friendly |
|
|
537
|
-
| `--table` | Flattened Field / Value table |
|
|
538
|
-
|
|
539
492
|
### Basic Usage
|
|
540
493
|
|
|
541
494
|
```bash
|
|
@@ -545,6 +498,7 @@ vct quota codex
|
|
|
545
498
|
vct quota copilot
|
|
546
499
|
vct quota cursor
|
|
547
500
|
vct quota grok
|
|
501
|
+
vct quota antigravity
|
|
548
502
|
|
|
549
503
|
# Flattened plain text
|
|
550
504
|
vct quota codex --text
|
|
@@ -554,7 +508,7 @@ vct quota copilot --table
|
|
|
554
508
|
```
|
|
555
509
|
|
|
556
510
|
> [!NOTE]
|
|
557
|
-
> The response body is printed to stdout as-is. On an HTTP error the body is still printed and the process exits non-zero; a 401/403 additionally prints a `run: <cli> login` hint on stderr.
|
|
511
|
+
> The response body is printed to stdout as-is. On an HTTP error the body is still printed and the process exits non-zero; a 401/403 additionally prints a `run: <cli> login` hint on stderr. A failed `agy` run is reported the same way, with the `run: agy acp --login` hint when agy could not sign in.
|
|
558
512
|
|
|
559
513
|
---
|
|
560
514
|
|
|
@@ -562,78 +516,7 @@ vct quota copilot --table
|
|
|
562
516
|
|
|
563
517
|
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.
|
|
564
518
|
|
|
565
|
-
|
|
566
|
-
#:schema https://raw.githubusercontent.com/Mai0313/VibeCodingTracker/main/vct.schema.json
|
|
567
|
-
|
|
568
|
-
[general]
|
|
569
|
-
# Default time range when no --daily/--weekly/--monthly/--all flag is given.
|
|
570
|
-
# One of: "daily" | "weekly" | "monthly" | "all".
|
|
571
|
-
default_time_range = "all"
|
|
572
|
-
# Check for a newer release at startup and automatically update supported direct installs.
|
|
573
|
-
# Set to false to disable this behavior.
|
|
574
|
-
auto_update = true
|
|
575
|
-
# Layout version of this file, stamped by vct. Only the upgrade pass reads it;
|
|
576
|
-
# leave it alone unless you want a past upgrade to run again.
|
|
577
|
-
version = 3
|
|
578
|
-
|
|
579
|
-
[usage]
|
|
580
|
-
# Start the usage dashboard with models merged across provider prefixes.
|
|
581
|
-
# Toggled live with `m`; the last state is saved back here.
|
|
582
|
-
merge_models = false
|
|
583
|
-
# Seconds between automatic redraws of the usage TUI (minimum 1).
|
|
584
|
-
refresh_interval = 10
|
|
585
|
-
|
|
586
|
-
[usage.quota]
|
|
587
|
-
# Which live quota panels to show. Remove a name to hide that panel; use an
|
|
588
|
-
# empty list ([]) to hide them all.
|
|
589
|
-
panels = ["claude", "codex", "copilot", "cursor", "grok"]
|
|
590
|
-
# Seconds between live quota-panel polls, shared by every provider (minimum 1).
|
|
591
|
-
refresh_interval = 60
|
|
592
|
-
|
|
593
|
-
[analysis]
|
|
594
|
-
# Seconds between automatic redraws of the analysis TUI (minimum 1).
|
|
595
|
-
refresh_interval = 10
|
|
596
|
-
|
|
597
|
-
[performance]
|
|
598
|
-
# Rayon workers used by CLI session scans. 0 selects the measured auto default;
|
|
599
|
-
# a positive value is capped at the machine's available parallelism.
|
|
600
|
-
scan_threads = 0
|
|
601
|
-
|
|
602
|
-
[providers]
|
|
603
|
-
# Include each provider's sessions in usage / analysis. Set a provider to false
|
|
604
|
-
# to skip it entirely (no directory scan, no API).
|
|
605
|
-
claude = true
|
|
606
|
-
codex = true
|
|
607
|
-
copilot = true
|
|
608
|
-
gemini = true
|
|
609
|
-
opencode = true
|
|
610
|
-
cursor = true
|
|
611
|
-
hermes = true
|
|
612
|
-
grok = true
|
|
613
|
-
dsh = true
|
|
614
|
-
|
|
615
|
-
[logging]
|
|
616
|
-
# Minimum level written to ~/.vct/logs/vct-YYYY-MM-DD.log.
|
|
617
|
-
# One of: "off" | "error" | "warn" | "info" | "debug" | "trace".
|
|
618
|
-
level = "warn"
|
|
619
|
-
# Days of daily log files to keep; older files are pruned on startup. 0 keeps every file.
|
|
620
|
-
retention_days = 7
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
| Setting | Effect |
|
|
624
|
-
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
625
|
-
| `general.default_time_range` | Period used when you pass no `--daily/--weekly/--monthly/--all`. An explicit flag always wins. |
|
|
626
|
-
| `general.auto_update` | Check once per UTC day at startup and automatically update only official-installer direct installs. Set to `false` to disable. |
|
|
627
|
-
| `general.version` | Layout version vct stamps on the file, so a panel added by a later release is offered to you exactly once. |
|
|
628
|
-
| `usage.merge_models` | Seeds the dashboard merged; the `m` toggle saves your last choice back here. `--merge-providers` forces on. |
|
|
629
|
-
| `usage.refresh_interval` | Redraw cadence of the `usage` dashboard (seconds). |
|
|
630
|
-
| `usage.quota.panels` | Which quota panels to show (`claude` / `codex` / `copilot` / `cursor` / `grok`); drop a name to hide it, `[]` to hide them all. |
|
|
631
|
-
| `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
|
|
632
|
-
| `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
|
|
633
|
-
| `performance.scan_threads` | CLI scan workers. `0` uses `RAYON_NUM_THREADS` when positive, otherwise at most two workers; every value is CPU-capped. |
|
|
634
|
-
| `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
|
|
635
|
-
| `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
|
|
636
|
-
| `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
|
|
519
|
+
Run `vct config show` to print the file; its comments explain every setting.
|
|
637
520
|
|
|
638
521
|
> [!NOTE]
|
|
639
522
|
> 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.
|
|
@@ -667,9 +550,8 @@ vct config migrate
|
|
|
667
550
|
### How It Works
|
|
668
551
|
|
|
669
552
|
1. **Automatic Updates**: Fetches pricing from [LiteLLM](https://github.com/BerriAI/litellm) once per UTC day
|
|
670
|
-
2. **
|
|
671
|
-
3. **
|
|
672
|
-
4. **Failure Safety**: A failed fetch cannot replace a good cache; vct keeps the previous map and backs off for five minutes before another attempt
|
|
553
|
+
2. **Deterministic Matching**: Finds the most specific model match even for versioned or provider-prefixed names
|
|
554
|
+
3. **Failure Safety**: A failed fetch cannot replace a good cache; vct keeps the previous map and backs off for five minutes before another attempt
|
|
673
555
|
|
|
674
556
|
### Model Matching
|
|
675
557
|
|
|
@@ -678,7 +560,7 @@ vct config migrate
|
|
|
678
560
|
1. **Exact Match**: `claude-sonnet-4` → `claude-sonnet-4`
|
|
679
561
|
2. **Normalized**: `claude-sonnet-4-20250514` → `claude-sonnet-4`
|
|
680
562
|
3. **Substring**: `custom-gpt-4` → `gpt-4`
|
|
681
|
-
4. **Fuzzy
|
|
563
|
+
4. **Fuzzy**: Uses Jaro-Winkler similarity (70% threshold)
|
|
682
564
|
5. **Fallback**: Shows $0.00 if no match found
|
|
683
565
|
|
|
684
566
|
Generic placeholder names (e.g. `default`, what cursor-agent records for auto-mode sessions) and very short names never take a substring/fuzzy match — unpriced is safer than a coincidental neighbor's price.
|
|
@@ -690,14 +572,11 @@ Generic placeholder names (e.g. `default`, what cursor-agent records for auto-mo
|
|
|
690
572
|
- **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.
|
|
691
573
|
- **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
|
|
692
574
|
- **DeepSeek Harness**: `dsh` records no cost of its own, so every model is priced from LiteLLM through the same lookup chain as the other file-based providers — there is no stored-cost fallback like OpenCode's or Hermes's. It routes to whatever the deployment configures, so expect deployment-defined model names, which land at $0 when nothing in LiteLLM matches.
|
|
575
|
+
- **Antigravity**: priced from LiteLLM like the other file-based providers, under the model each request's generation record names. Compaction requests name no model, so their tokens are counted under `unknown` at $0.
|
|
693
576
|
- **Grok**: `contextTokensUsed` is priced as cache-read tokens only (falling back to the input rate when the model publishes no cache-read price); this is a point-in-time local context estimate, not cumulative billed usage.
|
|
694
|
-
- **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 each pricing map owns a small in-process LRU so repeated lookups stay cheap without cross-map contamination.
|
|
695
577
|
|
|
696
578
|
---
|
|
697
579
|
|
|
698
|
-
##
|
|
580
|
+
## Development
|
|
699
581
|
|
|
700
|
-
|
|
701
|
-
# Build image
|
|
702
|
-
docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
|
|
703
|
-
```
|
|
582
|
+
Contributor setup, building from source, tests, code quality, commit conventions, and release and packaging notes live in [CONTRIBUTING.md](./.github/CONTRIBUTING.md).
|