UiPath CLI 用户指南
uip tools管理扩展 CLI 的可安装工具。有关概念,请参阅工具(插件) 。
有关如何控制 CI 运行器上的自动安装,请参阅控制工具自动安装。
大纲
uip tools list
uip tools search [<query>]
uip tools install <package-spec>
uip tools update [--name <package>] [--version <version>]
uip tools uninstall <package>
uip tools list
uip tools search [<query>]
uip tools install <package-spec>
uip tools update [--name <package>] [--version <version>]
uip tools uninstall <package>
UIP 工具列表
列出当前与 CLI 一起安装的工具。
参数
无。
选项
无。
示例
uip tools list --output table
uip tools list --output table
Data shape (--output json)
{
"Code": "ToolList",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"version": "1.0.2",
"commandPrefix": "or"
},
{
"name": "@uipath/solution-tool",
"version": "1.0.1",
"commandPrefix": "solution"
}
]
}
{
"Code": "ToolList",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"version": "1.0.2",
"commandPrefix": "or"
},
{
"name": "@uipath/solution-tool",
"version": "1.0.1",
"commandPrefix": "solution"
}
]
}
commandPrefix是您输入的顶层别名,例如or表示 Orchestrator。用于确认实际运行的uip <prefix> … 。
UIP 工具搜索
在 UiPath 工具目录中搜索您可以安装的工具。系统将结果筛选到已列入白名单的@uipath/工具(包括需要显式安装的flow和rpa-legacy )。不会返回第三方包。
参数
<query>(可选) — 根据包名称和说明进行子字符串匹配。否则,系统将列出所有列入白名单的工具。
选项
无。
示例
uip tools search orchestrator
uip tools search orchestrator
Data shape (--output json)
{
"Code": "SearchResult",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"latestVersion": "1.0.2",
"description": "Orchestrator jobs, folders, processes, packages, and resources",
"availableVersions": ["1.0.0", "1.0.1", "1.0.2"]
}
]
}
{
"Code": "SearchResult",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"latestVersion": "1.0.2",
"description": "Orchestrator jobs, folders, processes, packages, and resources",
"availableVersions": ["1.0.0", "1.0.1", "1.0.2"]
}
]
}
搜索从为@uipath作用域配置的 npm 注册表(通常是https://registry.npmjs.org/通过默认的 npm 配置,或在.npmrc中设置的覆盖注册表)读取。结果将在客户端根据白名单进行筛选,因此任何不在白名单中的@uipath/包都将被省略。
安装 UIP 工具
从 npm 安装列入白名单的工具。
参数
<package-spec>(必填) — 要安装的工具。以下任何一项:- 命令别名:
or、solution、tm、is、vss、df、… - 简称:
orchestrator-tool、solution-tool、... - npm 完整名称:
@uipath/orchestrator-tool、@uipath/solution-tool、… - 使用显式版本:
orchestrator-tool@1.0.2、@uipath/orchestrator-tool@1.0.2、orchestrator-tool@beta。
- 命令别名:
选项
无。
示例
# by alias — simplest
uip tools install or
# by short name
uip tools install orchestrator-tool
# by full npm name
uip tools install @uipath/orchestrator-tool
# specific version
uip tools install orchestrator-tool@1.0.2
# preview channel (npm dist-tag)
uip tools install orchestrator-tool@beta
# by alias — simplest
uip tools install or
# by short name
uip tools install orchestrator-tool
# by full npm name
uip tools install @uipath/orchestrator-tool
# specific version
uip tools install orchestrator-tool@1.0.2
# preview channel (npm dist-tag)
uip tools install orchestrator-tool@beta
Version resolution
- 若为显式版本(
@1.0.2或@beta),将按原样使用该版本。 - 如果没有版本,主机会选择与 CLI 的当前 MAJOR.MINOR 行匹配的最新已发布版本,因此 CLI
1.0.x将安装工具1.0.*。这可以保持主机和工具协议兼容。请参阅版本控制和稳定性。
安装目标:该工具在 CLI 的 npm 包旁边安装 — 如果 CLI 是全局安装,则安装全局;如果 CLI 是项目范围安装,则安装在本地。您未传递作用域标志。运行npm root -g以查找计算机上的全局安装路径。
白名单强制执行: <package-spec>必须解析为列入白名单的@uipath/包之一(或rpa-legacy )。使用任何其他值都会失败,并显示ValidationError和退出代码 3 — 1.x 版本不支持第三方工具。
Data shape (--output json)
{
"Code": "Message",
"Data": { "Message": "Successfully installed @uipath/orchestrator-tool@1.0.2" }
}
{
"Code": "Message",
"Data": { "Message": "Successfully installed @uipath/orchestrator-tool@1.0.2" }
}
uip 工具更新
将一个或多个已安装的工具更新到最新的兼容版本。
参数
无。
选项
--name <package>— 更新单个工具。接受别名、短名称或 npm 完整名称。如果没有--name,系统将更新每个已安装的工具。--version <version>— 目标版本。默认值为latest,其解析方式与install相同(固定到 CLI 的 MAJOR.MINOR 行)。传递确切版本 (1.0.3) 或距离标签 (beta) 进行覆盖。
示例
# update every installed tool to the latest version within the CLI's major.minor line
uip tools update
# update just the Orchestrator tool
uip tools update --name or
# pin a specific tool to an exact version
uip tools update --name orchestrator-tool --version 1.0.3
# switch a tool to a preview channel
uip tools update --name flow-tool --version beta
# update every installed tool to the latest version within the CLI's major.minor line
uip tools update
# update just the Orchestrator tool
uip tools update --name or
# pin a specific tool to an exact version
uip tools update --name orchestrator-tool --version 1.0.3
# switch a tool to a preview channel
uip tools update --name flow-tool --version beta
Data shape (--output json)
{
"Code": "UpdateResult",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"status": "updated",
"from": "1.0.1",
"to": "1.0.2"
},
{
"name": "@uipath/solution-tool",
"status": "up-to-date",
"from": "1.0.1",
"to": "1.0.1"
}
]
}
{
"Code": "UpdateResult",
"Data": [
{
"name": "@uipath/orchestrator-tool",
"status": "updated",
"from": "1.0.1",
"to": "1.0.2"
},
{
"name": "@uipath/solution-tool",
"status": "up-to-date",
"from": "1.0.1",
"to": "1.0.1"
}
]
}
即使部分失败,系统仍始终会发出每个工具的结果。如果有任何工具更新失败,该命令以非零退出代码退出,并且失败的条目会带有error字段。
UIP 工具卸载
删除已安装的工具。
参数
<package>(必填) — 别名、短名称或 npm 完整名称。
选项
无。
示例
uip tools uninstall or
uip tools uninstall @uipath/solution-tool
uip tools uninstall or
uip tools uninstall @uipath/solution-tool
Data shape (--output json)
{
"Code": "Message",
"Data": { "Message": "Successfully uninstalled @uipath/orchestrator-tool" }
}
{
"Code": "Message",
"Data": { "Message": "Successfully uninstalled @uipath/orchestrator-tool" }
}
卸载后,调用uip or …将在下次使用时再次自动安装 Orchestrator 工具,除非自动安装被阻止(例如,在无法访问网络的运行器上)。显式安装可以避免这种情况。
退出代码
0— 成功。1— 失败(安装、更新、卸载或工具级错误)。对于具有多个工具的update,至少一个工具失败。3— 验证错误(未知别名、未列入白名单的包、无效的版本字符串)。
有关完整表格,请参阅退出代码。
另请参阅
- 工具(插件) — 插件模型、版本固定、安装位置和第三方支持。
- 安装 UiPath CLI — 安装主机,然后引入工具。
- 控制工具自动安装— 为什么没有选择退出,以及如何保持 CI 构建时间的确定。
- 版本控制和稳定性——主机和工具之间的 semver 合同。