@oldsuns/pi-switch 0.2.1 → 0.2.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
@@ -15,17 +15,21 @@ CLI:`pi-switch` · npm 包:`@oldsuns/pi-switch` · Node 薄壳 + Rust/napi
15
15
  ## 要求
16
16
 
17
17
  - Node.js `>= 20`
18
- - 本地构建原生模块需要 Rust 工具链与 `@napi-rs/cli`
19
- - 预构建目标:macOS (x64/arm64)、Linux (gnu/musl x64)、Windows (msvc x64)
18
+ - 预构建原生模块当前仅覆盖 Windows (msvc x64)——直接 `npm install -g` 即装即用
19
+ - 本地构建原生模块(仅开发者)需要 Rust 工具链与 `@napi-rs/cli`
20
20
 
21
- ## 安装与运行
21
+ ## 快速开始
22
22
 
23
23
  ```bash
24
- npm install
25
- npm run build:native:debug
26
- node ./bin/pi-switch.js
24
+ # 全局安装
25
+ npm install -g @oldsuns/pi-switch
26
+
27
+ # 打开 TUI
28
+ pi-switch
27
29
  ```
28
30
 
31
+ 首次运行会自动把现有的 `~/.pi/agent/models.json` 全量导入本地库,**不修改** Pi 配置;随后即可在 Profiles 中勾选要加入 Pi 的 provider / model。
32
+
29
33
  CLI:
30
34
 
31
35
  ```bash
@@ -36,6 +40,18 @@ pi-switch --version # / -v
36
40
  pi-switch --help # / -h / help
37
41
  ```
38
42
 
43
+ Windows 上无需 Rust:预构建原生模块随 npm 包分发,`pi-switch` 开箱即用。本地开发见下文「开发者」。
44
+
45
+ ## 开发者
46
+
47
+ 从源码构建:
48
+
49
+ ```bash
50
+ npm install
51
+ npm run build:native:debug
52
+ node ./bin/pi-switch.js
53
+ ```
54
+
39
55
  ## 界面与快捷键
40
56
 
41
57
  全局导航:`j/k` 或方向键移动;菜单中 `Enter` / `l` 进入内容,`h` / `Esc` / `Tab` 回菜单;`?` 帮助;`q` 退出(多数界面 `Ctrl+C` 也退出,会话预览除外)。
@@ -164,3 +180,7 @@ npm run pack:check
164
180
  ## 许可
165
181
 
166
182
  MIT
183
+
184
+ ## 致谢
185
+
186
+ 感谢 [LINUX DO](https://linux.do) 社区的讨论与反馈。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oldsuns/pi-switch",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A focused terminal UI for Pi provider and model configuration",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,10 +38,17 @@
38
38
  "provider",
39
39
  "models"
40
40
  ],
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/OldSuns/pi-switch.git"
44
+ },
41
45
  "license": "MIT",
42
46
  "engines": {
43
47
  "node": ">=20"
44
48
  },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
45
52
  "devDependencies": {
46
53
  "@napi-rs/cli": "^3.7.1"
47
54
  }
Binary file