@yakumoryo/minimax-plan-usage 0.2.7 → 0.2.8

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.
Files changed (3) hide show
  1. package/README.md +12 -6
  2. package/package.json +1 -1
  3. package/query.js +4 -2
package/README.md CHANGED
@@ -11,13 +11,22 @@ npm install -g @yakumoryo/minimax-plan-usage
11
11
  ## Usage
12
12
 
13
13
  ```bash
14
- minimax-plan-usage
14
+ # Configure API Key (required first time)
15
+ minimax-plan-usage setup <your-token>
16
+
17
+ # Configure API URL (optional, for non-default endpoints)
18
+ minimax-plan-usage setup-url https://api.minimaxi.com/anthropic
19
+
20
+ # Query usage
21
+ minimax-plan-usage query
15
22
  ```
16
23
 
17
24
  Or with npx:
18
25
 
19
26
  ```bash
20
- npx @yakumoryo/minimax-plan-usage
27
+ npx @yakumoryo/minimax-plan-usage setup <your-token>
28
+ npx @yakumoryo/minimax-plan-usage setup-url https://api.minimaxi.com/anthropic
29
+ npx @yakumoryo/minimax-plan-usage query
21
30
  ```
22
31
 
23
32
  ## Requirements
@@ -30,7 +39,4 @@ These are typically already configured in your Claude Code settings.
30
39
 
31
40
  ## How it works
32
41
 
33
- The CLI uses the same `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL` that Claude Code uses. Based on the base URL, it determines the correct MiniMax API endpoint:
34
-
35
- - If `ANTHROPIC_BASE_URL` contains `minimax.io` → uses `https://minimax.io`
36
- - Otherwise → uses `https://api.minimaxi.com` (default)
42
+ The CLI reads settings from `~/.claude/settings.json` and uses the same `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL` that Claude Code uses.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakumoryo/minimax-plan-usage",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "MiniMax Coding Plan usage query CLI tool",
5
5
  "type": "module",
6
6
  "keywords": [
package/query.js CHANGED
@@ -229,10 +229,12 @@ if (command === 'setup') {
229
229
  console.log('MiniMax Coding Plan Helper');
230
230
  console.log('');
231
231
  console.log('Usage:');
232
- console.log(' npx @yakumoryo/minimax-plan-usage setup <your-token> # 配置API Key');
233
- console.log(' npx @yakumoryo/minimax-plan-usage query # 查询用量');
232
+ console.log(' npx @yakumoryo/minimax-plan-usage setup <your-token> # 配置API Key');
233
+ console.log(' npx @yakumoryo/minimax-plan-usage setup-url <api-url> # 配置API URL');
234
+ console.log(' npx @yakumoryo/minimax-plan-usage query # 查询用量');
234
235
  console.log('');
235
236
  console.log('Examples:');
236
237
  console.log(' npx @yakumoryo/minimax-plan-usage setup sk-cp-YOUR_TOKEN_HERE');
238
+ console.log(' npx @yakumoryo/minimax-plan-usage setup-url https://api.minimaxi.com/anthropic');
237
239
  console.log(' npx @yakumoryo/minimax-plan-usage query');
238
240
  }