@xx-in/tools 0.0.1 → 0.0.3

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 +35 -5
  2. package/dist/cli.js +452 -848
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -14,6 +14,34 @@ npm install -g @xx-in/tools
14
14
  xx upgrade
15
15
  # 或
16
16
  npm install -g @xx-in/tools@latest
17
+
18
+ # 如果当前环境配置了其他 npm 源,可强制走官方源
19
+ xx upgrade -r
20
+ ```
21
+
22
+ ## 临时指定 npm 官方源
23
+
24
+ 如果你本机默认配置了其他 npm 源,安装、升级或发布时可以临时指定官方源,而不影响全局配置:
25
+
26
+ ```sh
27
+ # 安装
28
+ npm --registry=https://registry.npmjs.org/ install -g @xx-in/tools
29
+
30
+ # 升级
31
+ npm --registry=https://registry.npmjs.org/ install -g @xx-in/tools@latest
32
+
33
+ # 发布
34
+ npm --registry=https://registry.npmjs.org/ publish --access public
35
+ ```
36
+
37
+ 也可以直接使用项目内置脚本:
38
+
39
+ ```sh
40
+ # 常规发布
41
+ npm run publish:npm
42
+
43
+ # 强制走 npm 官方源发布
44
+ npm run publish:npm:registry
17
45
  ```
18
46
 
19
47
  ## 功能列表
@@ -37,12 +65,14 @@ npm install -g @xx-in/tools@latest
37
65
  - **`open [path]`**:文件管理器目录打开工具。
38
66
  - 在系统内置文件管理器中打开指定目录。若未提供参数,则默认打开当前的工作目录。
39
67
 
40
- ### 2. Linux 桌面应用管理
68
+ ### 2. macOS 本地工具安装管理
41
69
 
42
- - **`application`**:Linux 桌面应用辅助管理工具集,包含以下嵌套子命令 [3]:
43
- - **`shortcut <path>`**:为本地 AppImage、普通可执行二进制文件、或 Flatpak 应用 ID(例如 `org.gimp.GIMP`)生成标准的 Linux `.desktop` 快捷文件并放置到系统的应用选单中 [3]。
44
- - **`install <path>`**:安装软件包。支持本地 `.deb` 安装包,或解压 `.tar.gz` 绿色软件(自动释放到 `~/GreenApp/` [3],并自适应扫描根目录下的执行文件创建图标)。
45
- - **`remove <package>`**:卸载已安装的软件包。支持传入包名或本地 `.deb` 路径(将自动分析提取其 Metadata 进行安全卸载)。
70
+ - **`install <path>`**:macOS 本地工具安装器。
71
+ - 支持安装单个可执行文件,以及 `.tar.gz`、`.tgz`、`.tar.xz`、`.txz`、`.tar` 压缩包。
72
+ - 自动安装到 `~/.xx-tools/apps/`,并在 `~/.xx-tools/bin/` 创建终端命令入口。
73
+ - 首次安装时会自动把 `~/.xx-tools/bin` 写入你的 Shell 配置,后续即可在终端中直接调用已安装工具。
74
+ - **`uninstall <package>`**:macOS 本地工具卸载器。
75
+ - 按安装名卸载工具,同时删除安装目录和终端命令入口。
46
76
 
47
77
  ### 3. 压缩与解压
48
78