minimax-status 1.0.5 → 1.0.7

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Jochen Yang
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jochen Yang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,273 +1,273 @@
1
- # MiniMax StatusBar
2
-
3
- [![npm version](https://img.shields.io/npm/v/minimax-status.svg)](https://www.npmjs.com/package/minimax-status)
4
- [![npm downloads](https://img.shields.io/npm/dm/minimax-status.svg)](https://www.npmjs.com/package/minimax-status)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![VSCode Extension Build](https://github.com/JochenYang/minimax-status/actions/workflows/build-vscode-extension.yml/badge.svg)](https://github.com/JochenYang/minimax-status/actions/workflows/build-vscode-extension.yml)
7
-
8
- MiniMax coding-plan 使用状态监控工具,支持 CLI 命令和 Claude Code 状态栏集成。
9
-
10
- ![MiniMax StatusBar](https://img.shields.io/badge/StatusBar-MiniMax-blue?style=flat-square)
11
-
12
- ## 特性
13
-
14
- - ✅ **实时状态监控**: 显示 MiniMax coding-plan 使用额度、剩余次数、重置时间
15
- - ✅ **多种显示模式**: 详细模式、紧凑模式、持续状态栏
16
- - ✅ **Claude Code 集成**: 可在 Claude Code 底部状态栏显示
17
- - ✅ **智能颜色编码**: 根据使用率自动切换颜色和图标
18
- - ✅ **简洁命令**: `minimax status` 查看状态
19
- - ✅ **安全存储**: 凭据存储在独立的配置文件中
20
-
21
- ## 快速开始
22
-
23
- ### 1. 安装
24
-
25
- ```bash
26
- npm install -g minimax-status
27
- ```
28
-
29
- ### 2. 配置认证
30
-
31
- ```bash
32
- minimax auth <token> <groupId>
33
- ```
34
-
35
- 配置信息将保存在 `~/.minimax-config.json` 文件中。
36
-
37
- 获取令牌和组 ID:
38
-
39
- 1. 访问 [MiniMax 开放平台](https://platform.minimaxi.com/user-center/payment/coding-plan)
40
- 2. 登录并进入控制台
41
- 3. 账户信息中复制 groupID
42
- 4. Coding Plan 中创建或获取 API Key
43
-
44
- ### 3. 查看状态
45
-
46
- ```bash
47
- # 详细模式
48
- minimax status
49
-
50
- # 紧凑模式
51
- minimax status --compact
52
-
53
- # 持续监控模式
54
- minimax status --watch
55
- ```
56
-
57
- ## VSCode 扩展
58
-
59
- 提供 VSCode 扩展版本,支持在 VSCode 底部状态栏显示使用状态。
60
-
61
- ### 安装方式
62
-
63
- **方式一:下载 VSIX 文件**
64
-
65
- 1. 访问 [GitHub Releases](https://github.com/JochenYang/minimax-status/releases)
66
- 2. 下载最新的 `.vsix` 文件
67
- 3. 在 VSCode 中按 `Ctrl+Shift+P`
68
- 4. 输入 "Extensions: Install from VSIX..."
69
- 5. 选择下载的 VSIX 文件
70
-
71
- **方式二:从源码构建**
72
-
73
- ```bash
74
- git clone https://github.com/JochenYang/minimax-status.git
75
- cd minimax-status/vscode-extension
76
- npm install
77
- npm run package
78
- # 在 VSCode 中安装生成的 .vsix 文件
79
- ```
80
-
81
- ### 配置步骤
82
-
83
- 1. 安装扩展后,点击状态栏的 "MiniMax 未配置" 按钮
84
- 2. 或使用命令 "MiniMax Status: 配置向导"
85
- 3. 输入您的 API Key 和 GroupID
86
- 4. 配置完成后,状态栏将显示实时使用状态
87
-
88
- > **注意**: 扩展尚未发布到 VSCode 市场,需要手动安装
89
-
90
- ## Claude Code 集成
91
-
92
- 将 MiniMax 使用状态显示在 Claude Code 底部状态栏。
93
-
94
- ### 配置步骤
95
-
96
- 1. **安装和配置工具**:
97
-
98
- ```bash
99
- npm install -g minimax-status
100
- minimax auth <token> <groupId>
101
- ```
102
-
103
- 2. **配置 Claude Code**:
104
-
105
- 编辑 `~/.claude/settings.json`:
106
-
107
- ```json
108
- {
109
- "statusLine": {
110
- "command": "minimax statusline"
111
- }
112
- }
113
- ```
114
-
115
- 3. **重启 Claude Code**
116
-
117
- 集成成功后,底部状态栏将显示:
118
-
119
- ```
120
- 📁 my-app | 🤖 MiniMax-M2 | 40% | ↻ 2690/4500 | 200K | ⏱️ 35m ✓
121
- ```
122
-
123
- 显示格式:`📁 目录 | 🤖 模型 | 使用率 | ↻ 剩余次数/总数 | 上下文窗口 | ⏱️ 剩余时间 状态图标`
124
-
125
- **注意**: MiniMax 的配置独立存储在 `~/.minimax-config.json`,与 Claude Code 的配置分离。
126
-
127
- ## 显示示例
128
-
129
- ### 详细模式
130
-
131
- ```
132
- ┌─────────────────────────────────────────────────────────────┐
133
- │ MiniMax Claude Code 使用状态 │
134
- │ │
135
- │ 当前模型: MiniMax-M2 │
136
- │ 时间窗口: 10:00-15:00(UTC+8) │
137
- │ 剩余时间: 1 小时 26 分钟后重置 │
138
- │ │
139
- │ 已用额度: █████████████████████░░░░░░░░░ 27% │
140
- │ 剩余: 3307/4500 次调用 │
141
- │ │
142
- │ 状态: ✓ 正常使用 │
143
- └─────────────────────────────────────────────────────────────┘
144
- ```
145
-
146
- ### 紧凑模式
147
-
148
- ```
149
- ● MiniMax-M2 27% • 1 小时 26 分钟后重置 • ✓ 正常使用
150
- ```
151
-
152
- ### 持续状态栏模式
153
-
154
- ```
155
- ✓ MiniMax 状态栏已启动
156
- 按 Ctrl+C 退出
157
-
158
- [?25l● MiniMax-M2 27% • 3307/4500 • 1h26m ⚡
159
- ```
160
-
161
- ## 命令说明
162
-
163
- | 命令 | 描述 | 示例 |
164
- | -------------------- | ------------------------------------------- | -------------------------------- |
165
- | `minimax auth` | 设置认证凭据 | `minimax auth <token> <groupId>` |
166
- | `minimax status` | 显示当前使用状态(支持 --compact、--watch) | `minimax status` |
167
- | `minimax bar` | 终端底部持续状态栏 | `minimax bar` |
168
- | `minimax statusline` | Claude Code 状态栏集成 | 用于 Claude Code 配置 |
169
-
170
- ## 状态说明
171
-
172
- ### 状态图标
173
-
174
- | 使用率 | 图标 | 含义 |
175
- | ------ | ---- | -------- |
176
- | < 60% | ✓ | 正常使用 |
177
- | 60-85% | ⚡ | 注意使用 |
178
- | ≥ 85% | ⚠ | 危险状态 |
179
-
180
- ## 配置文件
181
-
182
- ### 默认位置
183
-
184
- - 独立配置文件: `~/.minimax-config.json`
185
-
186
- ### 配置示例
187
-
188
- ```json
189
- {
190
- "token": "your_access_token_here",
191
- "groupId": "your_group_id_here"
192
- }
193
- ```
194
-
195
- ### Claude Code 配置
196
-
197
- Claude Code 只需要配置状态栏命令,不包含 MiniMax 配置:
198
-
199
- ```json
200
- // ~/.claude/settings.json
201
- {
202
- "statusLine": {
203
- "command": "minimax statusline"
204
- }
205
- }
206
- ```
207
-
208
- ### 安全说明
209
-
210
- 凭据仅存储在本地,不会上传到任何服务器。
211
-
212
- ## 故障排除
213
-
214
- ### 命令未找到
215
-
216
- ```bash
217
- # 确保已全局安装
218
- npm install -g minimax-status
219
-
220
- # 重新打开终端
221
- ```
222
-
223
- ### 认证失败
224
-
225
- ```bash
226
- # 检查令牌和组 ID
227
- minimax status
228
-
229
- # 重新设置认证
230
- minimax auth <new_token> <new_groupId>
231
- ```
232
-
233
- ### 状态栏不显示
234
-
235
- 1. 检查 Claude Code 配置
236
- 2. 重启 Claude Code
237
- 3. 手动测试: `minimax statusline`
238
-
239
- ## 开发
240
-
241
- ### 构建项目
242
-
243
- ```bash
244
- git clone <repository>
245
- cd minimax-status
246
- npm install
247
- ```
248
-
249
- ### 测试
250
-
251
- ```bash
252
- # 运行示例
253
- node cli/example.js
254
-
255
- # 测试 CLI 命令
256
- node cli/index.js status
257
- ```
258
-
259
- ## 许可证
260
-
261
- MIT License - 详见 [LICENSE](LICENSE) 文件
262
-
263
- ## 贡献
264
-
265
- 欢迎提交 Issue 和 Pull Request!
266
-
267
- ## 相关链接
268
-
269
- - [MiniMax 开放平台](https://platform.minimaxi.com/)
270
-
271
- ---
272
-
273
- **注意**: 本工具仅用于监控 MiniMax coding-plan 用量使用状态,不存储或传输任何用户数据。
1
+ # MiniMax StatusBar
2
+
3
+ [![npm version](https://img.shields.io/npm/v/minimax-status.svg)](https://www.npmjs.com/package/minimax-status)
4
+ [![npm downloads](https://img.shields.io/npm/dm/minimax-status.svg)](https://www.npmjs.com/package/minimax-status)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![VSCode Extension Build](https://github.com/JochenYang/minimax-status/actions/workflows/build-vscode-extension.yml/badge.svg)](https://github.com/JochenYang/minimax-status/actions/workflows/build-vscode-extension.yml)
7
+
8
+ MiniMax coding-plan 使用状态监控工具,支持 CLI 命令和 Claude Code 状态栏集成。
9
+
10
+ ![MiniMax StatusBar](https://img.shields.io/badge/StatusBar-MiniMax-blue?style=flat-square)
11
+
12
+ ## 特性
13
+
14
+ - ✅ **实时状态监控**: 显示 MiniMax coding-plan 使用额度、剩余次数、重置时间
15
+ - ✅ **多种显示模式**: 详细模式、紧凑模式、持续状态栏
16
+ - ✅ **Claude Code 集成**: 可在 Claude Code 底部状态栏显示
17
+ - ✅ **智能颜色编码**: 根据使用率自动切换颜色和图标
18
+ - ✅ **简洁命令**: `minimax status` 查看状态
19
+ - ✅ **安全存储**: 凭据存储在独立的配置文件中
20
+
21
+ ## 快速开始
22
+
23
+ ### 1. 安装
24
+
25
+ ```bash
26
+ npm install -g minimax-status
27
+ ```
28
+
29
+ ### 2. 配置认证
30
+
31
+ ```bash
32
+ minimax auth <token> <groupId>
33
+ ```
34
+
35
+ 配置信息将保存在 `~/.minimax-config.json` 文件中。
36
+
37
+ 获取令牌和组 ID:
38
+
39
+ 1. 访问 [MiniMax 开放平台](https://platform.minimaxi.com/user-center/payment/coding-plan)
40
+ 2. 登录并进入控制台
41
+ 3. 账户信息中复制 groupID
42
+ 4. Coding Plan 中创建或获取 API Key
43
+
44
+ ### 3. 查看状态
45
+
46
+ ```bash
47
+ # 详细模式
48
+ minimax status
49
+
50
+ # 紧凑模式
51
+ minimax status --compact
52
+
53
+ # 持续监控模式
54
+ minimax status --watch
55
+ ```
56
+
57
+ ## VSCode 扩展
58
+
59
+ 提供 VSCode 扩展版本,支持在 VSCode 底部状态栏显示使用状态。
60
+
61
+ ### 安装方式
62
+
63
+ **方式一:下载 VSIX 文件**
64
+
65
+ 1. 访问 [GitHub Releases](https://github.com/JochenYang/minimax-status/releases)
66
+ 2. 下载最新的 `.vsix` 文件
67
+ 3. 在 VSCode 中按 `Ctrl+Shift+P`
68
+ 4. 输入 "Extensions: Install from VSIX..."
69
+ 5. 选择下载的 VSIX 文件
70
+
71
+ **方式二:从源码构建**
72
+
73
+ ```bash
74
+ git clone https://github.com/JochenYang/minimax-status.git
75
+ cd minimax-status/vscode-extension
76
+ npm install
77
+ npm run package
78
+ # 在 VSCode 中安装生成的 .vsix 文件
79
+ ```
80
+
81
+ ### 配置步骤
82
+
83
+ 1. 安装扩展后,点击状态栏的 "MiniMax 未配置" 按钮
84
+ 2. 或使用命令 "MiniMax Status: 配置向导"
85
+ 3. 输入您的 API Key 和 GroupID
86
+ 4. 配置完成后,状态栏将显示实时使用状态
87
+
88
+ > **注意**: 扩展尚未发布到 VSCode 市场,需要手动安装
89
+
90
+ ## Claude Code 集成
91
+
92
+ 将 MiniMax 使用状态显示在 Claude Code 底部状态栏。
93
+
94
+ ### 配置步骤
95
+
96
+ 1. **安装和配置工具**:
97
+
98
+ ```bash
99
+ npm install -g minimax-status
100
+ minimax auth <token> <groupId>
101
+ ```
102
+
103
+ 2. **配置 Claude Code**:
104
+
105
+ 编辑 `~/.claude/settings.json`:
106
+
107
+ ```json
108
+ {
109
+ "statusLine": {
110
+ "command": "minimax statusline"
111
+ }
112
+ }
113
+ ```
114
+
115
+ 3. **重启 Claude Code**
116
+
117
+ 集成成功后,底部状态栏将显示:
118
+
119
+ ```
120
+ 📁 my-app | 🤖 MiniMax-M2 | 40% | ↻ 2690/4500 | 200K | ⏱️ 35m ✓
121
+ ```
122
+
123
+ 显示格式:`📁 目录 | 🤖 模型 | 使用率 | ↻ 剩余次数/总数 | 上下文窗口 | ⏱️ 剩余时间 状态图标`
124
+
125
+ **注意**: MiniMax 的配置独立存储在 `~/.minimax-config.json`,与 Claude Code 的配置分离。
126
+
127
+ ## 显示示例
128
+
129
+ ### 详细模式
130
+
131
+ ```
132
+ ┌─────────────────────────────────────────────────────────────┐
133
+ │ MiniMax Claude Code 使用状态 │
134
+ │ │
135
+ │ 当前模型: MiniMax-M2 │
136
+ │ 时间窗口: 10:00-15:00(UTC+8) │
137
+ │ 剩余时间: 1 小时 26 分钟后重置 │
138
+ │ │
139
+ │ 已用额度: █████████████████████░░░░░░░░░ 27% │
140
+ │ 剩余: 3307/4500 次调用 │
141
+ │ │
142
+ │ 状态: ✓ 正常使用 │
143
+ └─────────────────────────────────────────────────────────────┘
144
+ ```
145
+
146
+ ### 紧凑模式
147
+
148
+ ```
149
+ ● MiniMax-M2 27% • 1 小时 26 分钟后重置 • ✓ 正常使用
150
+ ```
151
+
152
+ ### 持续状态栏模式
153
+
154
+ ```
155
+ ✓ MiniMax 状态栏已启动
156
+ 按 Ctrl+C 退出
157
+
158
+ [?25l● MiniMax-M2 27% • 3307/4500 • 1h26m ⚡
159
+ ```
160
+
161
+ ## 命令说明
162
+
163
+ | 命令 | 描述 | 示例 |
164
+ | -------------------- | ------------------------------------------- | -------------------------------- |
165
+ | `minimax auth` | 设置认证凭据 | `minimax auth <token> <groupId>` |
166
+ | `minimax status` | 显示当前使用状态(支持 --compact、--watch) | `minimax status` |
167
+ | `minimax bar` | 终端底部持续状态栏 | `minimax bar` |
168
+ | `minimax statusline` | Claude Code 状态栏集成 | 用于 Claude Code 配置 |
169
+
170
+ ## 状态说明
171
+
172
+ ### 状态图标
173
+
174
+ | 使用率 | 图标 | 含义 |
175
+ | ------ | ---- | -------- |
176
+ | < 60% | ✓ | 正常使用 |
177
+ | 60-85% | ⚡ | 注意使用 |
178
+ | ≥ 85% | ⚠ | 危险状态 |
179
+
180
+ ## 配置文件
181
+
182
+ ### 默认位置
183
+
184
+ - 独立配置文件: `~/.minimax-config.json`
185
+
186
+ ### 配置示例
187
+
188
+ ```json
189
+ {
190
+ "token": "your_access_token_here",
191
+ "groupId": "your_group_id_here"
192
+ }
193
+ ```
194
+
195
+ ### Claude Code 配置
196
+
197
+ Claude Code 只需要配置状态栏命令,不包含 MiniMax 配置:
198
+
199
+ ```json
200
+ // ~/.claude/settings.json
201
+ {
202
+ "statusLine": {
203
+ "command": "minimax statusline"
204
+ }
205
+ }
206
+ ```
207
+
208
+ ### 安全说明
209
+
210
+ 凭据仅存储在本地,不会上传到任何服务器。
211
+
212
+ ## 故障排除
213
+
214
+ ### 命令未找到
215
+
216
+ ```bash
217
+ # 确保已全局安装
218
+ npm install -g minimax-status
219
+
220
+ # 重新打开终端
221
+ ```
222
+
223
+ ### 认证失败
224
+
225
+ ```bash
226
+ # 检查令牌和组 ID
227
+ minimax status
228
+
229
+ # 重新设置认证
230
+ minimax auth <new_token> <new_groupId>
231
+ ```
232
+
233
+ ### 状态栏不显示
234
+
235
+ 1. 检查 Claude Code 配置
236
+ 2. 重启 Claude Code
237
+ 3. 手动测试: `minimax statusline`
238
+
239
+ ## 开发
240
+
241
+ ### 构建项目
242
+
243
+ ```bash
244
+ git clone <repository>
245
+ cd minimax-status
246
+ npm install
247
+ ```
248
+
249
+ ### 测试
250
+
251
+ ```bash
252
+ # 运行示例
253
+ node cli/example.js
254
+
255
+ # 测试 CLI 命令
256
+ node cli/index.js status
257
+ ```
258
+
259
+ ## 许可证
260
+
261
+ MIT License - 详见 [LICENSE](LICENSE) 文件
262
+
263
+ ## 贡献
264
+
265
+ 欢迎提交 Issue 和 Pull Request!
266
+
267
+ ## 相关链接
268
+
269
+ - [MiniMax 开放平台](https://platform.minimaxi.com/)
270
+
271
+ ---
272
+
273
+ **注意**: 本工具仅用于监控 MiniMax coding-plan 用量使用状态,不存储或传输任何用户数据。