@wwkit/opm 1.0.8 → 1.0.9

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
@@ -92,15 +92,15 @@ pnpm opm <command> [args] [options]
92
92
 
93
93
  | Action | 说明 |
94
94
  |--------|------|
95
- | `version` | 查看管理器本身版本 |
95
+ | `version [name]` | 无 name 查看管理器本身版本;有 name 显示包在全局与项目作用域的版本(仅包管理器) |
96
96
  | `registry` | 查询当前镜像地址 |
97
97
  | `registry set <url\|preset>` | 设置镜像地址(支持预设名) |
98
98
  | `registry presets` | 列出可用镜像预设 |
99
99
  | `search <name> [version]` | 查询包在源是否可用 |
100
- | `view <name>` | 查询包是否已安装 |
100
+ | `view <name>` | 查询包在全局与项目作用域的安装信息(仅包管理器;运行时查询版本是否已安装) |
101
101
  | `info <name>` | 查询包详情 |
102
102
  | `versions <name>` | 列出所有可用版本 |
103
- | `list` | 列出所有已安装包 |
103
+ | `list` | 列出所有已安装包(仅 node/php/python 运行时) |
104
104
  | `outdated` | 列出过期包 |
105
105
  | `install <name> [version]` | 安装包 |
106
106
  | `uninstall <name>` | 卸载包 |
@@ -151,10 +151,9 @@ opm npm registry set taobao # 设置激活镜像为 taobao(写入
151
151
  opm npm registry presets # 列出可用镜像预设
152
152
  opm npm search axios # 查询 axios 是否可用
153
153
  opm npm search axios 1.7.9 # 查询指定版本
154
- opm npm view axios # 查询是否已安装
154
+ opm npm view axios # 查询全局与项目作用域安装信息
155
155
  opm npm info axios # 包详情
156
156
  opm npm versions axios # 所有版本
157
- opm npm list # 已安装列表
158
157
  opm npm outdated # 过期包
159
158
  opm npm install axios # 安装
160
159
  opm npm install axios 1.7.9 # 安装指定版本
@@ -170,10 +169,9 @@ opm npm cache clean # 清理缓存
170
169
  opm pip registry # 查看当前 index-url
171
170
  opm pip registry set tsinghua # 设置为清华镜像
172
171
  opm pip search requests # 查询 requests 是否可用
173
- opm pip view requests # 查询是否已安装
172
+ opm pip view requests # 查询全局与项目作用域安装信息
174
173
  opm pip info requests # 包详情
175
174
  opm pip versions requests # 所有版本
176
- opm pip list # 已安装列表
177
175
  opm pip install requests # 安装
178
176
  opm pip install requests 2.31.0 # 安装指定版本
179
177
  opm pip uninstall requests # 卸载
@@ -189,10 +187,9 @@ opm dnf registry # 查看当前启用仓库
189
187
  opm dnf registry set hce-updates # 写入 opm.repo 指向 hce-updates 镜像
190
188
  opm dnf registry presets # 列出可用镜像预设
191
189
  opm dnf search vim-enhanced # 查询包在源是否可用
192
- opm dnf view vim-enhanced # 查询是否已安装
190
+ opm dnf view vim-enhanced # 查询全局作用域安装信息(无项目作用域)
193
191
  opm dnf info vim-enhanced # 包详情
194
192
  opm dnf versions vim-enhanced # 所有可用版本
195
- opm dnf list # 已安装包列表
196
193
  opm dnf outdated # 过期包
197
194
  opm dnf install htop # 安装
198
195
  opm dnf install vim-enhanced 9.0 # 安装指定版本
@@ -209,10 +206,9 @@ opm apt registry # 查看当前启用源
209
206
  opm apt registry set ubuntu-tsinghua # 写入 /etc/apt/sources.list.d/opm.list
210
207
  opm apt registry presets # 列出可用镜像预设
211
208
  opm apt search curl # 查询包在源是否可用
212
- opm apt view curl # 查询是否已安装
209
+ opm apt view curl # 查询全局作用域安装信息(无项目作用域)
213
210
  opm apt info curl # 包详情
214
211
  opm apt versions curl # 所有可用版本
215
- opm apt list # 已安装包列表
216
212
  opm apt outdated # 过期包
217
213
  opm apt install htop # 安装
218
214
  opm apt install curl 7.68.0-1ubuntu2.7 # 安装指定版本
@@ -229,10 +225,9 @@ opm brew registry # 查看配置中的激活镜像
229
225
  opm brew registry set tsinghua # 设置为清华镜像(install/upgrade 传 HOMEBREW_*_DOMAIN)
230
226
  opm brew registry presets # 列出可用镜像预设
231
227
  opm brew search wget # 查询 wget 是否可用
232
- opm brew view wget # 查询是否已安装
228
+ opm brew view wget # 查询全局作用域安装信息(无项目作用域)
233
229
  opm brew info wget # 包详情
234
230
  opm brew versions wget # 所有可用版本
235
- opm brew list # 已安装列表
236
231
  opm brew outdated # 过期包
237
232
  opm brew install wget # 安装
238
233
  opm brew install python 3.12 # 安装指定版本(versioned formula)
@@ -250,10 +245,9 @@ opm composer registry set aliyun # 设置为阿里云镜像
250
245
  opm composer registry presets # 列出可用镜像预设
251
246
  opm composer search monolog/monolog # 查询包是否可用
252
247
  opm composer search monolog/monolog 3.9.0 # 查询指定版本
253
- opm composer view monolog/monolog # 查询是否已安装
248
+ opm composer view monolog/monolog # 查询项目作用域安装信息(无全局作用域)
254
249
  opm composer info monolog/monolog # 包详情
255
250
  opm composer versions monolog/monolog # 所有可用版本
256
- opm composer list # 已安装列表
257
251
  opm composer outdated # 过期包
258
252
  opm composer install monolog/monolog # 安装(composer require)
259
253
  opm composer install monolog/monolog ^3.0 # 安装指定版本约束
@@ -269,10 +263,9 @@ opm bun version # 查看 bun 版本
269
263
  opm bun registry # 查看配置中的激活 registry
270
264
  opm bun registry set taobao # 设置为 taobao 镜像(传 BUN_CONFIG_REGISTRY)
271
265
  opm bun search axios # 查询 axios 是否可用
272
- opm bun view axios # 查询是否已安装
266
+ opm bun view axios # 查询全局与项目作用域安装信息
273
267
  opm bun info axios # 包详情
274
268
  opm bun versions axios # 所有可用版本
275
- opm bun list # 已安装列表
276
269
  opm bun outdated # 过期包
277
270
  opm bun install axios # 安装(bun add)
278
271
  opm bun uninstall axios # 卸载(bun remove)
