UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UIP 工具

"uiptools" 的语法和选项,用于安装、更新和删除基于 npm 的 UiPath CLI 扩展工具。

uip tools管理扩展 CLI 的可安装工具。有关概念,请参阅工具(插件) 。

有关如何控制 CI 运行器上的自动安装,请参阅控制工具自动安装。

大纲​

uip tools list
uip tools search [<query>]
uip tools install <package-spec>
uip tools update [--name <package>]
uip tools uninstall [<package>] [--all]
uip tools list
uip tools search [<query>]
uip tools install <package-spec>
uip tools update [--name <package>]
uip tools uninstall [<package>] [--all]

所有uip tools子命令均采用全局选项( --output 、 --output-filter 、 --log-level 、 --log-file )。退出代码遵循标准合同。

UIP 工具列表​

列出当前与 CLI 一起安装的工具。

参数​

无。

选项​

无。

示例​

uip tools list --output table
uip tools list --output table

数据形状 ( --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> … 。

在 UiPath 工具目录中搜索您可以安装的工具。系统将筛选结果中允许的 @uipath/ 工具(包括需要显式安装的 rpa-legacy)。不会返回第三方包。

参数​

  • <query> (可选) — 根据包名称和说明进行子字符串匹配。否则系统将列出所有允许的工具。

选项​

无。

示例​

uip tools search orchestrator
uip tools search orchestrator

数据形状 ( --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 注册表(通常是通过默认 npm 配置的 https://registry.npmjs.org/,或在 .npmrc 中设置的覆盖注册表)读取。系统将根据允许列表在客户端筛选结果,因此会省略任何未在允许列表中的 @uipath/ 包。

安装 UIP 工具​

从 npm 安装列入允许列表的工具。

参数​

  • <package-spec> (必填) — 要安装的工具。以下任何一项:
    • 命令别名: or 、 solution 、 tm 、 is 、 vss 、 df 、…
    • 简称: orchestrator-tool 、 solution-tool 、...
    • npm 完整名称: @uipath/orchestrator-tool 、 @uipath/solution-tool 、…
    • 使用显式版本:[email protected],@uipath/[email protected]。@ 之后的值必须是有效的语义版本字符串(例如1.0.2 或 1.0.0-preview.1)— 会拒绝使用 @beta 等纯频道名称,并将其显示为 ValidationError。

选项​

无。

示例​

# 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

# exact preview build
uip tools install orchestrator-tool@1.0.0-preview.1

# preview channel — switch the channel, then install normally
uip config set updateChannel preview
uip tools install orchestrator-tool
# 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 [email protected]

# exact preview build
uip tools install [email protected]

# preview channel — switch the channel, then install normally
uip config set updateChannel preview
uip tools install orchestrator-tool

版本解析​

  • 使用明确的语义化版本(例如@1.0.2 或 @1.0.0-preview.1),则系统会按原样使用该版本。没有 @beta 等 npm-dist-tag 简写形式 — @ 后的值必须解析为语义版本,否则命令将失败并显示 ValidationError。
  • 如果没有版本,主机将根据 CLI 的更新渠道(默认为stable ,或preview / dev ,通过uip config set updateChannel <channel> )及其当前的 MAJOR.MINOR 行进行解析 — 因此,安装stable CLI 1.0.x最新匹配的稳定版工具1.0.* 。这可以保持主机和工具协议兼容。请参阅版本控制和稳定性和uip config 。

安装目标:该工具在 CLI 的 npm 包旁边安装 — 如果 CLI 是全局安装,则安装全局;如果 CLI 是项目范围安装,则安装在本地。您未传递作用域标志。运行npm root -g以查找计算机上的全局安装路径。

允许列表强制执行: <package-spec>必须解析为允许列表中的@uipath/包之一(或rpa-legacy )。使用任何其他值都会失败,并显示 ValidationError 和退出代码 3 — 1.x 版本不支持第三方工具。

数据形状 ( --output json ) ​

{
  "Code": "Message",
  "Data": { "Message": "Successfully installed @uipath/[email protected]" }
}
{
  "Code": "Message",
  "Data": { "Message": "Successfully installed @uipath/[email protected]" }
}

uip 工具更新​

将一个或多个已安装的工具更新到最新的兼容版本。

参数​

无。

选项​

  • --name <package> — 更新单个工具。接受别名、短名称或 npm 完整名称。如果没有--name ,系统将更新每个已安装的工具。
重要提示:

--version 上没有 uip tools update 标志 — 仅注册了 --name。每个工具都更新为活动版本策略允许的最新版本(通常固定到 CLI 的 MAJOR.MINOR 行);要改为固定特定版本,请使用 uip config set version <line> 或通过 uip tools install <package>@<version> 使用显式版本重新安装。

示例​

# 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
# 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

数据形状 ( --output json ) ​

{
  "Code": "UpdateResult",
  "Data": [
    {
      "name": "orchestrator-tool",
      "status": "updated",
      "from": "1.2.2",
      "to": "1.2.3"
    },
    {
      "name": "agent-tool",
      "status": "up-to-date",
      "from": "1.2.3",
      "to": "1.2.3"
    }
  ]
}
{
  "Code": "UpdateResult",
  "Data": [
    {
      "name": "orchestrator-tool",
      "status": "updated",
      "from": "1.2.2",
      "to": "1.2.3"
    },
    {
      "name": "agent-tool",
      "status": "up-to-date",
      "from": "1.2.3",
      "to": "1.2.3"
    }
  ]
}

即使部分失败,系统仍始终会发出每个工具的结果。如果有任何工具更新失败,该命令以非零退出代码退出,并且失败的条目会带有error字段。

如果 core.version 已固定到某个确切版本(不是 MAJOR.MINOR 行),则会完全跳过更新 — 该命令仍会退出 0,并带有空 Data 数组和解释固定的 Instructions 注释,因为已固定的安装有意从不移动。

UIP 工具卸载​

删除一个已安装的工具,或一次删除每个已安装的工具。

参数​

  • [package-name] (可选) — 别名、短名称或 npm 完整名称。与 --all 互斥。仅提供参数之一或 --all — 省略两者或同时传递两者为 ValidationError。

选项​

  • --all — 卸载所有已安装的工具。与 [package-name] 互斥。

示例​

# uninstall a single tool
uip tools uninstall orchestrator
uip tools uninstall @uipath/solution-tool

# uninstall every installed tool
uip tools uninstall --all
# uninstall a single tool
uip tools uninstall orchestrator
uip tools uninstall @uipath/solution-tool

# uninstall every installed tool
uip tools uninstall --all

数据形状 ( --output json ) ​

卸载单个工具会发出 Code: "Message":

{
  "Code": "Message",
  "Data": { "Message": "Successfully uninstalled @uipath/orchestrator-tool" }
}
{
  "Code": "Message",
  "Data": { "Message": "Successfully uninstalled @uipath/orchestrator-tool" }
}

--all 发出 Code: "UninstallResult",每个工具对应一行:

{
  "Code": "UninstallResult",
  "Data": [
    { "name": "orchestrator-tool", "status": "uninstalled" },
    { "name": "agent-tool", "status": "uninstalled" }
  ]
}
{
  "Code": "UninstallResult",
  "Data": [
    { "name": "orchestrator-tool", "status": "uninstalled" },
    { "name": "agent-tool", "status": "uninstalled" }
  ]
}

如果有任何工具在 --all 路径中无法卸载,则其行将包含 error 字段,并且命令将使用非零退出代码退出 — 仍会发出每个工具的完整细分。

卸载后,调用uip or …将在下次使用时再次自动安装 Orchestrator 工具,除非自动安装被阻止(例如,在无法访问网络的运行器上)。显式安装可以避免这种情况。

退出代码​

  • 0 — 成功。
  • 1 — 失败(安装、更新、卸载或工具级错误)。对于具有多个工具的update ,至少一个工具失败。
  • 3 — install 和 update 上发生验证错误(未知别名、未列入允许列表的包、无效版本字符串)。

即使响应正文仍报告uninstall 自己的参数验证错误(缺少包名称或--all 与包名称结合使用),该错误仍会退出1 而不是3Result: "ValidationError" —Result ErrorCode如果您需要将此情况与其他故障区分开,请在 JSON 正文中使用 ,而不是退出代码。

有关完整表格,请参阅退出代码。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新