modelquota 0.1.1 → 0.1.2

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 CHANGED
@@ -14,26 +14,14 @@ opencode 插件:在 TUI 右侧栏实时显示**当前正在使用的模型供
14
14
  ## 安装
15
15
 
16
16
  ```bash
17
- npm i -g opencode-ai # 需要 opencode 1.18+
17
+ opencode plugin modelquota -g
18
18
  ```
19
19
 
20
- `~/.config/opencode/opencode.json`(全局)或项目 `opencode.json` `plugin` 数组加:
20
+ 一行命令:自动从 npm 安装、自动注册 server + TUI 双入口,重启 opencode 生效。
21
21
 
22
- ```json
23
- {
24
- "plugin": ["modelquota"]
25
- }
26
- ```
27
-
28
- 在 `~/.config/opencode/tui.json` 加(TUI 插件,需要和 server 插件一起注册):
29
-
30
- ```json
31
- {
32
- "plugin": ["modelquota"]
33
- }
34
- ```
22
+ (或手动在 `~/.config/opencode/opencode.json` 和 `tui.json` 的 `plugin` 数组各加 `"modelquota"`)
35
23
 
36
- 重启 opencode 生效。
24
+ 需要 opencode 1.18+。
37
25
 
38
26
  ## 配置
39
27
 
package/docs/PUBLISH.md CHANGED
@@ -54,6 +54,16 @@ curl -s https://registry.npmjs.org/modelquota | grep -o '"latest":"[^"]*"'
54
54
 
55
55
  ### 1. 安装(需要 opencode 1.18+)
56
56
 
57
+ **一行命令(推荐)**:
58
+
59
+ ```bash
60
+ opencode plugin modelquota -g
61
+ ```
62
+
63
+ opencode 会自动从 npm 安装插件、检测 TUI 入口并写入 `tui.json`、更新 `opencode.json`,重启后生效。
64
+
65
+ **手动配置方式**(等价,也可用):
66
+
57
67
  在 `~/.config/opencode/opencode.json`(全局)或项目 `opencode.json` 的 `plugin` 数组加:
58
68
 
59
69
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelquota",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "opencode 插件:在 TUI 右侧栏显示当前使用的模型供应商套餐余量",
6
6
  "keywords": [