@mai0313/vibe-coding-tracker 1.10.0 → 1.12.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 CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, and Cursor usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
22
+ **Track your AI coding costs in real-time.** Vibe Coding Tracker is a lightweight, high-performance CLI tool built in Rust that monitors and analyzes your Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping the memory footprint minimal.
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@ Choose your preferred view:
48
48
 
49
49
  ### Zero Configuration
50
50
 
51
- Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, and Cursor. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
51
+ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes. No setup required — just run and analyze. A `~/.vct/config.toml` is created with sensible defaults on first run if you ever want to tweak behavior (see [Configuration](#configuration)).
52
52
 
53
53
  ### Rich Insights
54
54
 
@@ -62,15 +62,15 @@ Automatically detects and processes logs from Claude Code, Codex, Copilot, Gemin
62
62
 
63
63
  ## Key Features
64
64
 
65
- | Feature | Description |
66
- | --------------------- | ---------------------------------------------------------------------------- |
67
- | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, and Cursor — all in one place |
68
- | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
- | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
- | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
- | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
72
- | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
73
- | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
65
+ | Feature | Description |
66
+ | --------------------- | ------------------------------------------------------------------------------------ |
67
+ | **Multi-Provider** | Claude Code, Codex, Copilot, Gemini, OpenCode, Cursor, and Hermes — all in one place |
68
+ | **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
69
+ | **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
70
+ | **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
71
+ | **Live Quota Panels** | Live remaining quota for Claude, Codex, Copilot, and Cursor |
72
+ | **Ultra-Lightweight** | Under ~50 MB RSS in the TUI, streaming JSONL parse — built with Rust |
73
+ | **Live Updates** | Auto-refreshing dashboard (every 10s) with change highlighting |
74
74
 
75
75
  ---
76
76
 
@@ -291,6 +291,7 @@ The tool automatically scans these directories:
291
291
  - `~/.gemini/tmp/<project_hash>/chats/*.jsonl` (Gemini CLI)
292
292
  - `~/.local/share/opencode/opencode.db` (OpenCode — SQLite database; honors `$XDG_DATA_HOME`)
293
293
  - `~/.cursor/chats/*/*/store.db` (Cursor — SQLite chat stores, used for `analysis` and a local `usage` estimate consistent with the other providers)
294
+ - `~/.hermes/state.db` (Hermes — SQLite database, honors `$HERMES_HOME`; `usage` only)
294
295
 
295
296
  ### Live Quota Panels
296
297
 
@@ -548,6 +549,13 @@ copilot = true
548
549
  gemini = true
549
550
  opencode = true
550
551
  cursor = true
552
+
553
+ [logging]
554
+ # Minimum level written to ~/.vct/logs/vct-YYYY-MM-DD.log.
555
+ # One of: "off" | "error" | "warn" | "info" | "debug" | "trace".
556
+ level = "warn"
557
+ # Days of daily log files to keep; older files are pruned on startup. 0 keeps every file.
558
+ retention_days = 7
551
559
  ```
552
560
 
553
561
  | Setting | Effect |
@@ -559,10 +567,15 @@ cursor = true
559
567
  | `usage.quota.refresh_interval` | Poll cadence for every live quota panel (seconds); higher is safer against a provider's rate limits. |
560
568
  | `analysis.refresh_interval` | Redraw cadence of the `analysis` dashboard (seconds). |
561
569
  | `providers.*` | Skip a provider entirely (no scan, no API) when `false` — handy if you don't use one. |
570
+ | `logging.level` | Minimum severity written to the log file (`off`..`trace`); never printed to the terminal. |
571
+ | `logging.retention_days` | Days of daily log files to keep; older `vct-*.log` are pruned on startup (`0` keeps all). |
562
572
 
563
573
  > [!NOTE]
564
574
  > 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.
565
575
 
576
+ > [!NOTE]
577
+ > vct writes diagnostics to `~/.vct/logs/vct-YYYY-MM-DD.log` (plain text, file only — never shown in the dashboard). It stays quiet when healthy (default level `warn`) and the file is created lazily, so a healthy run leaves nothing behind. When a quota fetch fails or a session is skipped, that is where the reason is recorded — bump `logging.level` to `debug` for the full detail.
578
+
566
579
  ### Managing the file
567
580
 
568
581
  ```bash
@@ -607,6 +620,7 @@ vct config migrate
607
620
 
608
621
  - **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.
609
622
  - **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.
623
+ - **Hermes**: priced the same way as OpenCode — an **exact** LiteLLM match prices from tokens, otherwise vct uses Hermes's own stored cost.
610
624
  - **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.
611
625
 
612
626
  ---
package/README.zh-CN.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **实时追踪你的 AI 编程开销。** Vibe Coding Tracker 是一款基于 Rust 构建的轻量级高性能 CLI 工具,用于监控和分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode 和 Cursor 上的使用情况——提供详细的费用明细、token 统计和代码操作洞察,同时保持极低的内存占用。
22
+ **实时追踪你的 AI 编程开销。** Vibe Coding Tracker 是一款基于 Rust 构建的轻量级高性能 CLI 工具,用于监控和分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 和 Hermes 上的使用情况——提供详细的费用明细、token 统计和代码操作洞察,同时保持极低的内存占用。
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  ### 零配置
50
50
 
51
- 自动检测并处理来自 Claude Code、Codex、Copilot、Gemini、OpenCode 和 Cursor 的日志。无需任何设置——直接运行即可分析。首次运行时会自动生成一个带有合理默认值的 `~/.vct/config.toml`,方便你日后想调整行为时使用(参见 [配置](#%E9%85%8D%E7%BD%AE))。
51
+ 自动检测并处理来自 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 和 Hermes 的日志。无需任何设置——直接运行即可分析。首次运行时会自动生成一个带有合理默认值的 `~/.vct/config.toml`,方便你日后想调整行为时使用(参见 [配置](#%E9%85%8D%E7%BD%AE))。
52
52
 
53
53
  ### 丰富的洞察
54
54
 
@@ -62,15 +62,15 @@
62
62
 
63
63
  ## 核心特性
64
64
 
65
- | 特性 | 说明 |
66
- | ---------------- | ------------------------------------------------------------------- |
67
- | **多供应商支持** | Claude Code、Codex、Copilot、Gemini、OpenCode 和 Cursor——一站式管理 |
68
- | **智能定价** | 模糊模型匹配 + 从 LiteLLM 每日缓存更新 |
69
- | **4 种显示模式** | 交互式 TUI、静态表格、纯文本和 JSON |
70
- | **双维度分析** | token/费用统计(`usage`)+ 代码操作统计(`analysis`) |
71
- | **实时额度面板** | Claude、Codex、Copilot 和 Cursor 的实时剩余额度 |
72
- | **超轻量级** | TUI 常驻内存 50 MB 以内、流式 JSONL 解析——基于 Rust 构建 |
73
- | **实时更新** | 面板自动刷新(每 10 秒),并高亮变化 |
65
+ | 特性 | 说明 |
66
+ | ---------------- | --------------------------------------------------------------------------- |
67
+ | **多供应商支持** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 和 Hermes——一站式管理 |
68
+ | **智能定价** | 模糊模型匹配 + 从 LiteLLM 每日缓存更新 |
69
+ | **4 种显示模式** | 交互式 TUI、静态表格、纯文本和 JSON |
70
+ | **双维度分析** | token/费用统计(`usage`)+ 代码操作统计(`analysis`) |
71
+ | **实时额度面板** | Claude、Codex、Copilot 和 Cursor 的实时剩余额度 |
72
+ | **超轻量级** | TUI 常驻内存 50 MB 以内、流式 JSONL 解析——基于 Rust 构建 |
73
+ | **实时更新** | 面板自动刷新(每 10 秒),并高亮变化 |
74
74
 
75
75
  ---
76
76
 
@@ -291,6 +291,7 @@ Totals (by Provider)
291
291
  - `~/.gemini/tmp/<project_hash>/chats/*.jsonl`(Gemini CLI)
292
292
  - `~/.local/share/opencode/opencode.db`(OpenCode,SQLite 数据库;遵循 `$XDG_DATA_HOME`)
293
293
  - `~/.cursor/chats/*/*/store.db`(Cursor,SQLite 会话库,用于 `analysis`,并给出一个与其他 provider 一致的本地 `usage` 估算)
294
+ - `~/.hermes/state.db`(Hermes,SQLite 数据库,遵循 `$HERMES_HOME`;仅 `usage`)
294
295
 
295
296
  ### 实时额度面板
296
297
 
@@ -547,6 +548,13 @@ copilot = true
547
548
  gemini = true
548
549
  opencode = true
549
550
  cursor = true
551
+
552
+ [logging]
553
+ # 写入 ~/.vct/logs/vct-YYYY-MM-DD.log 的最低日志级别。
554
+ # 取值: "off" | "error" | "warn" | "info" | "debug" | "trace"。
555
+ level = "warn"
556
+ # 保留多少天的每日日志文件; 更旧的文件会在启动时清除。0 表示全部保留。
557
+ retention_days = 7
550
558
  ```
551
559
 
552
560
  | 设置项 | 作用 |
@@ -558,6 +566,11 @@ cursor = true
558
566
  | `usage.quota.refresh_interval` | 每个实时额度面板的轮询间隔(秒);数值越大越不容易触发 provider 的速率限制。 |
559
567
  | `analysis.refresh_interval` | `analysis` 面板的自动刷新间隔(秒)。 |
560
568
  | `providers.*` | 设为 `false` 时完全跳过某个 provider(不扫描、不调用 API)——如果你不用某个 provider 会很方便。 |
569
+ | `logging.level` | 写入日志文件的最低级别(`off`..`trace`);从不打印到终端。 |
570
+ | `logging.retention_days` | 保留多少天的每日日志文件;更旧的 `vct-*.log` 会在启动时清除(`0` 表示全部保留)。 |
571
+
572
+ > [!NOTE]
573
+ > vct 会把诊断信息写入 `~/.vct/logs/vct-YYYY-MM-DD.log`(纯文本,仅写文件,绝不显示在面板上)。健康运行时保持安静(默认级别 `warn`),且文件是惰性创建的,所以一次正常运行不会留下任何文件。当额度获取失败或某个 session 被跳过时,原因就记录在这里——需要完整细节时把 `logging.level` 调到 `debug`。
561
574
 
562
575
  > [!NOTE]
563
576
  > Cursor 的 `usage` 是从聊天库得出的**本地估算**,因此它会像 Claude Code / Codex / Copilot / Gemini 一样(都是从本地 session 文件计算得出)无需联网。该估算会低估 Cursor 的真实花费,因为其中很大一部分是以 Cursor 内部的 model 名称计费,本地数据无法为这些名称定价,所以请把 Cursor 费用视为近似值。
@@ -606,6 +619,7 @@ vct config migrate
606
619
 
607
620
  - **不止 token**:Claude 的 web-search 工具调用(`server_tool_use.web_search_requests`)会在 token 费用之外按每次查询计费;其他所有 model 的每次查询费用均为 $0。
608
621
  - **OpenCode**:只有在 LiteLLM 上**精确**匹配时,才会根据 token 为一个全新的 model 名称定价;若没有精确匹配,vct 会信任该 assistant message 自身存储的费用,而不是从一个只是大致相似的名称去猜测。
622
+ - **Hermes**:与 OpenCode 相同,LiteLLM 上**精确**匹配时按 token 定价,否则使用 Hermes 自身存储的费用。
609
623
  - **缓存为原始数据**:每日缓存存储的是经过筛选的上游 LiteLLM JSON(而非派生后的结构),因此无需重新获取即可保留分层 / 批量定价;此外还有一个小型的进程内 LRU,让 TUI 刷新期间的重复查询保持低开销。
610
624
 
611
625
  ---
package/README.zh-TW.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  </div>
21
21
 
22
- **即時追蹤你的 AI 程式設計花費。** Vibe Coding Tracker 是一款以 Rust 打造的輕量、高效能 CLI 工具,能監控與分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode 及 Cursor 的使用狀況——提供詳細的費用明細、token 統計資料與程式碼操作分析,同時維持極低的記憶體使用量。
22
+ **即時追蹤你的 AI 程式設計花費。** Vibe Coding Tracker 是一款以 Rust 打造的輕量、高效能 CLI 工具,能監控與分析你在 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 及 Hermes 的使用狀況——提供詳細的費用明細、token 統計資料與程式碼操作分析,同時維持極低的記憶體使用量。
23
23
 
24
24
  [English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
25
25
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  ### 零設定
50
50
 
51
- 自動偵測並處理 Claude Code、Codex、Copilot、Gemini、OpenCode 及 Cursor 的日誌檔。不需要任何設定——直接執行就能分析。首次執行時會以合理的預設值建立 `~/.vct/config.toml`,日後若想微調行為即可編輯它(見 [設定](#%E8%A8%AD%E5%AE%9A))。
51
+ 自動偵測並處理 Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 及 Hermes 的日誌檔。不需要任何設定——直接執行就能分析。首次執行時會以合理的預設值建立 `~/.vct/config.toml`,日後若想微調行為即可編輯它(見 [設定](#%E8%A8%AD%E5%AE%9A))。
52
52
 
53
53
  ### 豐富洞察
54
54
 
@@ -62,15 +62,15 @@
62
62
 
63
63
  ## 主要功能
64
64
 
65
- | 功能 | 說明 |
66
- | ---------------- | ----------------------------------------------------------------- |
67
- | **多供應商支援** | Claude Code、Codex、Copilot、Gemini、OpenCode 及 Cursor——一站整合 |
68
- | **智慧定價** | 模糊模型比對 + 每日從 LiteLLM cache 更新 |
69
- | **4 種顯示模式** | 互動式 TUI、靜態表格、純文字及 JSON |
70
- | **雙重分析** | Token / 費用統計(`usage`)+ 程式碼操作統計(`analysis`) |
71
- | **即時額度面板** | 即時顯示 Claude、Codex、Copilot 與 Cursor 的剩餘額度 |
72
- | **超輕量** | TUI 常駐記憶體 ~50 MB 以內、串流 JSONL 解析——以 Rust 打造 |
73
- | **即時更新** | 每 10 秒自動刷新的儀表板並突顯變更 |
65
+ | 功能 | 說明 |
66
+ | ---------------- | ------------------------------------------------------------------------- |
67
+ | **多供應商支援** | Claude Code、Codex、Copilot、Gemini、OpenCode、Cursor 及 Hermes——一站整合 |
68
+ | **智慧定價** | 模糊模型比對 + 每日從 LiteLLM cache 更新 |
69
+ | **4 種顯示模式** | 互動式 TUI、靜態表格、純文字及 JSON |
70
+ | **雙重分析** | Token / 費用統計(`usage`)+ 程式碼操作統計(`analysis`) |
71
+ | **即時額度面板** | 即時顯示 Claude、Codex、Copilot 與 Cursor 的剩餘額度 |
72
+ | **超輕量** | TUI 常駐記憶體 ~50 MB 以內、串流 JSONL 解析——以 Rust 打造 |
73
+ | **即時更新** | 每 10 秒自動刷新的儀表板並突顯變更 |
74
74
 
75
75
  ---
76
76
 
@@ -291,6 +291,7 @@ Totals (by Provider)
291
291
  - `~/.gemini/tmp/<project_hash>/chats/*.jsonl`(Gemini CLI)
292
292
  - `~/.local/share/opencode/opencode.db`(OpenCode,SQLite 資料庫;遵循 `$XDG_DATA_HOME`)
293
293
  - `~/.cursor/chats/*/*/store.db`(Cursor,SQLite 對話庫,用於 `analysis`,並產生與其他 provider 一致的本地 `usage` 估算)
294
+ - `~/.hermes/state.db`(Hermes,SQLite 資料庫,遵循 `$HERMES_HOME`;僅 `usage`)
294
295
 
295
296
  ### 即時額度面板
296
297
 
@@ -547,6 +548,13 @@ copilot = true
547
548
  gemini = true
548
549
  opencode = true
549
550
  cursor = true
551
+
552
+ [logging]
553
+ # 寫入 ~/.vct/logs/vct-YYYY-MM-DD.log 的最低日誌等級。
554
+ # 取值: "off" | "error" | "warn" | "info" | "debug" | "trace"。
555
+ level = "warn"
556
+ # 保留幾天的每日日誌檔; 更舊的檔案會在啟動時清除。0 表示全部保留。
557
+ retention_days = 7
550
558
  ```
551
559
 
552
560
  | 設定項 | 效果 |
@@ -558,6 +566,11 @@ cursor = true
558
566
  | `usage.quota.refresh_interval` | 每個即時額度面板的輪詢間隔(秒);數值越大越不容易觸發 provider 的速率限制。 |
559
567
  | `analysis.refresh_interval` | `analysis` 儀表板自動刷新的間隔(秒)。 |
560
568
  | `providers.*` | 設為 `false` 時完全略過某個 provider(不掃描、不呼叫 API),沒在用的話很方便。 |
569
+ | `logging.level` | 寫入日誌檔的最低等級(`off`..`trace`);絕不會印到終端機。 |
570
+ | `logging.retention_days` | 保留幾天的每日日誌檔;更舊的 `vct-*.log` 會在啟動時清除(`0` 表示全部保留)。 |
571
+
572
+ > [!NOTE]
573
+ > vct 會把診斷訊息寫入 `~/.vct/logs/vct-YYYY-MM-DD.log`(純文字,只寫檔案,絕不顯示在儀表板上)。健康運行時保持安靜(預設等級 `warn`),而且檔案是延遲建立的,所以一次正常執行不會留下任何檔案。當額度抓取失敗或某個 session 被略過時,原因就記錄在這裡——需要完整細節時把 `logging.level` 調到 `debug`。
561
574
 
562
575
  > [!NOTE]
563
576
  > Cursor 的 `usage` 是從對話庫產生的**本地估算**,因此行為與 Claude Code / Codex / Copilot / Gemini 一致(全都是從本地 session 檔案計算),而且不需要連網。這個估算會低估 Cursor 的真實花費,因為其中有很大一部分是以 Cursor 內部的 model 名稱計費,而本地資料無法為這些名稱定價,所以請把 Cursor 的費用視為概估值。
@@ -606,6 +619,7 @@ vct config migrate
606
619
 
607
620
  - **不只 token**:Claude 的網頁搜尋工具呼叫(`server_tool_use.web_search_requests`)會在 token 費用之外,按每次查詢計費;其他所有 model 的每次查詢費用皆為 $0。
608
621
  - **OpenCode**:只有在 LiteLLM **完全比對**成功時,才會依 token 為新型 model 計價;若沒有完全比對,vct 會採信該 assistant 訊息本身儲存的費用,而不是從名稱相近的 model 去猜測。
622
+ - **Hermes**:與 OpenCode 相同,LiteLLM **完全比對**成功時依 token 計價,否則使用 Hermes 本身儲存的費用。
609
623
  - **原始 cache**:每日 cache 儲存的是經過篩選的上游 LiteLLM JSON(而非衍生後的結構),因此分層 / 批次定價無需重新抓取即可使用;另外一個小型的行內 LRU 會讓 TUI 刷新期間的重複查詢維持低成本。
610
624
 
611
625
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mai0313/vibe-coding-tracker",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "description": "Vibe Coding Tracker - AI coding assistant telemetry/usage parser, aggregate JSONL events into CodeAnalysis results",
5
5
  "author": "Wei Lee <mai@mai0313.com>",
6
6
  "license": "MIT",