@@ -6,15 +6,14 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm apt version` | `apt --version` | 查看 apt 版本 |
9
+ | `opm apt version [name]` | `apt --version` | 无 name 显示 apt 版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装) |
10
10
  | `opm apt registry` | 读 `/etc/apt/sources.list.d/opm.list` | 查询当前启用源 |
11
11
  | `opm apt registry set <url\|preset>` | 写 `/etc/apt/sources.list.d/opm.list` + `apt update` | 设置镜像源 |
12
12
  | `opm apt registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm apt search <name>` | `apt-cache search` | 查询包在源是否可用 |
14
- | `opm apt view <name>` | `dpkg -l` / `apt list --installed` | 查询包是否已安装 |
14
+ | `opm apt view <name>` | `dpkg -l` / `apt list --installed` | 查询包在全局作用域的安装信息(无项目作用域,project 显示未安装) |
15
15
  | `opm apt info <name>` | `apt-cache show` | 包详情 |
16
16
  | `opm apt versions <name>` | `apt-cache madison` / `policy` | 所有可用版本 |
17
- | `opm apt list` | `apt list --installed` | 已安装包列表 |
18
17
  | `opm apt outdated` | `apt list --upgradable` | 过期包 |
19
18
  | `opm apt install <name>` | `apt install` | 安装 |
20
19
  | `opm apt uninstall <name>` | `apt remove` | 卸载 |
@@ -6,16 +6,15 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm brew version` | `brew --version` | 查看 brew 本身版本 |
9
+ | `opm brew version [name]` | `brew --version` | 无 name 显示 brew 本身版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装) |
10
10
  | `opm brew registry` | 读 `~/.config/opm/config.json5` 的 `brew.registry.active` | 查询配置中的激活镜像(不读系统配置) |
11
11
  | `opm brew registry set <url\|preset>` | 写 `~/.config/opm/config.json5` 的 `brew.registry.active` | 设置激活镜像(支持预设名,install/upgrade 自动传 `HOMEBREW_API_DOMAIN` / `HOMEBREW_BOTTLE_DOMAIN`;仅作用于本工具发起的命令,不改系统 brew 配置) |
12
12
  | `opm brew registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm brew search <name>` | `brew info --json=v2 <name>` | 查询包在源是否可用(返回最新版本 + 版本列表) |
14
14
  | `opm brew search <name> <version>` | `brew info --json=v2 <name>` | 查询指定版本是否可用 |
15
- | `opm brew view <name>` | `brew list --versions <name>` | 查询包是否已安装 |
15
+ | `opm brew view <name>` | `brew list --versions <name>` | 查询包在全局作用域的安装信息(无项目作用域,project 显示未安装) |
16
16
  | `opm brew info <name>` | `brew info --json=v2 <name>` | 查询包详情(描述/主页/许可证/仓库等) |
17
17
  | `opm brew versions <name>` | `brew info --json=v2 <name>` | 列出所有可用版本 |
18
- | `opm brew list` | `brew list --versions` | 列出所有已安装包(formulae + casks) |
19
18
  | `opm brew outdated` | `brew outdated --json=v2` | 列出过期包 |
20
19
  | `opm brew install <name>` | `brew install <name>` | 安装包(formula / cask 均可) |
21
20
  | `opm brew install <name> <version>` | `brew install <name>@<version>` | 安装指定版本(versioned formula) |
@@ -66,9 +65,6 @@ opm brew info wget
66
65
  # 列出 wget 所有可用版本
67
66
  opm brew versions wget
68
67
 
69
- # 列出所有已安装包
70
- opm brew list
71
-
72
68
  # 列出过期包
73
69
  opm brew outdated
74
70
 
@@ -8,15 +8,14 @@ Bun 是全栈 JS 工具链(runtime + 包管理器 + 打包器),包管理
8
8
 
9
9
  | 统一命令 | 原始命令 | 说明 |
10
10
  |---------|---------|------|
11
- | `opm bun version` | `bun --version` | 查看 bun 版本 |
11
+ | `opm bun version [name]` | `bun --version` | 无 name 显示 bun 版本;有 name 显示包在全局与项目作用域的版本 |
12
12
  | `opm bun registry` | 读 `~/.config/opm/config.json5` 的 `bun.registry.active` | 查询 bun registry 镜像 |
13
13
  | `opm bun registry set <url\|preset>` | 写 `~/.config/opm/config.json5` | 设置 bun registry 镜像(传给 `BUN_CONFIG_REGISTRY`) |
14
14
  | `opm bun registry presets` | — | 列出可用镜像预设 |
15
15
  | `opm bun search <name> [version]` | HTTP 查 npm registry | 查询包是否可用 |
16
- | `opm bun view <name> [-g]` | 查 `node_modules/<name>/package.json` | 查询包是否已安装 |
16
+ | `opm bun view <name>` | 查 `node_modules/<name>/package.json` | 查询包在全局与项目作用域的安装信息 |
17
17
  | `opm bun info <name>` | HTTP 查 npm registry | 显示包详情 |
18
18
  | `opm bun versions <name>` | HTTP 查 npm registry | 列出所有可用版本 |
19
- | `opm bun list [-g]` | `bun pm ls` | 列出已安装包 |
20
19
  | `opm bun outdated [-g]` | `bun outdated` | 列出过期包 |
21
20
  | `opm bun install <name> [version]` | `bun add <name>@<version>` | 安装包 |
22
21
  | `opm bun uninstall <name>` | `bun remove <name>` | 卸载包 |
@@ -40,7 +39,6 @@ opm bun version
40
39
  opm bun registry set taobao
41
40
  opm bun search axios
42
41
  opm bun info react
43
- opm bun list
44
42
  opm bun outdated
45
43
  opm bun install axios
46
44
  opm bun install react@18
@@ -6,16 +6,15 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm composer version` | `composer --version` | 查看 composer 本身版本 |
9
+ | `opm composer version [name]` | `composer --version` | 无 name 显示 composer 本身版本;有 name 显示包在项目作用域的版本(无全局作用域,global 显示未安装) |
10
10
  | `opm composer registry` | 读 `~/.config/opm/config.json5` 的 `composer.registry.active` | 查询配置中的激活镜像(不读系统配置) |
11
11
  | `opm composer registry set <url\|preset>` | 写 `~/.config/opm/config.json5` 的 `composer.registry.active` | 设置激活镜像(支持预设名;镜像作用于 search/info/versions 的 P2 元数据拉取) |
12
12
  | `opm composer registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm composer search <name>` | `{registry}/p2/{name}.json` | 查询包在源是否可用(返回最新版本 + 版本列表) |
14
14
  | `opm composer search <name> <version>` | `{registry}/p2/{name}.json` | 查询指定版本是否可用 |
15
- | `opm composer view <name>` | 读 `vendor/composer/installed.json` | 查询包是否已安装(项目本地) |
15
+ | `opm composer view <name>` | 读 `vendor/composer/installed.json` | 查询包在项目作用域的安装信息(无全局作用域,global 显示未安装) |
16
16
  | `opm composer info <name>` | `{registry}/p2/{name}.json` | 查询包详情(描述/作者/主页/许可证等) |
17
17
  | `opm composer versions <name>` | `{registry}/p2/{name}.json` | 列出所有可用版本 |
18
- | `opm composer list` | 读 `vendor/composer/installed.json` | 列出所有已安装包 |
19
18
  | `opm composer outdated` | `composer outdated --format=json` | 列出过期包 |
20
19
  | `opm composer install <name>` | `composer require <name> --no-interaction` | 安装包 |
21
20
  | `opm composer install <name> <version>` | `composer require <name>:<version> --no-interaction` | 安装指定版本约束 |
@@ -70,9 +69,6 @@ opm composer info monolog/monolog
70
69
  # 列出 monolog/monolog 所有可用版本
71
70
  opm composer versions monolog/monolog
72
71
 
73
- # 列出所有已安装包
74
- opm composer list
75
-
76
72
  # 列出过期包
77
73
  opm composer outdated
78
74
 
@@ -6,15 +6,14 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm dnf version` | `dnf --version` | 查看 dnf 版本 |
9
+ | `opm dnf version [name]` | `dnf --version` | 无 name 显示 dnf 版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装) |
10
10
  | `opm dnf registry` | 读 `/etc/yum.repos.d/opm.repo` | 查询当前启用仓库 |
