@winston.wan/burn-your-money 2.1.0 → 2.1.1
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 +87 -54
- package/bash.exe.stackdump +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,55 +1,43 @@
|
|
|
1
1
|
# 💸 Burn Your Money
|
|
2
2
|
|
|
3
|
-
> **"Watch your bank account drain in real-time."**
|
|
4
3
|
> **"看着你的存款实时归零。"**
|
|
5
4
|
|
|
6
5
|

|
|
7
6
|

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
A **Claude Code** status line plugin that displays your token usage and costs in real-time. Because awareness is the first step towards pain.
|
|
12
7
|
|
|
13
8
|
一个为 **Claude Code** 准备的状态栏插件。它能让你实时看到每一秒花了多少钱——因为知情是痛苦的第一步。
|
|
14
9
|
|
|
15
10
|
---
|
|
16
11
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
Using Claude Code feels like coding with superpowers. It also feels like standing in front of a cash incinerator.
|
|
20
|
-
|
|
21
|
-
This plugin adds a simple, Anxiety-Inducing™ meter to your terminal:
|
|
22
|
-
- **Real-time Burn Rate**: See exactly how many tokens/sec you are wasting.
|
|
23
|
-
- **Session Cost**: Watch the dollars tick up while you debug that `undefined` error.
|
|
24
|
-
- **Total Damage**: A cumulative record of your poor financial decisions.
|
|
25
|
-
|
|
26
|
-
### 📸 Preview
|
|
12
|
+
## 📸 效果预览
|
|
27
13
|
|
|
28
14
|
```
|
|
29
|
-
[Claude 3.5 Sonnet]
|
|
15
|
+
[Claude 3.5 Sonnet] 今日:78.2K $0.47 🔥1.2K tok/s | 总计:285.1M $20.12
|
|
30
16
|
```
|
|
31
17
|
|
|
32
18
|
---
|
|
33
19
|
|
|
34
|
-
## 🔥 为什么要用?
|
|
20
|
+
## 🔥 为什么要用?
|
|
35
21
|
|
|
36
22
|
Claude Code 很好用,就像在你的命令行里装了一个核动力引擎。但是每次它思考的时候,我都仿佛听到了碎钞机的声音。
|
|
37
23
|
|
|
38
24
|
这就诞生了 **Burn Your Money**。它能在你的状态栏显示:
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
25
|
+
|
|
26
|
+
- **实时烧钱速度**:精准显示每秒烧掉多少 token,让你的每一次回车都充满罪恶感
|
|
27
|
+
- **今日战绩**:看看今天又给 Anthropic 贡献了几杯咖啡
|
|
28
|
+
- **历史总计**:累计伤害。建议心脏不好的人不要开启此功能
|
|
42
29
|
|
|
43
30
|
---
|
|
44
31
|
|
|
45
|
-
## 🚀
|
|
32
|
+
## 🚀 安装
|
|
33
|
+
|
|
34
|
+
### 方式 1: NPM 安装(推荐)
|
|
46
35
|
|
|
47
|
-
### Option 1: NPM (Recommended / 推荐)
|
|
48
36
|
```bash
|
|
49
37
|
npm install -g "@winston.wan/burn-your-money"
|
|
50
38
|
```
|
|
51
39
|
|
|
52
|
-
###
|
|
40
|
+
### 方式 2: 脚本安装
|
|
53
41
|
|
|
54
42
|
**Linux / macOS / Git Bash**
|
|
55
43
|
```bash
|
|
@@ -63,66 +51,111 @@ curl.exe -fsSL https://raw.githubusercontent.com/winston-wwzhen/burn-your-money/
|
|
|
63
51
|
|
|
64
52
|
---
|
|
65
53
|
|
|
66
|
-
##
|
|
54
|
+
## ⚙️ 配置
|
|
55
|
+
|
|
56
|
+
修改 `~/.claude/burn-your-money-config.json` 自定义你的痛苦程度:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"theme": "fire", // 主题: fire, ocean, forest, golden
|
|
61
|
+
"alert_daily": 10.0, // 每日预警金额(美元)
|
|
62
|
+
"show_burn_rate": true // 是否显示燃烧速度
|
|
63
|
+
}
|
|
64
|
+
```
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
### 主题说明
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
| 主题 | 风格 |
|
|
69
|
+
|------|------|
|
|
70
|
+
| `fire` | 红色火焰风格 |
|
|
71
|
+
| `ocean` | 蓝青海洋风格 |
|
|
72
|
+
| `forest` | 绿色森林风格 |
|
|
73
|
+
| `golden` | 金色奢华风格 |
|
|
71
74
|
|
|
72
75
|
---
|
|
73
76
|
|
|
74
|
-
##
|
|
77
|
+
## 📊 使用命令
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
修改配置文件来自定义你的痛苦程度。
|
|
79
|
+
### CLI 命令
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
安装后可以在终端使用 `burn-your-money` 命令:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
burn-your-money status # 查看完整状态
|
|
85
|
+
burn-your-money theme ocean # 切换主题
|
|
86
|
+
burn-your-money alert 20 # 设置每日预警金额
|
|
87
|
+
burn-your-money chart # 显示趋势图表
|
|
88
|
+
burn-your-money today # 今日统计
|
|
89
|
+
burn-your-money week # 本周统计
|
|
90
|
+
burn-your-money month # 本月统计
|
|
91
|
+
burn-your-money total # 总计统计
|
|
85
92
|
```
|
|
86
93
|
|
|
94
|
+
### Claude Code 内置命令
|
|
95
|
+
|
|
96
|
+
在 Claude Code 对话中可以直接使用:
|
|
97
|
+
|
|
98
|
+
| 命令 | 说明 |
|
|
99
|
+
|------|------|
|
|
100
|
+
| `/burn-your-money-stats` | 查看 token 使用趋势图 |
|
|
101
|
+
| `/burn-your-money-today` | 查看今日 token 使用情况 |
|
|
102
|
+
| `/burn-your-money-week` | 查看本周 token 使用情况 |
|
|
103
|
+
| `/burn-your-money-month` | 查看本月 token 使用情况 |
|
|
104
|
+
| `/burn-your-money-export` | 导出 token 数据(JSON 格式) |
|
|
105
|
+
| `/burn-your-money-export-csv` | 导出 token 数据(CSV 格式) |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 🛠️ 性能说明
|
|
110
|
+
|
|
111
|
+
我们深知现在的 API 有多贵,所以本插件**绝不**发起任何网络请求。所有数据纯本地计算,它只烧你的钱,不烧你的 CPU。
|
|
112
|
+
|
|
87
113
|
---
|
|
88
114
|
|
|
89
|
-
##
|
|
115
|
+
## 📋 常见问题
|
|
90
116
|
|
|
91
|
-
1.
|
|
92
|
-
This plugin includes **all token types** (input, output, and cache-read tokens) in its statistics. Claude Code's built-in `/stats` command may only display "full-price" tokens (input + output), excluding cache-read tokens which receive a 90% discount.
|
|
117
|
+
### 1. Token 统计和 `/stats` 不一致?
|
|
93
118
|
|
|
94
|
-
|
|
119
|
+
本插件统计**包含所有类型的 token**(输入、输出、缓存读取)。Claude Code 内置的 `/stats` 命令可能只显示"完整价格"的 tokens(输入 + 输出),不包含享受 90% 折扣的缓存读取 tokens。
|
|
95
120
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
121
|
+
示例对比:
|
|
122
|
+
- 本插件:`3.93B tokens`(包含缓存)
|
|
123
|
+
- `/stats`:`188M tokens`(不含缓存)
|
|
99
124
|
|
|
100
|
-
2.
|
|
101
|
-
The *historical* cost calculation (in `Total` and `History`) uses a fixed rate estimate (based on Sonnet 3.5). If you frequently switch between Haiku/Opus, the historical dollar amount might be slightly off. (Real-time session cost is always accurate though!)
|
|
102
|
-
*历史*费用统计基于固定费率估算。如果你经常切换不同模型,历史总金额可能不完全准确。(但当前会话的实时扣费是绝对准的!)
|
|
125
|
+
### 2. 费用计算准确吗?
|
|
103
126
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
127
|
+
- **当前会话费用**:完全准确,使用 Claude Code 提供的实时数据
|
|
128
|
+
- **历史费用统计**:基于固定费率估算(Input $3/M, Output $15/M, Cache Read $0.3/M),如果频繁切换不同模型,可能略有偏差
|
|
129
|
+
|
|
130
|
+
### 3. Windows 上出现 fork 错误?
|
|
131
|
+
|
|
132
|
+
这是 Git Bash 和 Windows Defender 的兼容性问题。运行以下脚本修复:
|
|
133
|
+
|
|
134
|
+
```powershell
|
|
135
|
+
# 以管理员身份运行 PowerShell
|
|
136
|
+
.\fix-git-bash.ps1
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
或手动将以下目录添加到 Windows Defender 排除列表:
|
|
140
|
+
- `C:\Program Files\Git`
|
|
141
|
+
- `%USERPROFILE%\.claude`
|
|
107
142
|
|
|
108
143
|
---
|
|
109
144
|
|
|
110
|
-
##
|
|
145
|
+
## 🗑️ 卸载
|
|
111
146
|
|
|
112
|
-
If the truth is too painful:
|
|
113
147
|
如果现实太过沉重:
|
|
114
148
|
|
|
115
149
|
```bash
|
|
116
150
|
npm uninstall -g @winston.wan/burn-your-money
|
|
117
|
-
# Then restart Claude Code / 然后重启 Claude Code
|
|
118
151
|
```
|
|
119
152
|
|
|
153
|
+
然后重启 Claude Code。
|
|
154
|
+
|
|
120
155
|
---
|
|
121
156
|
|
|
122
|
-
## 😄
|
|
157
|
+
## 😄 免责声明
|
|
123
158
|
|
|
124
|
-
This plugin does not actually reduce your token usage. It only increases your blood pressure.
|
|
125
159
|
本插件并不能通过任何技术手段减少你的 Token 消耗,它只能(显著地)升高你的血压。
|
|
126
160
|
|
|
127
|
-
**Enjoy the burn. 🔥**
|
|
128
161
|
**享受燃烧的感觉吧。🔥**
|
package/bash.exe.stackdump
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Stack trace:
|
|
2
2
|
Frame Function Args
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
0007FFFFBA30 00021005FE8E (000210285F68, 00021026AB6E, 000000000000, 0007FFFFA930) msys-2.0.dll+0x1FE8E
|
|
4
|
+
0007FFFFBA30 0002100467F9 (000000000000, 000000000000, 000000000000, 0007FFFFBD08) msys-2.0.dll+0x67F9
|
|
5
|
+
0007FFFFBA30 000210046832 (000210286019, 0007FFFFB8E8, 000000000000, 000000000000) msys-2.0.dll+0x6832
|
|
6
|
+
0007FFFFBA30 000210068CF6 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x28CF6
|
|
7
|
+
0007FFFFBA30 000210068E24 (0007FFFFBA40, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x28E24
|
|
8
|
+
0007FFFFBD10 00021006A225 (0007FFFFBA40, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x2A225
|
|
9
9
|
End of stack trace
|
|
10
10
|
Loaded modules:
|
|
11
11
|
000100400000 bash.exe
|
|
@@ -13,8 +13,8 @@ Loaded modules:
|
|
|
13
13
|
7FFAC7620000 KERNEL32.DLL
|
|
14
14
|
7FFAC57F0000 KERNELBASE.dll
|
|
15
15
|
7FFAC7C30000 USER32.dll
|
|
16
|
-
7FFAC54F0000 win32u.dll
|
|
17
16
|
000210040000 msys-2.0.dll
|
|
17
|
+
7FFAC54F0000 win32u.dll
|
|
18
18
|
7FFAC74C0000 GDI32.dll
|
|
19
19
|
7FFAC5EA0000 gdi32full.dll
|
|
20
20
|
7FFAC5CA0000 msvcp_win.dll
|