@mai0313/vibe-coding-tracker 1.0.0 → 1.2.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
@@ -238,16 +238,18 @@ The tool automatically scans these directories:
238
238
  `vct usage` shows **live remaining quota for Claude Code and Codex right in the dashboard — with zero setup.** No status-line hook, no config file: vct reads each provider's own OAuth credentials, calls its usage API on a background thread, and keeps the panels current while you work.
239
239
 
240
240
  ```
241
- ┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
242
- │ Claude 1.2M $3.00 4d │ 5h ▰▰▱▱▱ 16% │ Plan: plus │
243
- │ Codex 800K $0.00 6d │ ↻ 4h13m │ 5h ▰▰▱▱▱ 27% │
244
- │ ... │ 7d ▰▰▰▱▱ 28% │ 7d ▱▱▱▱▱ 4% │
245
- │ │ updated 2m ago │ Credits: 0 +2 │
246
- └───────────────────────────┴────────────────┴─────────────────┘
241
+ ┌ Provider/Tokens/Cost/Days ┬ Claude ───────────────────┬ Codex ────────────────────┐
242
+ │ Claude 1.2M $3.00 4d │ Plan: max 20x │ Plan: plus │
243
+ │ Codex 800K $0.00 6d │ 5h ▰▱▱▱▱ 16% ↻ 2h0m │ 5h ▰▰▱▱▱ 37% ↻ 2h33m │
244
+ │ ... │ 7d ▰▰▱▱▱ 41% ↻ 5d │ 7d ▰▰▱▱▱ 24% ↻ 3d16h │
245
+ │ │ Opus ▰▰▰▱▱ 61% ↻ 5d │ Credits: 0 +3 reset │
246
+ │ │ Balance: - $0.00 used │ updated just now │
247
+ │ │ updated just now │ │
248
+ └───────────────────────────┴────────────────────────────┴────────────────────────────┘
247
249
  ```
248
250
 
249
- - **Claude** — 5-hour and weekly usage from the official OAuth usage API (`GET /api/oauth/usage`), read from `~/.claude/.credentials.json`.
250
- - **Codex** — plan tier, 5-hour and weekly usage, and credit balance from the ChatGPT backend (`wham/usage`) using `~/.codex/auth.json`; falls back to the newest `rate_limits` in your Codex session logs when the API is unavailable (the title shows `Codex` vs `Codex (session)`).
251
+ - **Claude** — plan tier, 5-hour, weekly, and per-model weekly usage from the official OAuth usage API (`GET /api/oauth/usage`), read from `~/.claude/.credentials.json`, plus your credit balance. Polled about once a minute to stay under the endpoint's rate limit; a red `LIMIT` flag appears in the title when a cap is hit. The per-model weekly row is best-effort and simply hides when that scope is not returned.
252
+ - **Codex** — plan tier, 5-hour and weekly usage, and credit balance from the ChatGPT backend (`wham/usage`) using `~/.codex/auth.json` (with approximate remaining messages / spend cap when applicable); falls back to the newest `rate_limits` in your Codex session logs when the API is unavailable (the title shows `Codex` vs `Codex (session)`).
251
253
 
252
254
  **Automatic token refresh.** For both providers, when a token is near expiry or rejected, vct refreshes it and writes the new token back to the provider's own credential file (in that CLI's exact format), so a token is reused across checks rather than refreshed every time. If a refresh cannot proceed, the panel shows a `run: <provider> auth login` hint instead of breaking.
253
255
 
package/README.zh-CN.md CHANGED
@@ -238,16 +238,18 @@ vct usage --json --daily
238
238
  `vct usage` 会**在仪表盘中直接显示 Claude Code 与 Codex 的实时剩余额度——完全零配置。** 不需要 status-line hook,也不需要配置文件:vct 会读取各 provider 自己的 OAuth 凭证,在后台线程调用其用量 API,并在你工作时保持面板持续更新。
239
239
 
240
240
  ```
241
- ┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
242
- │ Claude 1.2M $3.00 4d │ 5h ▰▰▱▱▱ 16% │ Plan: plus │
243
- │ Codex 800K $0.00 6d │ ↻ 4h13m │ 5h ▰▰▱▱▱ 27% │
244
- │ ... │ 7d ▰▰▰▱▱ 28% │ 7d ▱▱▱▱▱ 4% │
245
- │ │ updated 2m ago │ Credits: 0 +2 │
246
- └───────────────────────────┴────────────────┴─────────────────┘
241
+ ┌ Provider/Tokens/Cost/Days ┬ Claude ───────────────────┬ Codex ────────────────────┐
242
+ │ Claude 1.2M $3.00 4d │ Plan: max 20x │ Plan: plus │
243
+ │ Codex 800K $0.00 6d │ 5h ▰▱▱▱▱ 16% ↻ 2h0m │ 5h ▰▰▱▱▱ 37% ↻ 2h33m │
244
+ │ ... │ 7d ▰▰▱▱▱ 41% ↻ 5d │ 7d ▰▰▱▱▱ 24% ↻ 3d16h │
245
+ │ │ Opus ▰▰▰▱▱ 61% ↻ 5d │ Credits: 0 +3 reset │
246
+ │ │ Balance: - $0.00 used │ updated just now │
247
+ │ │ updated just now │ │
248
+ └───────────────────────────┴────────────────────────────┴────────────────────────────┘
247
249
  ```
248
250
 