11
11
  | `opm dnf registry set <url\|preset>` | 写 `/etc/yum.repos.d/opm.repo` + `dnf clean` | 设置镜像仓库 |
12
12
  | `opm dnf registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm dnf search <name>` | `dnf search` | 查询包在源是否可用 |
14
- | `opm dnf view <name>` | `dnf list installed` | 查询包是否已安装 |
14
+ | `opm dnf view <name>` | `dnf list installed` | 查询包在全局作用域的安装信息(无项目作用域,project 显示未安装) |
15
15
  | `opm dnf info <name>` | `dnf info` | 包详情 |
16
16
  | `opm dnf versions <name>` | `dnf list --showduplicates` | 所有可用版本 |
17
- | `opm dnf list` | `dnf list installed` | 已安装包列表 |
18
17
  | `opm dnf outdated` | `dnf check-update` | 过期包 |
19
18
  | `opm dnf install <name>` | `dnf install` | 安装 |
20
19
  | `opm dnf uninstall <name>` | `dnf remove` | 卸载 |
@@ -6,16 +6,15 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm npm version` | `npm --version` | 查看 npm 本身版本 |
9
+ | `opm npm version [name]` | `npm --version` | 无 name 显示 npm 本身版本;有 name 显示包在全局与项目作用域的版本 |
10
10
  | `opm npm registry` | 读 `~/.config/opm/config.json5` 的 `npm.registry.active` | 查询配置中的激活镜像(不读系统配置) |
11
11
  | `opm npm registry set <url\|preset>` | 写 `~/.config/opm/config.json5` 的 `npm.registry.active` | 设置激活镜像(支持预设名,install/upgrade 自动带 `--registry`) |
12
12
  | `opm npm registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm npm search <name>` | `npm view <name>` | 查询包在源是否可用(返回最新版本 + 版本列表) |
14
14
  | `opm npm search <name> <version>` | `npm view <name>@<version>` | 查询指定版本是否可用 |
15
- | `opm npm view <name>` | `npm list <name>` / 读 `node_modules/<name>/package.json` | 查询包是否已安装 |
15
+ | `opm npm view <name>` | `npm list <name>` / 读 `node_modules/<name>/package.json` | 查询包在全局与项目作用域的安装信息 |
16
16
  | `opm npm info <name>` | `npm view <name>` | 查询包详情(描述/作者/主页/许可证等) |
17
17
  | `opm npm versions <name>` | `npm view <name> versions` | 列出所有可用版本 |
18
- | `opm npm list` | `npm list --depth=0` | 列出所有已安装包 |
19
18
  | `opm npm outdated` | `npm outdated` | 列出过期包 |
20
19
  | `opm npm install <name>` | `npm install <name>` | 安装包 |
21
20
  | `opm npm install <name> <version>` | `npm install <name>@<version>` | 安装指定版本 |
@@ -71,9 +70,6 @@ opm npm info axios
71
70
  # 列出 axios 所有版本
72
71
  opm npm versions axios
73
72
 
74
- # 列出所有已安装包
75
- opm npm list
76
-
77
73
  # 列出过期包
78
74
  opm npm outdated
79
75
 
@@ -6,16 +6,15 @@
6
6
 
7
7
  | 统一命令 | 原始命令 | 说明 |
8
8
  |---------|---------|------|
9
- | `opm pip version` | `pip --version` | 查看 pip 本身版本 |
9
+ | `opm pip version [name]` | `pip --version` | 无 name 显示 pip 本身版本;有 name 显示包在全局与项目作用域的版本 |
10
10
  | `opm pip registry` | 读 `~/.config/opm/config.json5` 的 `pip.registry.active` | 查询配置中的激活镜像(不读系统配置) |
11
11
  | `opm pip registry set <url\|preset>` | 写 `~/.config/opm/config.json5` 的 `pip.registry.active` | 设置激活镜像(支持预设名,install/upgrade 自动带 `--index-url`) |
12
12
  | `opm pip registry presets` | — | 列出可用镜像预设 |
13
13
  | `opm pip search <name>` | PyPI JSON API / simple index | 查询包在源是否可用(返回最新版本 + 版本列表) |
14
14
  | `opm pip search <name> <version>` | PyPI JSON API / simple index | 查询指定版本是否可用 |
15
- | `opm pip view <name>` | `pip show <name>` | 查询包是否已安装 |
15
+ | `opm pip view <name>` | `pip show <name>` | 查询包在全局与项目作用域的安装信息 |
16
16
  | `opm pip info <name>` | PyPI JSON API / `pip show <name>` | 查询包详情(描述/作者/主页/许可证等) |
17
17
  | `opm pip versions <name>` | PyPI JSON API / simple index | 列出所有可用版本 |
18
- | `opm pip list` | `pip list --format=freeze` | 列出所有已安装包 |
19
18
  | `opm pip outdated` | `pip list --outdated` | 列出过期包 |
20
19
  | `opm pip install <name>` | `pip install <name>` | 安装包 |
21
20
  | `opm pip install <name> <version>` | `pip install <name>==<version>` | 安装指定版本 |
@@ -67,9 +66,6 @@ opm pip info requests
67
66
  # 列出 requests 所有版本
68
67
  opm pip versions requests
69
68
 
70
- # 列出所有已安装包
71
- opm pip list
72
-
73
69
  # 列出过期包
74
70
  opm pip outdated
75
71
 
package/docs/opm.html CHANGED
@@ -119,7 +119,7 @@
119
119
  <div id="managers_apt" class="doc-content" style="display:block;"><h1>apt 命令对照表</h1>
120
120
  <p><code>@wwkit/opm</code> 统一命令管理 apt 包(Debian / Ubuntu 等 dpkg 系,系统级)。</p>
121
121
  <h2>命令对照</h2>
122
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm apt version</code></td><td><code>apt --version</code></td><td>查看 apt 版本</td></tr><tr><td><code>opm apt registry</code></td><td>读 <code>/etc/apt/sources.list.d/opm.list</code></td><td>查询当前启用源</td></tr><tr><td><code>opm apt registry set &lt;url|preset&gt;</code></td><td>写 <code>/etc/apt/sources.list.d/opm.list</code> + <code>apt update</code></td><td>设置镜像源</td></tr><tr><td><code>opm apt registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm apt search &lt;name&gt;</code></td><td><code>apt-cache search</code></td><td>查询包在源是否可用</td></tr><tr><td><code>opm apt view &lt;name&gt;</code></td><td><code>dpkg -l</code> / <code>apt list --installed</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm apt info &lt;name&gt;</code></td><td><code>apt-cache show</code></td><td>包详情</td></tr><tr><td><code>opm apt versions &lt;name&gt;</code></td><td><code>apt-cache madison</code> / <code>policy</code></td><td>所有可用版本</td></tr><tr><td><code>opm apt list</code></td><td><code>apt list --installed</code></td><td>已安装包列表</td></tr><tr><td><code>opm apt outdated</code></td><td><code>apt list --upgradable</code></td><td>过期包</td></tr><tr><td><code>opm apt install &lt;name&gt;</code></td><td><code>apt install</code></td><td>安装</td></tr><tr><td><code>opm apt uninstall &lt;name&gt;</code></td><td><code>apt remove</code></td><td>卸载</td></tr><tr><td><code>opm apt upgrade &lt;name&gt;</code></td><td><code>apt upgrade</code></td><td>升级</td></tr><tr><td><code>opm apt cache clean</code></td><td><code>apt clean</code></td><td>清理缓存</td></tr></tbody></table>
122
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm apt version [name]</code></td><td><code>apt --version</code></td><td>无 name 显示 apt 版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm apt registry</code></td><td>读 <code>/etc/apt/sources.list.d/opm.list</code></td><td>查询当前启用源</td></tr><tr><td><code>opm apt registry set &lt;url|preset&gt;</code></td><td>写 <code>/etc/apt/sources.list.d/opm.list</code> + <code>apt update</code></td><td>设置镜像源</td></tr><tr><td><code>opm apt registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm apt search &lt;name&gt;</code></td><td><code>apt-cache search</code></td><td>查询包在源是否可用</td></tr><tr><td><code>opm apt view &lt;name&gt;</code></td><td><code>dpkg -l</code> / <code>apt list --installed</code></td><td>查询包在全局作用域的安装信息(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm apt info &lt;name&gt;</code></td><td><code>apt-cache show</code></td><td>包详情</td></tr><tr><td><code>opm apt versions &lt;name&gt;</code></td><td><code>apt-cache madison</code> / <code>policy</code></td><td>所有可用版本</td></tr><tr><td><code>opm apt outdated</code></td><td><code>apt list --upgradable</code></td><td>过期包</td></tr><tr><td><code>opm apt install &lt;name&gt;</code></td><td><code>apt install</code></td><td>安装</td></tr><tr><td><code>opm apt uninstall &lt;name&gt;</code></td><td><code>apt remove</code></td><td>卸载</td></tr><tr><td><code>opm apt upgrade &lt;name&gt;</code></td><td><code>apt upgrade</code></td><td>升级</td></tr><tr><td><code>opm apt cache clean</code></td><td><code>apt clean</code></td><td>清理缓存</td></tr></tbody></table>
123
123
  <h2>镜像预设</h2>
124
124
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>ubuntu-tsinghua</code></td><td><code>deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse</code></td></tr><tr><td><code>ubuntu-huawei</code></td><td><code>deb https://mirrors.huaweicloud.com/ubuntu/ focal main restricted universe multiverse</code></td></tr><tr><td><code>ubuntu-aliyun</code></td><td><code>deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse</code></td></tr><tr><td><code>debian-official</code></td><td><code>deb http://deb.debian.org/debian/ bookworm main</code></td></tr><tr><td><code>debian-tsinghua</code></td><td><code>deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main</code></td></tr></tbody></table>
125
125
  <h2>示例</h2>
@@ -134,7 +134,7 @@ opm apt cache clean</code></pre></div>
134
134
  <div id="managers_brew" class="doc-content" style="display:none;"><h1>brew 命令对照表</h1>
135
135
  <p><code>@wwkit/opm</code> 统一命令与 Homebrew 原始命令的映射关系(macOS)。</p>
136
136
  <h2>命令对照</h2>
137
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm brew version</code></td><td><code>brew --version</code></td><td>查看 brew 本身版本</td></tr><tr><td><code>opm brew registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>brew.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm brew registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>brew.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动传 <code>HOMEBREW_API_DOMAIN</code> / <code>HOMEBREW_BOTTLE_DOMAIN</code>;仅作用于本工具发起的命令,不改系统 brew 配置)</td></tr><tr><td><code>opm brew registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm brew search &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm brew search &lt;name&gt; &lt;version&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm brew view &lt;name&gt;</code></td><td><code>brew list --versions &lt;name&gt;</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm brew info &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询包详情(描述/主页/许可证/仓库等)</td></tr><tr><td><code>opm brew versions &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm brew list</code></td><td><code>brew list --versions</code></td><td>列出所有已安装包(formulae + casks)</td></tr><tr><td><code>opm brew outdated</code></td><td><code>brew outdated --json=v2</code></td><td>列出过期包</td></tr><tr><td><code>opm brew install &lt;name&gt;</code></td><td><code>brew install &lt;name&gt;</code></td><td>安装包(formula / cask 均可)</td></tr><tr><td><code>opm brew install &lt;name&gt; &lt;version&gt;</code></td><td><code>brew install &lt;name&gt;@&lt;version&gt;</code></td><td>安装指定版本(versioned formula)</td></tr><tr><td><code>opm brew uninstall &lt;name&gt;</code></td><td><code>brew uninstall &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm brew upgrade &lt;name&gt;</code></td><td><code>brew upgrade &lt;name&gt;</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm brew cache clean</code></td><td><code>brew cleanup -s --prune=all</code></td><td>清理缓存</td></tr><tr><td><code>opm brew help</code></td><td>—</td><td>显示 brew 命令清单</td></tr></tbody></table>
137
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm brew version [name]</code></td><td><code>brew --version</code></td><td>无 name 显示 brew 本身版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm brew registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>brew.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm brew registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>brew.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动传 <code>HOMEBREW_API_DOMAIN</code> / <code>HOMEBREW_BOTTLE_DOMAIN</code>;仅作用于本工具发起的命令,不改系统 brew 配置)</td></tr><tr><td><code>opm brew registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm brew search &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm brew search &lt;name&gt; &lt;version&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm brew view &lt;name&gt;</code></td><td><code>brew list --versions &lt;name&gt;</code></td><td>查询包在全局作用域的安装信息(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm brew info &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>查询包详情(描述/主页/许可证/仓库等)</td></tr><tr><td><code>opm brew versions &lt;name&gt;</code></td><td><code>brew info --json=v2 &lt;name&gt;</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm brew outdated</code></td><td><code>brew outdated --json=v2</code></td><td>列出过期包</td></tr><tr><td><code>opm brew install &lt;name&gt;</code></td><td><code>brew install &lt;name&gt;</code></td><td>安装包(formula / cask 均可)</td></tr><tr><td><code>opm brew install &lt;name&gt; &lt;version&gt;</code></td><td><code>brew install &lt;name&gt;@&lt;version&gt;</code></td><td>安装指定版本(versioned formula)</td></tr><tr><td><code>opm brew uninstall &lt;name&gt;</code></td><td><code>brew uninstall &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm brew upgrade &lt;name&gt;</code></td><td><code>brew upgrade &lt;name&gt;</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm brew cache clean</code></td><td><code>brew cleanup -s --prune=all</code></td><td>清理缓存</td></tr><tr><td><code>opm brew help</code></td><td>—</td><td>显示 brew 命令清单</td></tr></tbody></table>
138
138
  <h2>镜像预设</h2>
139
139
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>official</code></td><td><code>https://ghcr.io/v2/homebrew</code></td></tr><tr><td><code>tsinghua</code></td><td><code>https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles</code></td></tr><tr><td><code>ustc</code></td><td><code>https://mirrors.ustc.edu.cn/homebrew-bottles</code></td></tr></tbody></table>
140
140
  <blockquote>镜像预设记录的是 bottle 域名;使用非 official 镜像时,<code>HOMEBREW_API_DOMAIN</code> 取 <code>${bottle}/api</code>,<code>HOMEBREW_BOTTLE_DOMAIN</code> 取 bottle 域名本身。</blockquote>
@@ -163,9 +163,6 @@ opm brew info wget
163
163
  # 列出 wget 所有可用版本
164
164
  opm brew versions wget
165
165
 
166
- # 列出所有已安装包
167
- opm brew list
168
-
169
166
  # 列出过期包
170
167
  opm brew outdated
171
168
 
@@ -190,7 +187,7 @@ opm brew help</code></pre></div>
190
187
  <p><code>@wwkit/opm</code> 统一命令管理 Bun 包。</p>
191
188
  <p>Bun 是全栈 JS 工具链(runtime + 包管理器 + 打包器),包管理与 npm 兼容。</p>
192
189
  <h2>命令对照</h2>
193
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm bun version</code></td><td><code>bun --version</code></td><td>查看 bun 版本</td></tr><tr><td><code>opm bun registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>bun.registry.active</code></td><td>查询 bun registry 镜像</td></tr><tr><td><code>opm bun registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code></td><td>设置 bun registry 镜像(传给 <code>BUN_CONFIG_REGISTRY</code>)</td></tr><tr><td><code>opm bun registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm bun search &lt;name&gt; [version]</code></td><td>HTTP 查 npm registry</td><td>查询包是否可用</td></tr><tr><td><code>opm bun view &lt;name&gt; [-g]</code></td><td>查 <code>node_modules/&lt;name&gt;/package.json</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm bun info &lt;name&gt;</code></td><td>HTTP 查 npm registry</td><td>显示包详情</td></tr><tr><td><code>opm bun versions &lt;name&gt;</code></td><td>HTTP 查 npm registry</td><td>列出所有可用版本</td></tr><tr><td><code>opm bun list [-g]</code></td><td><code>bun pm ls</code></td><td>列出已安装包</td></tr><tr><td><code>opm bun outdated [-g]</code></td><td><code>bun outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm bun install &lt;name&gt; [version]</code></td><td><code>bun add &lt;name&gt;@&lt;version&gt;</code></td><td>安装包</td></tr><tr><td><code>opm bun uninstall &lt;name&gt;</code></td><td><code>bun remove &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm bun upgrade &lt;name&gt;</code></td><td><code>bun update &lt;name&gt;</code></td><td>升级包</td></tr><tr><td><code>opm bun cache clean</code></td><td><code>bun pm cache rm</code></td><td>清理缓存</td></tr></tbody></table>
190
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm bun version [name]</code></td><td><code>bun --version</code></td><td>无 name 显示 bun 版本;有 name 显示包在全局与项目作用域的版本</td></tr><tr><td><code>opm bun registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>bun.registry.active</code></td><td>查询 bun registry 镜像</td></tr><tr><td><code>opm bun registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code></td><td>设置 bun registry 镜像(传给 <code>BUN_CONFIG_REGISTRY</code>)</td></tr><tr><td><code>opm bun registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm bun search &lt;name&gt; [version]</code></td><td>HTTP 查 npm registry</td><td>查询包是否可用</td></tr><tr><td><code>opm bun view &lt;name&gt;</code></td><td>查 <code>node_modules/&lt;name&gt;/package.json</code></td><td>查询包在全局与项目作用域的安装信息</td></tr><tr><td><code>opm bun info &lt;name&gt;</code></td><td>HTTP 查 npm registry</td><td>显示包详情</td></tr><tr><td><code>opm bun versions &lt;name&gt;</code></td><td>HTTP 查 npm registry</td><td>列出所有可用版本</td></tr><tr><td><code>opm bun outdated [-g]</code></td><td><code>bun outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm bun install &lt;name&gt; [version]</code></td><td><code>bun add &lt;name&gt;@&lt;version&gt;</code></td><td>安装包</td></tr><tr><td><code>opm bun uninstall &lt;name&gt;</code></td><td><code>bun remove &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm bun upgrade &lt;name&gt;</code></td><td><code>bun update &lt;name&gt;</code></td><td>升级包</td></tr><tr><td><code>opm bun cache clean</code></td><td><code>bun pm cache rm</code></td><td>清理缓存</td></tr></tbody></table>
194
191
  <h2>镜像预设</h2>
195
192
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>official</code></td><td><code>https://registry.npmjs.org/</code></td></tr><tr><td><code>taobao</code></td><td><code>https://registry.npmmirror.com/</code></td></tr><tr><td><code>huawei</code></td><td><code>https://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-central-repo/</code></td></tr></tbody></table>
196
193
  <blockquote>镜像通过 <code>BUN_CONFIG_REGISTRY</code> 环境变量传递给 bun 命令。</blockquote>
@@ -199,7 +196,6 @@ opm brew help</code></pre></div>
199
196
  opm bun registry set taobao
200
197
  opm bun search axios
201
198
  opm bun info react
202
- opm bun list
203
199
  opm bun outdated
204
200
  opm bun install axios
205
201
  opm bun install react@18
@@ -236,7 +232,7 @@ opm cft registry set official</code></pre></div>
236
232
  <div id="managers_composer" class="doc-content" style="display:none;"><h1>composer 命令对照表</h1>
237
233
  <p><code>@wwkit/opm</code> 统一命令与 Composer(PHP)原始命令的映射关系。</p>
238
234
  <h2>命令对照</h2>
239
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm composer version</code></td><td><code>composer --version</code></td><td>查看 composer 本身版本</td></tr><tr><td><code>opm composer registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>composer.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm composer registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>composer.registry.active</code></td><td>设置激活镜像(支持预设名;镜像作用于 search/info/versions 的 P2 元数据拉取)</td></tr><tr><td><code>opm composer registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm composer search &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm composer search &lt;name&gt; &lt;version&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm composer view &lt;name&gt;</code></td><td>读 <code>vendor/composer/installed.json</code></td><td>查询包是否已安装(项目本地)</td></tr><tr><td><code>opm composer info &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm composer versions &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm composer list</code></td><td>读 <code>vendor/composer/installed.json</code></td><td>列出所有已安装包</td></tr><tr><td><code>opm composer outdated</code></td><td><code>composer outdated --format=json</code></td><td>列出过期包</td></tr><tr><td><code>opm composer install &lt;name&gt;</code></td><td><code>composer require &lt;name&gt; --no-interaction</code></td><td>安装包</td></tr><tr><td><code>opm composer install &lt;name&gt; &lt;version&gt;</code></td><td><code>composer require &lt;name&gt;:&lt;version&gt; --no-interaction</code></td><td>安装指定版本约束</td></tr><tr><td><code>opm composer uninstall &lt;name&gt;</code></td><td><code>composer remove &lt;name&gt; --no-interaction</code></td><td>卸载包</td></tr><tr><td><code>opm composer upgrade &lt;name&gt;</code></td><td><code>composer update &lt;name&gt; --no-interaction</code></td><td>升级包</td></tr><tr><td><code>opm composer cache clean</code></td><td><code>composer clear-cache</code></td><td>清理缓存</td></tr><tr><td><code>opm composer help</code></td><td>—</td><td>显示 composer 命令清单</td></tr></tbody></table>
235
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm composer version [name]</code></td><td><code>composer --version</code></td><td>无 name 显示 composer 本身版本;有 name 显示包在项目作用域的版本(无全局作用域,global 显示未安装)</td></tr><tr><td><code>opm composer registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>composer.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm composer registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>composer.registry.active</code></td><td>设置激活镜像(支持预设名;镜像作用于 search/info/versions 的 P2 元数据拉取)</td></tr><tr><td><code>opm composer registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm composer search &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm composer search &lt;name&gt; &lt;version&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm composer view &lt;name&gt;</code></td><td>读 <code>vendor/composer/installed.json</code></td><td>查询包在项目作用域的安装信息(无全局作用域,global 显示未安装)</td></tr><tr><td><code>opm composer info &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm composer versions &lt;name&gt;</code></td><td><code>{registry}/p2/{name}.json</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm composer outdated</code></td><td><code>composer outdated --format=json</code></td><td>列出过期包</td></tr><tr><td><code>opm composer install &lt;name&gt;</code></td><td><code>composer require &lt;name&gt; --no-interaction</code></td><td>安装包</td></tr><tr><td><code>opm composer install &lt;name&gt; &lt;version&gt;</code></td><td><code>composer require &lt;name&gt;:&lt;version&gt; --no-interaction</code></td><td>安装指定版本约束</td></tr><tr><td><code>opm composer uninstall &lt;name&gt;</code></td><td><code>composer remove &lt;name&gt; --no-interaction</code></td><td>卸载包</td></tr><tr><td><code>opm composer upgrade &lt;name&gt;</code></td><td><code>composer update &lt;name&gt; --no-interaction</code></td><td>升级包</td></tr><tr><td><code>opm composer cache clean</code></td><td><code>composer clear-cache</code></td><td>清理缓存</td></tr><tr><td><code>opm composer help</code></td><td>—</td><td>显示 composer 命令清单</td></tr></tbody></table>
240
236
  <h2>镜像预设</h2>
241
237
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>official</code></td><td><code>https://repo.packagist.org</code></td></tr><tr><td><code>aliyun</code></td><td><code>https://mirrors.aliyun.com/composer</code></td></tr><tr><td><code>tencent</code></td><td><code>https://mirrors.cloud.tencent.com/composer</code></td></tr></tbody></table>
242
238
  <blockquote>镜像作用于 search/info/versions 的 Packagist P2 元数据拉取(<code>{base}/p2/{vendor}/{package}.json</code>)。<br>install/upgrade 使用 composer CLI 自身的仓库配置(项目 composer.json / 全局 config)。</blockquote>
@@ -268,9 +264,6 @@ opm composer info monolog/monolog
268
264
  # 列出 monolog/monolog 所有可用版本
269
265
  opm composer versions monolog/monolog
270
266
 
271
- # 列出所有已安装包
272
- opm composer list
273
-
274
267
  # 列出过期包
275
268
  opm composer outdated
276
269
 
@@ -310,7 +303,7 @@ opm config python.registry</code></pre></div>
310
303
  <div id="managers_dnf" class="doc-content" style="display:none;"><h1>dnf 命令对照表</h1>
311
304
  <p><code>@wwkit/opm</code> 统一命令管理 dnf 包(Fedora / RHEL / EulerOS 等 rpm 系,系统级)。</p>
312
305
  <h2>命令对照</h2>
313
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm dnf version</code></td><td><code>dnf --version</code></td><td>查看 dnf 版本</td></tr><tr><td><code>opm dnf registry</code></td><td>读 <code>/etc/yum.repos.d/opm.repo</code></td><td>查询当前启用仓库</td></tr><tr><td><code>opm dnf registry set &lt;url|preset&gt;</code></td><td>写 <code>/etc/yum.repos.d/opm.repo</code> + <code>dnf clean</code></td><td>设置镜像仓库</td></tr><tr><td><code>opm dnf registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm dnf search &lt;name&gt;</code></td><td><code>dnf search</code></td><td>查询包在源是否可用</td></tr><tr><td><code>opm dnf view &lt;name&gt;</code></td><td><code>dnf list installed</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm dnf info &lt;name&gt;</code></td><td><code>dnf info</code></td><td>包详情</td></tr><tr><td><code>opm dnf versions &lt;name&gt;</code></td><td><code>dnf list --showduplicates</code></td><td>所有可用版本</td></tr><tr><td><code>opm dnf list</code></td><td><code>dnf list installed</code></td><td>已安装包列表</td></tr><tr><td><code>opm dnf outdated</code></td><td><code>dnf check-update</code></td><td>过期包</td></tr><tr><td><code>opm dnf install &lt;name&gt;</code></td><td><code>dnf install</code></td><td>安装</td></tr><tr><td><code>opm dnf uninstall &lt;name&gt;</code></td><td><code>dnf remove</code></td><td>卸载</td></tr><tr><td><code>opm dnf upgrade &lt;name&gt;</code></td><td><code>dnf upgrade</code></td><td>升级</td></tr><tr><td><code>opm dnf cache clean</code></td><td><code>dnf clean all</code></td><td>清理缓存</td></tr></tbody></table>
306
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm dnf version [name]</code></td><td><code>dnf --version</code></td><td>无 name 显示 dnf 版本;有 name 显示包在全局作用域的版本(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm dnf registry</code></td><td>读 <code>/etc/yum.repos.d/opm.repo</code></td><td>查询当前启用仓库</td></tr><tr><td><code>opm dnf registry set &lt;url|preset&gt;</code></td><td>写 <code>/etc/yum.repos.d/opm.repo</code> + <code>dnf clean</code></td><td>设置镜像仓库</td></tr><tr><td><code>opm dnf registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm dnf search &lt;name&gt;</code></td><td><code>dnf search</code></td><td>查询包在源是否可用</td></tr><tr><td><code>opm dnf view &lt;name&gt;</code></td><td><code>dnf list installed</code></td><td>查询包在全局作用域的安装信息(无项目作用域,project 显示未安装)</td></tr><tr><td><code>opm dnf info &lt;name&gt;</code></td><td><code>dnf info</code></td><td>包详情</td></tr><tr><td><code>opm dnf versions &lt;name&gt;</code></td><td><code>dnf list --showduplicates</code></td><td>所有可用版本</td></tr><tr><td><code>opm dnf outdated</code></td><td><code>dnf check-update</code></td><td>过期包</td></tr><tr><td><code>opm dnf install &lt;name&gt;</code></td><td><code>dnf install</code></td><td>安装</td></tr><tr><td><code>opm dnf uninstall &lt;name&gt;</code></td><td><code>dnf remove</code></td><td>卸载</td></tr><tr><td><code>opm dnf upgrade &lt;name&gt;</code></td><td><code>dnf upgrade</code></td><td>升级</td></tr><tr><td><code>opm dnf cache clean</code></td><td><code>dnf clean all</code></td><td>清理缓存</td></tr></tbody></table>
314
307
  <h2>镜像预设</h2>
315
308
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>hce</code></td><td><code>http://his-mirrors.huawei.com/install/hce/2.0/os/x86_64/</code></td></tr><tr><td><code>hce-updates</code></td><td><code>http://his-mirrors.huawei.com/install/hce/2.0/updates/x86_64/</code></td></tr><tr><td><code>fedora</code></td><td><code>https://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/</code></td></tr><tr><td><code>fedora-updates</code></td><td><code>https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/$basearch/</code></td></tr><tr><td><code>epel</code></td><td><code>https://dl.fedoraproject.org/pub/epel/$releasever/Everything/$basearch/</code></td></tr><tr><td><code>epel-testing</code></td><td><code>https://dl.fedoraproject.org/pub/epel/testing/$releasever/Everything/$basearch/</code></td></tr></tbody></table>
316
309
  <h2>示例</h2>
@@ -400,7 +393,7 @@ opm node upgrade</code></pre></div>
400
393
  <div id="managers_npm" class="doc-content" style="display:none;"><h1>npm 命令对照表</h1>
401
394
  <p><code>@wwkit/opm</code> 统一命令与 npm 原始命令的映射关系。</p>
402
395
  <h2>命令对照</h2>
403
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm npm version</code></td><td><code>npm --version</code></td><td>查看 npm 本身版本</td></tr><tr><td><code>opm npm registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>npm.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm npm registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>npm.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动带 <code>--registry</code>)</td></tr><tr><td><code>opm npm registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm npm search &lt;name&gt;</code></td><td><code>npm view &lt;name&gt;</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm npm search &lt;name&gt; &lt;version&gt;</code></td><td><code>npm view &lt;name&gt;@&lt;version&gt;</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm npm view &lt;name&gt;</code></td><td><code>npm list &lt;name&gt;</code> / 读 <code>node_modules/&lt;name&gt;/package.json</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm npm info &lt;name&gt;</code></td><td><code>npm view &lt;name&gt;</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm npm versions &lt;name&gt;</code></td><td><code>npm view &lt;name&gt; versions</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm npm list</code></td><td><code>npm list --depth=0</code></td><td>列出所有已安装包</td></tr><tr><td><code>opm npm outdated</code></td><td><code>npm outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm npm install &lt;name&gt;</code></td><td><code>npm install &lt;name&gt;</code></td><td>安装包</td></tr><tr><td><code>opm npm install &lt;name&gt; &lt;version&gt;</code></td><td><code>npm install &lt;name&gt;@&lt;version&gt;</code></td><td>安装指定版本</td></tr><tr><td><code>opm npm install -g &lt;name&gt;</code></td><td><code>npm install -g &lt;name&gt;</code></td><td>全局安装</td></tr><tr><td><code>opm npm uninstall &lt;name&gt;</code></td><td><code>npm uninstall &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm npm uninstall -g &lt;name&gt;</code></td><td><code>npm uninstall -g &lt;name&gt;</code></td><td>全局卸载</td></tr><tr><td><code>opm npm upgrade &lt;name&gt;</code></td><td><code>npm install &lt;name&gt;@latest</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm npm upgrade -g &lt;name&gt;</code></td><td><code>npm install -g &lt;name&gt;@latest</code></td><td>全局升级</td></tr><tr><td><code>opm npm cache clean</code></td><td><code>npm cache clean --force</code></td><td>清理缓存</td></tr><tr><td><code>opm npm help</code></td><td>—</td><td>显示 npm 命令清单</td></tr></tbody></table>
396
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm npm version [name]</code></td><td><code>npm --version</code></td><td>无 name 显示 npm 本身版本;有 name 显示包在全局与项目作用域的版本</td></tr><tr><td><code>opm npm registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>npm.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm npm registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>npm.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动带 <code>--registry</code>)</td></tr><tr><td><code>opm npm registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm npm search &lt;name&gt;</code></td><td><code>npm view &lt;name&gt;</code></td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm npm search &lt;name&gt; &lt;version&gt;</code></td><td><code>npm view &lt;name&gt;@&lt;version&gt;</code></td><td>查询指定版本是否可用</td></tr><tr><td><code>opm npm view &lt;name&gt;</code></td><td><code>npm list &lt;name&gt;</code> / 读 <code>node_modules/&lt;name&gt;/package.json</code></td><td>查询包在全局与项目作用域的安装信息</td></tr><tr><td><code>opm npm info &lt;name&gt;</code></td><td><code>npm view &lt;name&gt;</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm npm versions &lt;name&gt;</code></td><td><code>npm view &lt;name&gt; versions</code></td><td>列出所有可用版本</td></tr><tr><td><code>opm npm outdated</code></td><td><code>npm outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm npm install &lt;name&gt;</code></td><td><code>npm install &lt;name&gt;</code></td><td>安装包</td></tr><tr><td><code>opm npm install &lt;name&gt; &lt;version&gt;</code></td><td><code>npm install &lt;name&gt;@&lt;version&gt;</code></td><td>安装指定版本</td></tr><tr><td><code>opm npm install -g &lt;name&gt;</code></td><td><code>npm install -g &lt;name&gt;</code></td><td>全局安装</td></tr><tr><td><code>opm npm uninstall &lt;name&gt;</code></td><td><code>npm uninstall &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm npm uninstall -g &lt;name&gt;</code></td><td><code>npm uninstall -g &lt;name&gt;</code></td><td>全局卸载</td></tr><tr><td><code>opm npm upgrade &lt;name&gt;</code></td><td><code>npm install &lt;name&gt;@latest</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm npm upgrade -g &lt;name&gt;</code></td><td><code>npm install -g &lt;name&gt;@latest</code></td><td>全局升级</td></tr><tr><td><code>opm npm cache clean</code></td><td><code>npm cache clean --force</code></td><td>清理缓存</td></tr><tr><td><code>opm npm help</code></td><td>—</td><td>显示 npm 命令清单</td></tr></tbody></table>
404
397
  <h2>镜像预设</h2>
405
398
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>official</code></td><td><code>https://registry.npmjs.org/</code></td></tr><tr><td><code>taobao</code></td><td><code>https://registry.npmmirror.com/</code></td></tr><tr><td><code>huawei</code></td><td><code>https://cmc.centralrepo.rnd.huawei.com/artifactory/api/npm/npm-central-repo/</code></td></tr></tbody></table>
406
399
  <h2>选项</h2>
@@ -431,9 +424,6 @@ opm npm info axios
431
424
  # 列出 axios 所有版本
432
425
  opm npm versions axios
433
426
 
434
- # 列出所有已安装包
435
- opm npm list
436
-
437
427
  # 列出过期包
438
428
  opm npm outdated
439
429
 
@@ -505,7 +495,7 @@ opm phpenv uninstall</code></pre></div>
505
495
  <div id="managers_pip" class="doc-content" style="display:none;"><h1>pip 命令对照表</h1>
506
496
  <p><code>@wwkit/opm</code> 统一命令与 pip 原始命令的映射关系。</p>
507
497
  <h2>命令对照</h2>
508
- <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm pip version</code></td><td><code>pip --version</code></td><td>查看 pip 本身版本</td></tr><tr><td><code>opm pip registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>pip.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm pip registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>pip.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动带 <code>--index-url</code>)</td></tr><tr><td><code>opm pip registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm pip search &lt;name&gt;</code></td><td>PyPI JSON API / simple index</td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm pip search &lt;name&gt; &lt;version&gt;</code></td><td>PyPI JSON API / simple index</td><td>查询指定版本是否可用</td></tr><tr><td><code>opm pip view &lt;name&gt;</code></td><td><code>pip show &lt;name&gt;</code></td><td>查询包是否已安装</td></tr><tr><td><code>opm pip info &lt;name&gt;</code></td><td>PyPI JSON API / <code>pip show &lt;name&gt;</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm pip versions &lt;name&gt;</code></td><td>PyPI JSON API / simple index</td><td>列出所有可用版本</td></tr><tr><td><code>opm pip list</code></td><td><code>pip list --format=freeze</code></td><td>列出所有已安装包</td></tr><tr><td><code>opm pip outdated</code></td><td><code>pip list --outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm pip install &lt;name&gt;</code></td><td><code>pip install &lt;name&gt;</code></td><td>安装包</td></tr><tr><td><code>opm pip install &lt;name&gt; &lt;version&gt;</code></td><td><code>pip install &lt;name&gt;==&lt;version&gt;</code></td><td>安装指定版本</td></tr><tr><td><code>opm pip uninstall &lt;name&gt;</code></td><td><code>pip uninstall -y &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm pip upgrade &lt;name&gt;</code></td><td><code>pip install --upgrade &lt;name&gt;</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm pip cache clean</code></td><td><code>pip cache purge</code></td><td>清理缓存</td></tr><tr><td><code>opm pip help</code></td><td>—</td><td>显示 pip 命令清单</td></tr></tbody></table>
498
+ <table><thead><tr><th>统一命令</th><th>原始命令</th><th>说明</th></tr></thead><tbody><tr><td><code>opm pip version [name]</code></td><td><code>pip --version</code></td><td>无 name 显示 pip 本身版本;有 name 显示包在全局与项目作用域的版本</td></tr><tr><td><code>opm pip registry</code></td><td>读 <code>~/.config/opm/config.json5</code> 的 <code>pip.registry.active</code></td><td>查询配置中的激活镜像(不读系统配置)</td></tr><tr><td><code>opm pip registry set &lt;url|preset&gt;</code></td><td>写 <code>~/.config/opm/config.json5</code> 的 <code>pip.registry.active</code></td><td>设置激活镜像(支持预设名,install/upgrade 自动带 <code>--index-url</code>)</td></tr><tr><td><code>opm pip registry presets</code></td><td>—</td><td>列出可用镜像预设</td></tr><tr><td><code>opm pip search &lt;name&gt;</code></td><td>PyPI JSON API / simple index</td><td>查询包在源是否可用(返回最新版本 + 版本列表)</td></tr><tr><td><code>opm pip search &lt;name&gt; &lt;version&gt;</code></td><td>PyPI JSON API / simple index</td><td>查询指定版本是否可用</td></tr><tr><td><code>opm pip view &lt;name&gt;</code></td><td><code>pip show &lt;name&gt;</code></td><td>查询包在全局与项目作用域的安装信息</td></tr><tr><td><code>opm pip info &lt;name&gt;</code></td><td>PyPI JSON API / <code>pip show &lt;name&gt;</code></td><td>查询包详情(描述/作者/主页/许可证等)</td></tr><tr><td><code>opm pip versions &lt;name&gt;</code></td><td>PyPI JSON API / simple index</td><td>列出所有可用版本</td></tr><tr><td><code>opm pip outdated</code></td><td><code>pip list --outdated</code></td><td>列出过期包</td></tr><tr><td><code>opm pip install &lt;name&gt;</code></td><td><code>pip install &lt;name&gt;</code></td><td>安装包</td></tr><tr><td><code>opm pip install &lt;name&gt; &lt;version&gt;</code></td><td><code>pip install &lt;name&gt;==&lt;version&gt;</code></td><td>安装指定版本</td></tr><tr><td><code>opm pip uninstall &lt;name&gt;</code></td><td><code>pip uninstall -y &lt;name&gt;</code></td><td>卸载包</td></tr><tr><td><code>opm pip upgrade &lt;name&gt;</code></td><td><code>pip install --upgrade &lt;name&gt;</code></td><td>升级包到最新版本</td></tr><tr><td><code>opm pip cache clean</code></td><td><code>pip cache purge</code></td><td>清理缓存</td></tr><tr><td><code>opm pip help</code></td><td>—</td><td>显示 pip 命令清单</td></tr></tbody></table>
509
499
  <h2>镜像预设</h2>
510
500
  <table><thead><tr><th>预设名</th><th>地址</th></tr></thead><tbody><tr><td><code>official</code></td><td><code>https://pypi.org/simple</code></td></tr><tr><td><code>tsinghua</code></td><td><code>https://pypi.tuna.tsinghua.edu.cn/simple</code></td></tr><tr><td><code>huawei</code></td><td><code>https://cmc.centralrepo.rnd.huawei.com/artifactory/api/pypi/pypi-repo/simple</code></td></tr></tbody></table>
511
501
  <h2>选项</h2>
@@ -536,9 +526,6 @@ opm pip info requests
536
526
  # 列出 requests 所有版本
537
527
  opm pip versions requests
538
528
 
539
- # 列出所有已安装包
540
- opm pip list
541
-
542
529
  # 列出过期包
543
530
  opm pip outdated
544
531
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwkit/opm",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "author": "bluesliu <langcai163@163.com>",
5
5
  "description": "Unified CLI — package management (npm/pip/dnf/apt) + config view + opencode maintenance",
6
6
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  "basic-ftp": "^6.2.1",
36
36
  "extract-zip": "^2.0.1",
37
37
  "systeminformation": "^5.23.0",
38
- "@wwkit/harness": "1.0.17",
39
- "@wwkit/shared": "1.0.11"
38
+ "@wwkit/harness": "1.0.18",
39
+ "@wwkit/shared": "1.0.12"
40
40
  },
41
41
  "publishConfig": {
42
42
  "registry": "https://registry.npmjs.org/",