@mai0313/vct 0.5.11 → 0.5.12
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 +103 -40
- package/README.zh-CN.md +150 -87
- package/README.zh-TW.md +159 -96
- 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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
**Track your AI coding costs in real-time.** Vibe Coding Tracker is a
|
|
20
|
+
**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, and Gemini usage — with detailed cost breakdowns, token statistics, and code operation insights, all while keeping CPU and memory usage minimal.
|
|
21
21
|
|
|
22
22
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
|
|
23
23
|
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
|
|
32
32
|
Stop wondering how much your AI coding sessions cost. Get **real-time cost tracking** with automatic pricing updates from [LiteLLM](https://github.com/BerriAI/litellm).
|
|
33
33
|
|
|
34
|
+
### 🪶 Ultra-Lightweight
|
|
35
|
+
|
|
36
|
+
Built with Rust for minimal resource footprint. The interactive TUI dashboard runs at **~3-5% CPU** and **~140 MB memory** even while processing millions of tokens across multiple providers — no Electron, no bloated runtimes.
|
|
37
|
+
|
|
34
38
|
### 📊 Beautiful Visualizations
|
|
35
39
|
|
|
36
40
|
Choose your preferred view:
|
|
@@ -42,29 +46,29 @@ Choose your preferred view:
|
|
|
42
46
|
|
|
43
47
|
### 🚀 Zero Configuration
|
|
44
48
|
|
|
45
|
-
Automatically detects and processes logs from Claude Code, Codex, Copilot, and Gemini. No setup required—just run and analyze.
|
|
49
|
+
Automatically detects and processes logs from Claude Code, Codex, Copilot, and Gemini. No setup required — just run and analyze.
|
|
46
50
|
|
|
47
51
|
### 🎨 Rich Insights
|
|
48
52
|
|
|
49
53
|
- Token usage by model and date
|
|
50
|
-
- Cost breakdown by cache types
|
|
51
|
-
- File operations tracking
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
+
- Cost breakdown by cache types (read / create)
|
|
55
|
+
- File operations tracking (edit, read, write lines)
|
|
56
|
+
- Tool call history (Bash, Edit, Read, Write, TodoWrite)
|
|
57
|
+
- Per-provider daily averages
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
57
61
|
## ✨ Key Features
|
|
58
62
|
|
|
59
|
-
| Feature
|
|
60
|
-
|
|
|
61
|
-
| 🤖 **
|
|
62
|
-
| 💵 **Smart Pricing**
|
|
63
|
-
| 🎨 **4 Display Modes**
|
|
64
|
-
| 📈 **
|
|
65
|
-
|
|
|
66
|
-
| 🔄 **Live Updates**
|
|
67
|
-
| 💾 **Efficient Caching**
|
|
63
|
+
| Feature | Description |
|
|
64
|
+
| ------------------------ | -------------------------------------------------------------- |
|
|
65
|
+
| 🤖 **Multi-Provider** | Claude Code, Codex, Copilot, and Gemini — all in one place |
|
|
66
|
+
| 💵 **Smart Pricing** | Fuzzy model matching + daily cache from LiteLLM |
|
|
67
|
+
| 🎨 **4 Display Modes** | Interactive TUI, static table, plain text, and JSON |
|
|
68
|
+
| 📈 **Dual Analysis** | Token/cost stats (`usage`) + code operation stats (`analysis`) |
|
|
69
|
+
| 🪶 **Ultra-Lightweight** | ~3-5% CPU, ~140 MB RAM — built with Rust |
|
|
70
|
+
| 🔄 **Live Updates** | Real-time dashboard refreshes every second |
|
|
71
|
+
| 💾 **Efficient Caching** | Smart daily cache reduces API calls |
|
|
68
72
|
|
|
69
73
|
---
|
|
70
74
|
|
|
@@ -114,14 +118,14 @@ cargo install vibe_coding_tracker
|
|
|
114
118
|
### First Run
|
|
115
119
|
|
|
116
120
|
```bash
|
|
117
|
-
# View your usage with the
|
|
121
|
+
# View your usage with the interactive dashboard
|
|
118
122
|
vct usage
|
|
119
123
|
|
|
120
124
|
# Or run the binary built by Cargo/pip
|
|
121
125
|
vibe_coding_tracker usage
|
|
122
126
|
|
|
123
|
-
# Analyze
|
|
124
|
-
|
|
127
|
+
# Analyze code operations across all sessions
|
|
128
|
+
vct analysis
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
---
|
|
@@ -130,16 +134,16 @@ vibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl
|
|
|
130
134
|
|
|
131
135
|
### 🔍 Quick Reference
|
|
132
136
|
|
|
133
|
-
```
|
|
137
|
+
```
|
|
134
138
|
vct <COMMAND> [OPTIONS]
|
|
135
139
|
# Replace with `vibe_coding_tracker` if you are using the full binary name
|
|
136
140
|
|
|
137
141
|
Commands:
|
|
138
|
-
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
139
|
-
usage Display token usage statistics
|
|
140
|
-
version Display version information
|
|
141
|
-
update Update to the latest version from GitHub releases
|
|
142
|
-
help Print this message or the help of the given subcommand(s)
|
|
142
|
+
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
143
|
+
usage Display token usage statistics
|
|
144
|
+
version Display version information
|
|
145
|
+
update Update to the latest version from GitHub releases
|
|
146
|
+
help Print this message or the help of the given subcommand(s)
|
|
143
147
|
```
|
|
144
148
|
|
|
145
149
|
---
|
|
@@ -164,9 +168,36 @@ vct usage --text
|
|
|
164
168
|
vct usage --json
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
###
|
|
171
|
+
### Preview: Interactive Dashboard (`vct usage`)
|
|
168
172
|
|
|
169
|
-
|
|
173
|
+
```
|
|
174
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
175
|
+
│ 📊 Token Usage Statistics │
|
|
176
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
177
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
178
|
+
│ Model Input Output Cache Read Cache Create Total Cost │
|
|
179
|
+
│ │
|
|
180
|
+
│ claude-haiku-4-5-20251001 5,567 19,769 4,627,938 619,816 $1.34 │
|
|
181
|
+
│ claude-opus-4-6 25,651 179,066 40,830,154 2,572,258 $77.59 │
|
|
182
|
+
│ gemini-3.1-pro-preview 129,115 10,339 67,385 0 $0.40 │
|
|
183
|
+
│ TOTAL 160,333 209,174 45,525,477 3,192,074 $79.33 │
|
|
184
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
185
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
186
|
+
│ Provider Tokens / Day Cost / Day Active Days │
|
|
187
|
+
│ │
|
|
188
|
+
│ 🤖 Claude Code 16,293,406 $26.31 3 │
|
|
189
|
+
│ ✨ Gemini 206,839 $0.40 1 │
|
|
190
|
+
│ ⭐ All Providers 16,362,353 $26.44 3 │
|
|
191
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
192
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
193
|
+
│ 💰 Total: $79.33 | 🔢 Tokens: 49,087,058 | 📊 Models: 3 | ⚡ CPU: 4.6% | 🧠 Mem: 148 MB │
|
|
194
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
195
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### What It Scans
|
|
199
|
+
|
|
200
|
+
The tool automatically scans these directories:
|
|
170
201
|
|
|
171
202
|
- `~/.claude/projects/*.jsonl` (Claude Code)
|
|
172
203
|
- `~/.codex/sessions/*.jsonl` (Codex)
|
|
@@ -177,33 +208,57 @@ The tool scans these directories automatically:
|
|
|
177
208
|
|
|
178
209
|
## 📊 Analysis Command
|
|
179
210
|
|
|
180
|
-
**Deep dive into
|
|
211
|
+
**Deep dive into code operations — see exactly what your AI assistant did.**
|
|
181
212
|
|
|
182
213
|
### Basic Usage
|
|
183
214
|
|
|
184
215
|
```bash
|
|
185
|
-
#
|
|
186
|
-
vct analysis --path ~/.claude/projects/session.jsonl
|
|
187
|
-
|
|
188
|
-
# Single file: Save to file
|
|
189
|
-
vct analysis --path ~/.claude/projects/session.jsonl --output report.json
|
|
190
|
-
|
|
191
|
-
# Batch: Analyze all sessions with interactive table (default)
|
|
216
|
+
# Interactive dashboard for all sessions (default)
|
|
192
217
|
vct analysis
|
|
193
218
|
|
|
194
|
-
#
|
|
219
|
+
# Static table output with daily averages
|
|
195
220
|
vct analysis --table
|
|
196
221
|
|
|
197
|
-
#
|
|
198
|
-
vct analysis --
|
|
222
|
+
# Analyze a single conversation file
|
|
223
|
+
vct analysis --path ~/.claude/projects/session.jsonl
|
|
224
|
+
|
|
225
|
+
# Save results to JSON
|
|
226
|
+
vct analysis --output report.json
|
|
199
227
|
|
|
200
|
-
#
|
|
228
|
+
# Group results by provider
|
|
201
229
|
vct analysis --all
|
|
202
230
|
|
|
203
|
-
# Save
|
|
231
|
+
# Save grouped results
|
|
204
232
|
vct analysis --all --output grouped_report.json
|
|
205
233
|
```
|
|
206
234
|
|
|
235
|
+
### Preview: Interactive Dashboard (`vct analysis`)
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
239
|
+
│ 🔍 Analysis Statistics │
|
|
240
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
241
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
242
|
+
│ Model Edit Lines Read Lines Write Lines Bash Edit Read Write │
|
|
243
|
+
│ │
|
|
244
|
+
│ claude-haiku-4-5-20251001 0 0 0 43 0 59 0 │
|
|
245
|
+
│ claude-opus-4-6 1,280 13,264 1,575 82 146 209 62 │
|
|
246
|
+
│ gemini-3.1-pro-preview 0 0 0 0 0 0 0 │
|
|
247
|
+
│ TOTAL 1,280 13,264 1,575 125 146 268 62 │
|
|
248
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
249
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
250
|
+
│ Provider EditL/Day ReadL/Day WriteL/Day Bash/Day Edit/Day Read/Day Write/Day Days │
|
|
251
|
+
│ │
|
|
252
|
+
│ 🤖 Claude Code 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
253
|
+
│ ✨ Gemini 0 0 0 0.0 0.0 0.0 0.0 1 │
|
|
254
|
+
│ ⭐ All Providers 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
255
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
256
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
257
|
+
│ 📝 Lines: 16,119 | 🔧 Tools: 601 | 📊 Models: 3 | ⚡ CPU: 3.6% | 🧠 Mem: 140 MB │
|
|
258
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
259
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
260
|
+
```
|
|
261
|
+
|
|
207
262
|
---
|
|
208
263
|
|
|
209
264
|
## 🔄 Update Command
|
|
@@ -221,10 +276,18 @@ vct update --check
|
|
|
221
276
|
# Interactive update with confirmation
|
|
222
277
|
vct update
|
|
223
278
|
|
|
224
|
-
# Force update
|
|
279
|
+
# Force update — always downloads latest version
|
|
225
280
|
vct update --force
|
|
226
281
|
```
|
|
227
282
|
|
|
283
|
+
### Preview (`vct update --check`)
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
📋 Current version: v0.5.10
|
|
287
|
+
🔍 Checking for latest release...
|
|
288
|
+
✅ Latest version: v0.5.10 — you are up to date!
|
|
289
|
+
```
|
|
290
|
+
|
|
228
291
|
---
|
|
229
292
|
|
|
230
293
|
## 💡 Smart Pricing System
|
package/README.zh-CN.md
CHANGED
|
@@ -17,54 +17,58 @@
|
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**实时追踪你的 AI 编程开销。** Vibe Coding Tracker 是一款基于 Rust 构建的轻量级高性能 CLI 工具,用于监控和分析你在 Claude Code、Codex、Copilot 和 Gemini 上的使用情况——提供详细的费用明细、token 统计和代码操作洞察,同时保持极低的 CPU 和内存占用。
|
|
21
21
|
|
|
22
22
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
|
|
23
23
|
|
|
24
|
-
>
|
|
24
|
+
> 注意:CLI 示例中使用简写别名 `vct`。如果你是通过 npm/pip/cargo 安装的,二进制文件可能命名为 `vibe_coding_tracker` 或 `vct`。如有需要,请创建别名或在运行命令时将 `vct` 替换为完整名称。
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
28
|
## 🎯 为什么选择 Vibe Coding Tracker?
|
|
29
29
|
|
|
30
|
-
### 💰
|
|
30
|
+
### 💰 掌握你的开销
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
不用再猜测 AI 编程会话到底花了多少钱。通过 [LiteLLM](https://github.com/BerriAI/litellm) 自动更新定价,获取**实时费用追踪**。
|
|
33
|
+
|
|
34
|
+
### 🪶 超轻量级
|
|
35
|
+
|
|
36
|
+
使用 Rust 构建,资源占用极低。交互式 TUI 面板运行时仅需约 **3-5% CPU** 和约 **140 MB 内存**,即使处理来自多个供应商的数百万 token 也是如此——无需 Electron,无需臃肿的运行时。
|
|
33
37
|
|
|
34
38
|
### 📊 精美的可视化
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
选择你喜欢的查看方式:
|
|
37
41
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- **脚本友好**:纯文本和 JSON
|
|
41
|
-
-
|
|
42
|
+
- **交互式面板**:自动刷新的终端 UI,支持实时更新
|
|
43
|
+
- **静态报表**:专业的表格,适合文档记录
|
|
44
|
+
- **脚本友好**:纯文本和 JSON 格式,方便自动化
|
|
45
|
+
- **完整精度**:导出精确费用,满足财务核算需求
|
|
42
46
|
|
|
43
47
|
### 🚀 零配置
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
自动检测并处理来自 Claude Code、Codex、Copilot 和 Gemini 的日志。无需任何设置——直接运行即可分析。
|
|
46
50
|
|
|
47
51
|
### 🎨 丰富的洞察
|
|
48
52
|
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
53
|
+
- 按模型和日期统计 token 使用量
|
|
54
|
+
- 按 cache 类型(读取/创建)细分费用
|
|
55
|
+
- 文件操作追踪(编辑、读取、写入行数)
|
|
56
|
+
- 工具调用历史(Bash、Edit、Read、Write、TodoWrite)
|
|
57
|
+
- 按供应商统计每日平均值
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
57
61
|
## ✨ 核心特性
|
|
58
62
|
|
|
59
|
-
| 特性 |
|
|
60
|
-
| ------------------- |
|
|
61
|
-
| 🤖
|
|
62
|
-
| 💵 **智能定价** | 模糊模型匹配 +
|
|
63
|
-
| 🎨 **4 种显示模式** |
|
|
64
|
-
| 📈
|
|
65
|
-
|
|
|
66
|
-
| 🔄 **实时更新** |
|
|
67
|
-
| 💾 **高效缓存** |
|
|
63
|
+
| 特性 | 说明 |
|
|
64
|
+
| ------------------- | ----------------------------------------------------- |
|
|
65
|
+
| 🤖 **多供应商支持** | Claude Code、Codex、Copilot 和 Gemini——一站式管理 |
|
|
66
|
+
| 💵 **智能定价** | 模糊模型匹配 + 从 LiteLLM 每日缓存更新 |
|
|
67
|
+
| 🎨 **4 种显示模式** | 交互式 TUI、静态表格、纯文本和 JSON |
|
|
68
|
+
| 📈 **双维度分析** | token/费用统计(`usage`)+ 代码操作统计(`analysis`) |
|
|
69
|
+
| 🪶 **超轻量级** | 约 3-5% CPU、约 140 MB RAM——基于 Rust 构建 |
|
|
70
|
+
| 🔄 **实时更新** | 面板每秒自动刷新 |
|
|
71
|
+
| 💾 **高效缓存** | 智能每日缓存,减少 API 调用次数 |
|
|
68
72
|
|
|
69
73
|
---
|
|
70
74
|
|
|
@@ -72,40 +76,40 @@
|
|
|
72
76
|
|
|
73
77
|
### 安装
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
选择最适合你的安装方式:
|
|
76
80
|
|
|
77
|
-
> 👨💻
|
|
81
|
+
> 👨💻 **开发者**:如果你想从源码构建或参与项目开发,请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
|
78
82
|
|
|
79
|
-
####
|
|
83
|
+
#### 方式一:通过 npm 安装
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
**前置条件**:[Node.js](https://nodejs.org/) v22 或更高版本
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
以下包名任选其一(内容完全相同):
|
|
84
88
|
|
|
85
89
|
```bash
|
|
86
|
-
#
|
|
90
|
+
# Main package
|
|
87
91
|
npm install -g vibe-coding-tracker
|
|
88
92
|
|
|
89
|
-
#
|
|
93
|
+
# Short alias with scope
|
|
90
94
|
npm install -g @mai0313/vct
|
|
91
95
|
|
|
92
|
-
#
|
|
96
|
+
# Full name with scope
|
|
93
97
|
npm install -g @mai0313/vibe-coding-tracker
|
|
94
98
|
```
|
|
95
99
|
|
|
96
|
-
####
|
|
100
|
+
#### 方式二:通过 PyPI 安装
|
|
97
101
|
|
|
98
|
-
|
|
102
|
+
**前置条件**:Python 3.8 或更高版本
|
|
99
103
|
|
|
100
104
|
```bash
|
|
101
105
|
pip install vibe_coding_tracker
|
|
102
|
-
#
|
|
106
|
+
# Or with uv
|
|
103
107
|
uv pip install vibe_coding_tracker
|
|
104
108
|
```
|
|
105
109
|
|
|
106
|
-
####
|
|
110
|
+
#### 方式三:通过 crates.io 安装
|
|
107
111
|
|
|
108
|
-
使用 Cargo 从 Rust
|
|
112
|
+
使用 Cargo 从 Rust 官方包注册中心安装:
|
|
109
113
|
|
|
110
114
|
```bash
|
|
111
115
|
cargo install vibe_coding_tracker
|
|
@@ -114,14 +118,14 @@ cargo install vibe_coding_tracker
|
|
|
114
118
|
### 首次运行
|
|
115
119
|
|
|
116
120
|
```bash
|
|
117
|
-
#
|
|
121
|
+
# View your usage with the interactive dashboard
|
|
118
122
|
vct usage
|
|
119
123
|
|
|
120
|
-
#
|
|
124
|
+
# Or run the binary built by Cargo/pip
|
|
121
125
|
vibe_coding_tracker usage
|
|
122
126
|
|
|
123
|
-
#
|
|
124
|
-
|
|
127
|
+
# Analyze code operations across all sessions
|
|
128
|
+
vct analysis
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
---
|
|
@@ -130,43 +134,70 @@ vibe_coding_tracker analysis --path ~/.claude/projects/session.jsonl
|
|
|
130
134
|
|
|
131
135
|
### 🔍 快速参考
|
|
132
136
|
|
|
133
|
-
```
|
|
134
|
-
vct
|
|
135
|
-
#
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
analysis
|
|
139
|
-
usage
|
|
140
|
-
version
|
|
141
|
-
update
|
|
142
|
-
help
|
|
137
|
+
```
|
|
138
|
+
vct <COMMAND> [OPTIONS]
|
|
139
|
+
# Replace with `vibe_coding_tracker` if you are using the full binary name
|
|
140
|
+
|
|
141
|
+
Commands:
|
|
142
|
+
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
143
|
+
usage Display token usage statistics
|
|
144
|
+
version Display version information
|
|
145
|
+
update Update to the latest version from GitHub releases
|
|
146
|
+
help Print this message or the help of the given subcommand(s)
|
|
143
147
|
```
|
|
144
148
|
|
|
145
149
|
---
|
|
146
150
|
|
|
147
151
|
## 💰 Usage 命令
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
**追踪你在所有 AI 编程会话中的开销。**
|
|
150
154
|
|
|
151
155
|
### 基本用法
|
|
152
156
|
|
|
153
157
|
```bash
|
|
154
|
-
#
|
|
158
|
+
# Interactive dashboard (recommended)
|
|
155
159
|
vct usage
|
|
156
160
|
|
|
157
|
-
#
|
|
161
|
+
# Static table for reports
|
|
158
162
|
vct usage --table
|
|
159
163
|
|
|
160
|
-
#
|
|
164
|
+
# Plain text for scripts
|
|
161
165
|
vct usage --text
|
|
162
166
|
|
|
163
|
-
# JSON
|
|
167
|
+
# JSON for data processing
|
|
164
168
|
vct usage --json
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
###
|
|
171
|
+
### 预览:交互式面板(`vct usage`)
|
|
168
172
|
|
|
169
|
-
|
|
173
|
+
```
|
|
174
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
175
|
+
│ 📊 Token Usage Statistics │
|
|
176
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
177
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
178
|
+
│ Model Input Output Cache Read Cache Create Total Cost │
|
|
179
|
+
│ │
|
|
180
|
+
│ claude-haiku-4-5-20251001 5,567 19,769 4,627,938 619,816 $1.34 │
|
|
181
|
+
│ claude-opus-4-6 25,651 179,066 40,830,154 2,572,258 $77.59 │
|
|
182
|
+
│ gemini-3.1-pro-preview 129,115 10,339 67,385 0 $0.40 │
|
|
183
|
+
│ TOTAL 160,333 209,174 45,525,477 3,192,074 $79.33 │
|
|
184
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
185
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
186
|
+
│ Provider Tokens / Day Cost / Day Active Days │
|
|
187
|
+
│ │
|
|
188
|
+
│ 🤖 Claude Code 16,293,406 $26.31 3 │
|
|
189
|
+
│ ✨ Gemini 206,839 $0.40 1 │
|
|
190
|
+
│ ⭐ All Providers 16,362,353 $26.44 3 │
|
|
191
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
192
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
193
|
+
│ 💰 Total: $79.33 | 🔢 Tokens: 49,087,058 | 📊 Models: 3 | ⚡ CPU: 4.6% | 🧠 Mem: 148 MB │
|
|
194
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
195
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 扫描范围
|
|
199
|
+
|
|
200
|
+
该工具会自动扫描以下目录:
|
|
170
201
|
|
|
171
202
|
- `~/.claude/projects/*.jsonl`(Claude Code)
|
|
172
203
|
- `~/.codex/sessions/*.jsonl`(Codex)
|
|
@@ -177,84 +208,116 @@ vct usage --json
|
|
|
177
208
|
|
|
178
209
|
## 📊 Analysis 命令
|
|
179
210
|
|
|
180
|
-
|
|
211
|
+
**深入了解代码操作——查看你的 AI 助手到底做了什么。**
|
|
181
212
|
|
|
182
213
|
### 基本用法
|
|
183
214
|
|
|
184
215
|
```bash
|
|
185
|
-
#
|
|
186
|
-
vct analysis --path ~/.claude/projects/session.jsonl
|
|
187
|
-
|
|
188
|
-
# 单文件:保存到文件
|
|
189
|
-
vct analysis --path ~/.claude/projects/session.jsonl --output report.json
|
|
190
|
-
|
|
191
|
-
# 批量:使用交互式表格分析所有会话(默认)
|
|
216
|
+
# Interactive dashboard for all sessions (default)
|
|
192
217
|
vct analysis
|
|
193
218
|
|
|
194
|
-
#
|
|
219
|
+
# Static table output with daily averages
|
|
195
220
|
vct analysis --table
|
|
196
221
|
|
|
197
|
-
#
|
|
198
|
-
vct analysis --
|
|
222
|
+
# Analyze a single conversation file
|
|
223
|
+
vct analysis --path ~/.claude/projects/session.jsonl
|
|
224
|
+
|
|
225
|
+
# Save results to JSON
|
|
226
|
+
vct analysis --output report.json
|
|
199
227
|
|
|
200
|
-
#
|
|
228
|
+
# Group results by provider
|
|
201
229
|
vct analysis --all
|
|
202
230
|
|
|
203
|
-
#
|
|
231
|
+
# Save grouped results
|
|
204
232
|
vct analysis --all --output grouped_report.json
|
|
205
233
|
```
|
|
206
234
|
|
|
235
|
+
### 预览:交互式面板(`vct analysis`)
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
239
|
+
│ 🔍 Analysis Statistics │
|
|
240
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
241
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
242
|
+
│ Model Edit Lines Read Lines Write Lines Bash Edit Read Write │
|
|
243
|
+
│ │
|
|
244
|
+
│ claude-haiku-4-5-20251001 0 0 0 43 0 59 0 │
|
|
245
|
+
│ claude-opus-4-6 1,280 13,264 1,575 82 146 209 62 │
|
|
246
|
+
│ gemini-3.1-pro-preview 0 0 0 0 0 0 0 │
|
|
247
|
+
│ TOTAL 1,280 13,264 1,575 125 146 268 62 │
|
|
248
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
249
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
250
|
+
│ Provider EditL/Day ReadL/Day WriteL/Day Bash/Day Edit/Day Read/Day Write/Day Days │
|
|
251
|
+
│ │
|
|
252
|
+
│ 🤖 Claude Code 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
253
|
+
│ ✨ Gemini 0 0 0 0.0 0.0 0.0 0.0 1 │
|
|
254
|
+
│ ⭐ All Providers 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
255
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
256
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
257
|
+
│ 📝 Lines: 16,119 | 🔧 Tools: 601 | 📊 Models: 3 | ⚡ CPU: 3.6% | 🧠 Mem: 140 MB │
|
|
258
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
259
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
260
|
+
```
|
|
261
|
+
|
|
207
262
|
---
|
|
208
263
|
|
|
209
264
|
## 🔄 Update 命令
|
|
210
265
|
|
|
211
266
|
**自动保持安装版本为最新。**
|
|
212
267
|
|
|
213
|
-
update 命令适用于**所有安装方式**(npm/pip/cargo
|
|
268
|
+
update 命令适用于**所有安装方式**(npm/pip/cargo/手动安装),它会直接从 GitHub releases 下载并替换二进制文件。
|
|
214
269
|
|
|
215
270
|
### 基本用法
|
|
216
271
|
|
|
217
272
|
```bash
|
|
218
|
-
#
|
|
273
|
+
# Check for updates
|
|
219
274
|
vct update --check
|
|
220
275
|
|
|
221
|
-
#
|
|
276
|
+
# Interactive update with confirmation
|
|
222
277
|
vct update
|
|
223
278
|
|
|
224
|
-
#
|
|
279
|
+
# Force update — always downloads latest version
|
|
225
280
|
vct update --force
|
|
226
281
|
```
|
|
227
282
|
|
|
283
|
+
### 预览(`vct update --check`)
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
📋 Current version: v0.5.10
|
|
287
|
+
🔍 Checking for latest release...
|
|
288
|
+
✅ Latest version: v0.5.10 — you are up to date!
|
|
289
|
+
```
|
|
290
|
+
|
|
228
291
|
---
|
|
229
292
|
|
|
230
293
|
## 💡 智能定价系统
|
|
231
294
|
|
|
232
|
-
###
|
|
295
|
+
### 工作原理
|
|
233
296
|
|
|
234
|
-
1. **自动更新**:每天从 [LiteLLM](https://github.com/BerriAI/litellm)
|
|
235
|
-
2.
|
|
236
|
-
3.
|
|
237
|
-
4.
|
|
297
|
+
1. **自动更新**:每天从 [LiteLLM](https://github.com/BerriAI/litellm) 获取最新定价
|
|
298
|
+
2. **智能缓存**:将定价信息存储在 `~/.vibe_coding_tracker/` 目录中,有效期 24 小时
|
|
299
|
+
3. **模糊匹配**:即使是自定义模型名称也能找到最佳匹配
|
|
300
|
+
4. **始终精确**:确保你获取到最新的定价信息
|
|
238
301
|
|
|
239
302
|
### 模型匹配
|
|
240
303
|
|
|
241
|
-
|
|
304
|
+
**优先级顺序**:
|
|
242
305
|
|
|
243
306
|
1. ✅ **精确匹配**:`claude-sonnet-4` → `claude-sonnet-4`
|
|
244
|
-
2. 🔄
|
|
245
|
-
3. 🔍
|
|
246
|
-
4. 🎯
|
|
247
|
-
5. 💵
|
|
307
|
+
2. 🔄 **标准化匹配**:`claude-sonnet-4-20250514` → `claude-sonnet-4`
|
|
308
|
+
3. 🔍 **子串匹配**:`custom-gpt-4` → `gpt-4`
|
|
309
|
+
4. 🎯 **模糊匹配(AI 驱动)**:使用 Jaro-Winkler 相似度算法(70% 阈值)
|
|
310
|
+
5. 💵 **兜底方案**:如果未找到匹配,显示 $0.00
|
|
248
311
|
|
|
249
312
|
---
|
|
250
313
|
|
|
251
314
|
## 🐳 Docker 支持
|
|
252
315
|
|
|
253
316
|
```bash
|
|
254
|
-
#
|
|
317
|
+
# Build image
|
|
255
318
|
docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
|
|
256
319
|
|
|
257
|
-
#
|
|
320
|
+
# Run with your sessions
|
|
258
321
|
docker run --rm \
|
|
259
322
|
-v ~/.claude:/root/.claude \
|
|
260
323
|
-v ~/.codex:/root/.codex \
|
package/README.zh-TW.md
CHANGED
|
@@ -17,54 +17,58 @@
|
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**即時追蹤你的 AI 程式設計花費。** Vibe Coding Tracker 是一款以 Rust 打造的輕量、高效能 CLI 工具,能監控與分析你在 Claude Code、Codex、Copilot 及 Gemini 的使用狀況——提供詳細的費用明細、token 統計資料與程式碼操作分析,同時維持極低的 CPU 與記憶體使用量。
|
|
21
21
|
|
|
22
22
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [简体中文](README.zh-CN.md)
|
|
23
23
|
|
|
24
|
-
>
|
|
24
|
+
> 注意:CLI 範例使用簡短別名 `vct`。如果你是透過 npm/pip/cargo 安裝,執行檔可能命名為 `vibe_coding_tracker` 或 `vct`。如有需要,請建立別名或在執行指令時將 `vct` 替換為完整名稱。
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
28
|
## 🎯 為什麼選擇 Vibe Coding Tracker?
|
|
29
29
|
|
|
30
|
-
### 💰
|
|
30
|
+
### 💰 掌握你的花費
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
不用再猜測 AI 程式設計工作階段花了多少錢。透過 [LiteLLM](https://github.com/BerriAI/litellm) 自動更新價格,取得**即時費用追蹤**。
|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### 🪶 超輕量
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
以 Rust 打造,資源佔用極低。互動式 TUI 儀表板僅需 **~3-5% CPU** 與 **~140 MB 記憶體**,即使處理來自多個供應商的數百萬 token 也不例外——不用 Electron,不用臃腫的執行環境。
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
### 📊 精美視覺化
|
|
39
|
+
|
|
40
|
+
選擇你偏好的檢視方式:
|
|
41
|
+
|
|
42
|
+
- **互動式儀表板**:自動更新的終端機 UI,即時顯示最新資訊
|
|
43
|
+
- **靜態報表**:專業的表格格式,適合撰寫文件
|
|
44
|
+
- **腳本友好**:純文字及 JSON 輸出,方便自動化處理
|
|
45
|
+
- **完整精度**:匯出精確費用供會計使用
|
|
42
46
|
|
|
43
47
|
### 🚀 零設定
|
|
44
48
|
|
|
45
|
-
自動偵測並處理 Claude Code、Codex、Copilot
|
|
49
|
+
自動偵測並處理 Claude Code、Codex、Copilot 及 Gemini 的日誌檔。不需要任何設定——直接執行就能分析。
|
|
46
50
|
|
|
47
|
-
### 🎨
|
|
51
|
+
### 🎨 豐富洞察
|
|
48
52
|
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
53
|
+
- 依模型與日期分類的 token 使用量
|
|
54
|
+
- 依 cache 類型(讀取 / 建立)的費用明細
|
|
55
|
+
- 檔案操作追蹤(編輯、讀取、寫入行數)
|
|
56
|
+
- 工具呼叫歷史(Bash、Edit、Read、Write、TodoWrite)
|
|
57
|
+
- 每個供應商的每日平均值
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
57
|
-
## ✨
|
|
61
|
+
## ✨ 主要功能
|
|
58
62
|
|
|
59
|
-
|
|
|
60
|
-
| ------------------- |
|
|
61
|
-
| 🤖
|
|
62
|
-
| 💵 **智慧定價** |
|
|
63
|
-
| 🎨 **4 種顯示模式** |
|
|
64
|
-
| 📈
|
|
65
|
-
|
|
|
66
|
-
| 🔄 **即時更新** |
|
|
67
|
-
| 💾 **高效快取** |
|
|
63
|
+
| 功能 | 說明 |
|
|
64
|
+
| ------------------- | --------------------------------------------------------- |
|
|
65
|
+
| 🤖 **多供應商支援** | Claude Code、Codex、Copilot 及 Gemini——一站整合 |
|
|
66
|
+
| 💵 **智慧定價** | 模糊模型比對 + 每日從 LiteLLM cache 更新 |
|
|
67
|
+
| 🎨 **4 種顯示模式** | 互動式 TUI、靜態表格、純文字及 JSON |
|
|
68
|
+
| 📈 **雙重分析** | Token / 費用統計(`usage`)+ 程式碼操作統計(`analysis`) |
|
|
69
|
+
| 🪶 **超輕量** | ~3-5% CPU、~140 MB RAM——以 Rust 打造 |
|
|
70
|
+
| 🔄 **即時更新** | 即時儀表板每秒自動刷新 |
|
|
71
|
+
| 💾 **高效快取** | 智慧每日 cache 減少 API 呼叫次數 |
|
|
68
72
|
|
|
69
73
|
---
|
|
70
74
|
|
|
@@ -72,40 +76,40 @@
|
|
|
72
76
|
|
|
73
77
|
### 安裝
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
選擇最適合你的安裝方式:
|
|
76
80
|
|
|
77
|
-
> 👨💻
|
|
81
|
+
> 👨💻 **開發者**:如果你想從原始碼建置或參與開發,請參閱 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
|
78
82
|
|
|
79
|
-
####
|
|
83
|
+
#### 方法一:透過 npm 安裝
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
**前置條件**:[Node.js](https://nodejs.org/) v22 或更高版本
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
選擇以下任一套件名稱(內容完全相同):
|
|
84
88
|
|
|
85
89
|
```bash
|
|
86
|
-
#
|
|
90
|
+
# Main package
|
|
87
91
|
npm install -g vibe-coding-tracker
|
|
88
92
|
|
|
89
|
-
#
|
|
93
|
+
# Short alias with scope
|
|
90
94
|
npm install -g @mai0313/vct
|
|
91
95
|
|
|
92
|
-
#
|
|
96
|
+
# Full name with scope
|
|
93
97
|
npm install -g @mai0313/vibe-coding-tracker
|
|
94
98
|
```
|
|
95
99
|
|
|
96
|
-
####
|
|
100
|
+
#### 方法二:透過 PyPI 安裝
|
|
97
101
|
|
|
98
|
-
|
|
102
|
+
**前置條件**:Python 3.8 或更高版本
|
|
99
103
|
|
|
100
104
|
```bash
|
|
101
105
|
pip install vibe_coding_tracker
|
|
102
|
-
#
|
|
106
|
+
# Or with uv
|
|
103
107
|
uv pip install vibe_coding_tracker
|
|
104
108
|
```
|
|
105
109
|
|
|
106
|
-
####
|
|
110
|
+
#### 方法三:透過 crates.io 安裝
|
|
107
111
|
|
|
108
|
-
使用 Cargo
|
|
112
|
+
使用 Cargo 從官方 Rust 套件倉庫安裝:
|
|
109
113
|
|
|
110
114
|
```bash
|
|
111
115
|
cargo install vibe_coding_tracker
|
|
@@ -114,59 +118,86 @@ cargo install vibe_coding_tracker
|
|
|
114
118
|
### 首次執行
|
|
115
119
|
|
|
116
120
|
```bash
|
|
117
|
-
#
|
|
121
|
+
# View your usage with the interactive dashboard
|
|
118
122
|
vct usage
|
|
119
123
|
|
|
120
|
-
#
|
|
124
|
+
# Or run the binary built by Cargo/pip
|
|
121
125
|
vibe_coding_tracker usage
|
|
122
126
|
|
|
123
|
-
#
|
|
124
|
-
|
|
127
|
+
# Analyze code operations across all sessions
|
|
128
|
+
vct analysis
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
---
|
|
128
132
|
|
|
129
|
-
## 📖
|
|
133
|
+
## 📖 指令指南
|
|
130
134
|
|
|
131
135
|
### 🔍 快速參考
|
|
132
136
|
|
|
133
|
-
```
|
|
134
|
-
vct
|
|
135
|
-
#
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
analysis
|
|
139
|
-
usage
|
|
140
|
-
version
|
|
141
|
-
update
|
|
142
|
-
help
|
|
137
|
+
```
|
|
138
|
+
vct <COMMAND> [OPTIONS]
|
|
139
|
+
# Replace with `vibe_coding_tracker` if you are using the full binary name
|
|
140
|
+
|
|
141
|
+
Commands:
|
|
142
|
+
analysis Analyze JSONL conversation files (single file or all sessions)
|
|
143
|
+
usage Display token usage statistics
|
|
144
|
+
version Display version information
|
|
145
|
+
update Update to the latest version from GitHub releases
|
|
146
|
+
help Print this message or the help of the given subcommand(s)
|
|
143
147
|
```
|
|
144
148
|
|
|
145
149
|
---
|
|
146
150
|
|
|
147
|
-
## 💰 Usage
|
|
151
|
+
## 💰 Usage 指令
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
**追蹤你在所有 AI 程式設計工作階段的花費。**
|
|
150
154
|
|
|
151
155
|
### 基本用法
|
|
152
156
|
|
|
153
157
|
```bash
|
|
154
|
-
#
|
|
158
|
+
# Interactive dashboard (recommended)
|
|
155
159
|
vct usage
|
|
156
160
|
|
|
157
|
-
#
|
|
161
|
+
# Static table for reports
|
|
158
162
|
vct usage --table
|
|
159
163
|
|
|
160
|
-
#
|
|
164
|
+
# Plain text for scripts
|
|
161
165
|
vct usage --text
|
|
162
166
|
|
|
163
|
-
# JSON
|
|
167
|
+
# JSON for data processing
|
|
164
168
|
vct usage --json
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
###
|
|
171
|
+
### 預覽:互動式儀表板(`vct usage`)
|
|
168
172
|
|
|
169
|
-
|
|
173
|
+
```
|
|
174
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
175
|
+
│ 📊 Token Usage Statistics │
|
|
176
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
177
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
178
|
+
│ Model Input Output Cache Read Cache Create Total Cost │
|
|
179
|
+
│ │
|
|
180
|
+
│ claude-haiku-4-5-20251001 5,567 19,769 4,627,938 619,816 $1.34 │
|
|
181
|
+
│ claude-opus-4-6 25,651 179,066 40,830,154 2,572,258 $77.59 │
|
|
182
|
+
│ gemini-3.1-pro-preview 129,115 10,339 67,385 0 $0.40 │
|
|
183
|
+
│ TOTAL 160,333 209,174 45,525,477 3,192,074 $79.33 │
|
|
184
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
185
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
186
|
+
│ Provider Tokens / Day Cost / Day Active Days │
|
|
187
|
+
│ │
|
|
188
|
+
│ 🤖 Claude Code 16,293,406 $26.31 3 │
|
|
189
|
+
│ ✨ Gemini 206,839 $0.40 1 │
|
|
190
|
+
│ ⭐ All Providers 16,362,353 $26.44 3 │
|
|
191
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
192
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
193
|
+
│ 💰 Total: $79.33 | 🔢 Tokens: 49,087,058 | 📊 Models: 3 | ⚡ CPU: 4.6% | 🧠 Mem: 148 MB │
|
|
194
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
195
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 掃描範圍
|
|
199
|
+
|
|
200
|
+
此工具會自動掃描以下目錄:
|
|
170
201
|
|
|
171
202
|
- `~/.claude/projects/*.jsonl`(Claude Code)
|
|
172
203
|
- `~/.codex/sessions/*.jsonl`(Codex)
|
|
@@ -175,86 +206,118 @@ vct usage --json
|
|
|
175
206
|
|
|
176
207
|
---
|
|
177
208
|
|
|
178
|
-
## 📊 Analysis
|
|
209
|
+
## 📊 Analysis 指令
|
|
179
210
|
|
|
180
|
-
|
|
211
|
+
**深入分析程式碼操作——精確掌握你的 AI 助手做了哪些事。**
|
|
181
212
|
|
|
182
213
|
### 基本用法
|
|
183
214
|
|
|
184
215
|
```bash
|
|
185
|
-
#
|
|
186
|
-
vct analysis --path ~/.claude/projects/session.jsonl
|
|
187
|
-
|
|
188
|
-
# 單檔案:儲存到檔案
|
|
189
|
-
vct analysis --path ~/.claude/projects/session.jsonl --output report.json
|
|
190
|
-
|
|
191
|
-
# 批次:使用互動式表格分析所有會話(預設)
|
|
216
|
+
# Interactive dashboard for all sessions (default)
|
|
192
217
|
vct analysis
|
|
193
218
|
|
|
194
|
-
#
|
|
219
|
+
# Static table output with daily averages
|
|
195
220
|
vct analysis --table
|
|
196
221
|
|
|
197
|
-
#
|
|
198
|
-
vct analysis --
|
|
222
|
+
# Analyze a single conversation file
|
|
223
|
+
vct analysis --path ~/.claude/projects/session.jsonl
|
|
224
|
+
|
|
225
|
+
# Save results to JSON
|
|
226
|
+
vct analysis --output report.json
|
|
199
227
|
|
|
200
|
-
#
|
|
228
|
+
# Group results by provider
|
|
201
229
|
vct analysis --all
|
|
202
230
|
|
|
203
|
-
#
|
|
231
|
+
# Save grouped results
|
|
204
232
|
vct analysis --all --output grouped_report.json
|
|
205
233
|
```
|
|
206
234
|
|
|
235
|
+
### 預覽:互動式儀表板(`vct analysis`)
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
239
|
+
│ 🔍 Analysis Statistics │
|
|
240
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
241
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
242
|
+
│ Model Edit Lines Read Lines Write Lines Bash Edit Read Write │
|
|
243
|
+
│ │
|
|
244
|
+
│ claude-haiku-4-5-20251001 0 0 0 43 0 59 0 │
|
|
245
|
+
│ claude-opus-4-6 1,280 13,264 1,575 82 146 209 62 │
|
|
246
|
+
│ gemini-3.1-pro-preview 0 0 0 0 0 0 0 │
|
|
247
|
+
│ TOTAL 1,280 13,264 1,575 125 146 268 62 │
|
|
248
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
249
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
250
|
+
│ Provider EditL/Day ReadL/Day WriteL/Day Bash/Day Edit/Day Read/Day Write/Day Days │
|
|
251
|
+
│ │
|
|
252
|
+
│ 🤖 Claude Code 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
253
|
+
│ ✨ Gemini 0 0 0 0.0 0.0 0.0 0.0 1 │
|
|
254
|
+
│ ⭐ All Providers 426.7 4421.3 525.0 41.7 48.7 89.3 20.7 3 │
|
|
255
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
256
|
+
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
257
|
+
│ 📝 Lines: 16,119 | 🔧 Tools: 601 | 📊 Models: 3 | ⚡ CPU: 3.6% | 🧠 Mem: 140 MB │
|
|
258
|
+
└─────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
259
|
+
Press 'q', 'Esc', 'Ctrl+C' to quit | Press 'r' to refresh
|
|
260
|
+
```
|
|
261
|
+
|
|
207
262
|
---
|
|
208
263
|
|
|
209
|
-
## 🔄 Update
|
|
264
|
+
## 🔄 Update 指令
|
|
210
265
|
|
|
211
|
-
|
|
266
|
+
**自動保持安裝為最新版本。**
|
|
212
267
|
|
|
213
|
-
|
|
268
|
+
Update 指令適用於**所有安裝方式**(npm/pip/cargo/手動安裝),透過直接從 GitHub releases 下載並替換執行檔來完成更新。
|
|
214
269
|
|
|
215
270
|
### 基本用法
|
|
216
271
|
|
|
217
272
|
```bash
|
|
218
|
-
#
|
|
273
|
+
# Check for updates
|
|
219
274
|
vct update --check
|
|
220
275
|
|
|
221
|
-
#
|
|
276
|
+
# Interactive update with confirmation
|
|
222
277
|
vct update
|
|
223
278
|
|
|
224
|
-
#
|
|
279
|
+
# Force update — always downloads latest version
|
|
225
280
|
vct update --force
|
|
226
281
|
```
|
|
227
282
|
|
|
283
|
+
### 預覽(`vct update --check`)
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
📋 Current version: v0.5.10
|
|
287
|
+
🔍 Checking for latest release...
|
|
288
|
+
✅ Latest version: v0.5.10 — you are up to date!
|
|
289
|
+
```
|
|
290
|
+
|
|
228
291
|
---
|
|
229
292
|
|
|
230
293
|
## 💡 智慧定價系統
|
|
231
294
|
|
|
232
|
-
###
|
|
295
|
+
### 運作方式
|
|
233
296
|
|
|
234
|
-
1.
|
|
235
|
-
2.
|
|
236
|
-
3.
|
|
237
|
-
4.
|
|
297
|
+
1. **自動更新**:每日從 [LiteLLM](https://github.com/BerriAI/litellm) 取得最新價格
|
|
298
|
+
2. **智慧快取**:將價格資料儲存於 `~/.vibe_coding_tracker/`,有效期 24 小時
|
|
299
|
+
3. **模糊比對**:即使是自訂模型名稱也能找到最佳配對
|
|
300
|
+
4. **始終精準**:確保你取得最新的定價資訊
|
|
238
301
|
|
|
239
|
-
###
|
|
302
|
+
### 模型比對
|
|
240
303
|
|
|
241
304
|
**優先順序**:
|
|
242
305
|
|
|
243
|
-
1. ✅
|
|
244
|
-
2. 🔄
|
|
245
|
-
3. 🔍
|
|
246
|
-
4. 🎯
|
|
247
|
-
5. 💵
|
|
306
|
+
1. ✅ **完全比對**:`claude-sonnet-4` → `claude-sonnet-4`
|
|
307
|
+
2. 🔄 **正規化比對**:`claude-sonnet-4-20250514` → `claude-sonnet-4`
|
|
308
|
+
3. 🔍 **子字串比對**:`custom-gpt-4` → `gpt-4`
|
|
309
|
+
4. 🎯 **模糊比對(AI 驅動)**:使用 Jaro-Winkler 相似度(70% 門檻值)
|
|
310
|
+
5. 💵 **備援方案**:若無法配對則顯示 $0.00
|
|
248
311
|
|
|
249
312
|
---
|
|
250
313
|
|
|
251
314
|
## 🐳 Docker 支援
|
|
252
315
|
|
|
253
316
|
```bash
|
|
254
|
-
#
|
|
317
|
+
# Build image
|
|
255
318
|
docker build -f docker/Dockerfile --target prod -t vibe_coding_tracker:latest .
|
|
256
319
|
|
|
257
|
-
#
|
|
320
|
+
# Run with your sessions
|
|
258
321
|
docker run --rm \
|
|
259
322
|
-v ~/.claude:/root/.claude \
|
|
260
323
|
-v ~/.codex:/root/.codex \
|
|
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.5.
|
|
3
|
+
"version": "0.5.12",
|
|
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",
|