249
- - **Claude** — 5 小时和每周用量,来自官方 OAuth 用量 API(`GET /api/oauth/usage`),从 `~/.claude/.credentials.json` 读取。
250
- - **Codex** — 套餐类型、5 小时和每周用量以及额度余额,使用 `~/.codex/auth.json` 从 ChatGPT 后端(`wham/usage`)获取;API 不可用时回退到 Codex 会话日志中最新的 `rate_limits`(标题显示 `Codex` 或 `Codex (session)`)。
251
+ - **Claude** — 方案类型、5 小时、每周以及单模型每周用量,来自官方 OAuth 用量 API(`GET /api/oauth/usage`),从 `~/.claude/.credentials.json` 读取,并显示额度余额。约每分钟轮询一次以避开该端点的速率限制;触及上限时标题会出现红色 `LIMIT` 标记。单模型每周那一行属于尽力而为,未返回该范围时就自动隐藏。
252
+ - **Codex** — 套餐类型、5 小时和每周用量以及额度余额,使用 `~/.codex/auth.json` 从 ChatGPT 后端(`wham/usage`)获取(在适用时显示大致剩余讯息数 / 消费上限);API 不可用时回退到 Codex 会话日志中最新的 `rate_limits`(标题显示 `Codex` 或 `Codex (session)`)。
251
253
 
252
254
  **自动刷新 token。** 对这两个 provider,当 token 接近过期或被拒绝时,vct 会刷新它并把新 token 写回该 provider 自己的凭证文件(采用该 CLI 的原始格式),因此 token 会在多次检查之间复用,而不是每次都重新刷新。如果刷新失败,面板会显示 `run: <provider> auth login` 提示,而不会直接中断。
253
255
 
package/README.zh-TW.md CHANGED
@@ -238,16 +238,18 @@ vct usage --json --daily
238
238
  `vct usage` 會**在儀表板中直接顯示 Claude Code 與 Codex 的即時剩餘額度——完全零設定。** 不需要 status-line hook,也不需要設定檔:vct 會讀取各 provider 自己的 OAuth 憑證,在背景執行緒呼叫其用量 API,並在你工作時讓面板保持最新。
239
239
 
240
240
  ```
241
- ┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
242
- │ Claude 1.2M $3.00 4d │ 5h ▰▰▱▱▱ 16% │ Plan: plus │
243
- │ Codex 800K $0.00 6d │ ↻ 4h13m │ 5h ▰▰▱▱▱ 27% │
244
- │ ... │ 7d ▰▰▰▱▱ 28% │ 7d ▱▱▱▱▱ 4% │
245
- │ │ updated 2m ago │ Credits: 0 +2 │
246
- └───────────────────────────┴────────────────┴─────────────────┘
241
+ ┌ Provider/Tokens/Cost/Days ┬ Claude ───────────────────┬ Codex ────────────────────┐
242
+ │ Claude 1.2M $3.00 4d │ Plan: max 20x │ Plan: plus │
243
+ │ Codex 800K $0.00 6d │ 5h ▰▱▱▱▱ 16% ↻ 2h0m │ 5h ▰▰▱▱▱ 37% ↻ 2h33m │
244
+ │ ... │ 7d ▰▰▱▱▱ 41% ↻ 5d │ 7d ▰▰▱▱▱ 24% ↻ 3d16h │
245
+ │ │ Opus ▰▰▰▱▱ 61% ↻ 5d │ Credits: 0 +3 reset │
246
+ │ │ Balance: - $0.00 used │ updated just now │
247
+ │ │ updated just now │ │
248
+ └───────────────────────────┴────────────────────────────┴────────────────────────────┘
247
249
  ```
248
250
 
249
- - **Claude** — 5 小時和每週用量,來自官方 OAuth 用量 API(`GET /api/oauth/usage`),從 `~/.claude/.credentials.json` 讀取。
250
- - **Codex** — 方案類型、5 小時和每週用量以及額度餘額,使用 `~/.codex/auth.json` 從 ChatGPT 後端(`wham/usage`)取得;API 無法使用時回退到 Codex 工作階段紀錄中最新的 `rate_limits`(標題顯示 `Codex` 或 `Codex (session)`)。
251
+ - **Claude** — 方案類型、5 小時、每週以及單模型每週用量,來自官方 OAuth 用量 API(`GET /api/oauth/usage`),從 `~/.claude/.credentials.json` 讀取,並顯示額度餘額。約每分鐘輪詢一次以避開該端點的速率限制;觸及上限時標題會出現紅色 `LIMIT` 標記。單模型每週那一行屬於盡力而為,未回傳該範圍時就自動隱藏。
252
+ - **Codex** — 方案類型、5 小時和每週用量以及額度餘額,使用 `~/.codex/auth.json` 從 ChatGPT 後端(`wham/usage`)取得(在適用時顯示大致剩餘訊息數 / 消費上限);API 無法使用時回退到 Codex 工作階段紀錄中最新的 `rate_limits`(標題顯示 `Codex` 或 `Codex (session)`)。
251
253
 
252
254
  **自動刷新 token。** 對這兩個 provider,當 token 接近過期或被拒絕時,vct 會刷新它並把新的 token 寫回該 provider 自己的憑證檔案(採用該 CLI 的原始格式),因此 token 會在多次檢查之間重複使用,而不是每次都重新刷新。如果刷新失敗,面板會顯示 `run: <provider> auth login` 提示,而不會直接中斷。
253
255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mai0313/vibe-coding-tracker",
3
- "version": "1.0.0",
3
+ "version": "1.2.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",