@mai0313/vct 0.17.0 → 1.0.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 +8 -34
- package/README.zh-CN.md +8 -34
- package/README.zh-TW.md +8 -34
- 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
|
@@ -143,7 +143,6 @@ vct <COMMAND> [OPTIONS]
|
|
|
143
143
|
Commands:
|
|
144
144
|
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
145
145
|
usage Display token usage statistics
|
|
146
|
-
statusline Cache Claude Code rate limits from a statusLine hook (stdin JSON)
|
|
147
146
|
version Display version information
|
|
148
147
|
update Update to the latest version from GitHub releases
|
|
149
148
|
help Print this message or the help of the given subcommand(s)
|
|
@@ -236,7 +235,7 @@ The tool automatically scans these directories:
|
|
|
236
235
|
|
|
237
236
|
### Live Quota Panels
|
|
238
237
|
|
|
239
|
-
|
|
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.
|
|
240
239
|
|
|
241
240
|
```
|
|
242
241
|
┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
|
|
@@ -247,10 +246,14 @@ At the bottom of the interactive dashboard, the per-provider stats sit on the le
|
|
|
247
246
|
└───────────────────────────┴────────────────┴─────────────────┘
|
|
248
247
|
```
|
|
249
248
|
|
|
250
|
-
- **Claude** — 5-hour and weekly
|
|
251
|
-
- **Codex** — plan tier, 5-hour and weekly usage, and credit balance
|
|
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)`).
|
|
252
251
|
|
|
253
|
-
|
|
252
|
+
**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
|
+
|
|
254
|
+
A panel appears only for a provider whose credentials are present. Quota panels appear only in the interactive TUI; `--table`, `--text`, and `--json` are unchanged.
|
|
255
|
+
|
|
256
|
+
> **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.
|
|
254
257
|
|
|
255
258
|
---
|
|
256
259
|
|
|
@@ -324,35 +327,6 @@ vct analysis --output today.json --daily
|
|
|
324
327
|
|
|
325
328
|
---
|
|
326
329
|
|
|
327
|
-
## Statusline Command
|
|
328
|
-
|
|
329
|
-
**Feed Claude Code rate limits into the `usage` dashboard.**
|
|
330
|
-
|
|
331
|
-
Claude Code only exposes its 5-hour / weekly rate limits through the `statusLine` hook's stdin JSON, so `vct` captures them from there and caches them to `~/.vibe_coding_tracker/claude_rate_limits.json` for the Claude quota panel.
|
|
332
|
-
|
|
333
|
-
### If you already have a statusLine
|
|
334
|
-
|
|
335
|
-
Add one backgrounded line to your existing statusLine script. It has zero impact on your current display and is isolated, so a vct error can never disturb the statusLine:
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
printf '%s' "$input" | vct statusline ingest >/dev/null 2>&1 &
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### If you do not have a statusLine yet
|
|
342
|
-
|
|
343
|
-
Point Claude Code's `~/.claude/settings.json` straight at vct, which caches the limits and prints a compact one-line status:
|
|
344
|
-
|
|
345
|
-
```json
|
|
346
|
-
{
|
|
347
|
-
"statusLine": {
|
|
348
|
-
"type": "command",
|
|
349
|
-
"command": "vct statusline"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
---
|
|
355
|
-
|
|
356
330
|
## Update Command
|
|
357
331
|
|
|
358
332
|
**Keep your installation up-to-date automatically.**
|
package/README.zh-CN.md
CHANGED
|
@@ -143,7 +143,6 @@ vct <COMMAND> [OPTIONS]
|
|
|
143
143
|
Commands:
|
|
144
144
|
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
145
145
|
usage Display token usage statistics
|
|
146
|
-
statusline Cache Claude Code rate limits from a statusLine hook (stdin JSON)
|
|
147
146
|
version Display version information
|
|
148
147
|
update Update to the latest version from GitHub releases
|
|
149
148
|
help Print this message or the help of the given subcommand(s)
|
|
@@ -236,7 +235,7 @@ vct usage --json --daily
|
|
|
236
235
|
|
|
237
236
|
### 实时额度面板
|
|
238
237
|
|
|
239
|
-
|
|
238
|
+
`vct usage` 会**在仪表盘中直接显示 Claude Code 与 Codex 的实时剩余额度——完全零配置。** 不需要 status-line hook,也不需要配置文件:vct 会读取各 provider 自己的 OAuth 凭证,在后台线程调用其用量 API,并在你工作时保持面板持续更新。
|
|
240
239
|
|
|
241
240
|
```
|
|
242
241
|
┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
|
|
@@ -247,10 +246,14 @@ vct usage --json --daily
|
|
|
247
246
|
└───────────────────────────┴────────────────┴─────────────────┘
|
|
248
247
|
```
|
|
249
248
|
|
|
250
|
-
- **Claude** — 5
|
|
251
|
-
- **Codex** — 套餐类型、5
|
|
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)`)。
|
|
252
251
|
|
|
253
|
-
|
|
252
|
+
**自动刷新 token。** 对这两个 provider,当 token 接近过期或被拒绝时,vct 会刷新它并把新 token 写回该 provider 自己的凭证文件(采用该 CLI 的原始格式),因此 token 会在多次检查之间复用,而不是每次都重新刷新。如果刷新失败,面板会显示 `run: <provider> auth login` 提示,而不会直接中断。
|
|
253
|
+
|
|
254
|
+
只有在某个 provider 的凭证存在时,才会显示对应的面板。额度面板仅在交互式 TUI 中显示;`--table`、`--text`、`--json` 不受影响。
|
|
255
|
+
|
|
256
|
+
> **平台说明:** 在 macOS 上,Claude Code 会把 OAuth 凭证保存在系统 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不会显示 Claude 面板。
|
|
254
257
|
|
|
255
258
|
---
|
|
256
259
|
|
|
@@ -324,35 +327,6 @@ vct analysis --output today.json --daily
|
|
|
324
327
|
|
|
325
328
|
---
|
|
326
329
|
|
|
327
|
-
## Statusline 命令
|
|
328
|
-
|
|
329
|
-
**将 Claude Code 的额度信息接入 `usage` 仪表盘。**
|
|
330
|
-
|
|
331
|
-
Claude Code 仅通过 `statusLine` hook 的 stdin JSON 暴露其 5 小时 / 每周额度,因此 `vct` 从那里捕获并缓存到 `~/.vibe_coding_tracker/claude_rate_limits.json`,供 Claude 额度面板读取。
|
|
332
|
-
|
|
333
|
-
### 如果你已有 statusLine
|
|
334
|
-
|
|
335
|
-
在现有 statusLine 脚本中加一行后台命令。它对当前显示零影响,且相互隔离,vct 出错也绝不会干扰 statusLine:
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
printf '%s' "$input" | vct statusline ingest >/dev/null 2>&1 &
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### 如果你还没有 statusLine
|
|
342
|
-
|
|
343
|
-
让 Claude Code 的 `~/.claude/settings.json` 直接指向 vct,它会缓存额度并打印一行简洁状态:
|
|
344
|
-
|
|
345
|
-
```json
|
|
346
|
-
{
|
|
347
|
-
"statusLine": {
|
|
348
|
-
"type": "command",
|
|
349
|
-
"command": "vct statusline"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
---
|
|
355
|
-
|
|
356
330
|
## Update 命令
|
|
357
331
|
|
|
358
332
|
**自动保持安装版本为最新。**
|
package/README.zh-TW.md
CHANGED
|
@@ -143,7 +143,6 @@ vct <COMMAND> [OPTIONS]
|
|
|
143
143
|
Commands:
|
|
144
144
|
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
145
145
|
usage Display token usage statistics
|
|
146
|
-
statusline Cache Claude Code rate limits from a statusLine hook (stdin JSON)
|
|
147
146
|
version Display version information
|
|
148
147
|
update Update to the latest version from GitHub releases
|
|
149
148
|
help Print this message or the help of the given subcommand(s)
|
|
@@ -236,7 +235,7 @@ vct usage --json --daily
|
|
|
236
235
|
|
|
237
236
|
### 即時額度面板
|
|
238
237
|
|
|
239
|
-
|
|
238
|
+
`vct usage` 會**在儀表板中直接顯示 Claude Code 與 Codex 的即時剩餘額度——完全零設定。** 不需要 status-line hook,也不需要設定檔:vct 會讀取各 provider 自己的 OAuth 憑證,在背景執行緒呼叫其用量 API,並在你工作時讓面板保持最新。
|
|
240
239
|
|
|
241
240
|
```
|
|
242
241
|
┌ Provider/Tokens/Cost/Days ┬ Claude ────────┬ Codex ──────────┐
|
|
@@ -247,10 +246,14 @@ vct usage --json --daily
|
|
|
247
246
|
└───────────────────────────┴────────────────┴─────────────────┘
|
|
248
247
|
```
|
|
249
248
|
|
|
250
|
-
- **Claude** — 5
|
|
251
|
-
- **Codex** — 方案類型、5
|
|
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)`)。
|
|
252
251
|
|
|
253
|
-
|
|
252
|
+
**自動刷新 token。** 對這兩個 provider,當 token 接近過期或被拒絕時,vct 會刷新它並把新的 token 寫回該 provider 自己的憑證檔案(採用該 CLI 的原始格式),因此 token 會在多次檢查之間重複使用,而不是每次都重新刷新。如果刷新失敗,面板會顯示 `run: <provider> auth login` 提示,而不會直接中斷。
|
|
253
|
+
|
|
254
|
+
只有在某個 provider 的憑證存在時,才會顯示對應的面板。額度面板僅在互動式 TUI 中顯示;`--table`、`--text`、`--json` 不受影響。
|
|
255
|
+
|
|
256
|
+
> **平台說明:** 在 macOS 上,Claude Code 會把 OAuth 憑證儲存在系統 Keychain 中,而不是 `~/.claude/.credentials.json`,因此在 macOS 上不會顯示 Claude 面板。
|
|
254
257
|
|
|
255
258
|
---
|
|
256
259
|
|
|
@@ -324,35 +327,6 @@ vct analysis --output today.json --daily
|
|
|
324
327
|
|
|
325
328
|
---
|
|
326
329
|
|
|
327
|
-
## Statusline 指令
|
|
328
|
-
|
|
329
|
-
**將 Claude Code 的額度資訊接入 `usage` 儀表板。**
|
|
330
|
-
|
|
331
|
-
Claude Code 僅透過 `statusLine` hook 的 stdin JSON 暴露其 5 小時 / 每週額度,因此 `vct` 從那裡擷取並快取到 `~/.vibe_coding_tracker/claude_rate_limits.json`,供 Claude 額度面板讀取。
|
|
332
|
-
|
|
333
|
-
### 如果你已有 statusLine
|
|
334
|
-
|
|
335
|
-
在現有 statusLine 腳本中加一行背景指令。它對目前顯示零影響,且相互隔離,vct 出錯也絕不會干擾 statusLine:
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
printf '%s' "$input" | vct statusline ingest >/dev/null 2>&1 &
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### 如果你還沒有 statusLine
|
|
342
|
-
|
|
343
|
-
讓 Claude Code 的 `~/.claude/settings.json` 直接指向 vct,它會快取額度並印出一行精簡狀態:
|
|
344
|
-
|
|
345
|
-
```json
|
|
346
|
-
{
|
|
347
|
-
"statusLine": {
|
|
348
|
-
"type": "command",
|
|
349
|
-
"command": "vct statusline"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
---
|
|
355
|
-
|
|
356
330
|
## Update 指令
|
|
357
331
|
|
|
358
332
|
**自動保持安裝為最新版本。**
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mai0313/vct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.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",
|