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

UiPath CLI 用户指南

uip 智能体推送/拉取

uip agent pushuip agent pull是 Studio Web 往返过程的两个半部分。它们使用相同的传输格式( .uis ,即智能体项目的 ZIP 存档文件)、相同的身份验证模型和相同的错误界面。使用push将本地项目发送到 Studio Web,以便该项目显示在 Agent Builder 用户界面中;使用pull从 Studio Web 下载解决方案作为.uis ,您可以检查、提取或打包到 Orchestrator 部署中。

这两个动词都需要活动的 CLI 会话 ( uip login )。

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


uip 智能体推送

将智能体项目作为新解决方案导入 Studio Web,或覆盖现有解决方案。

当输入为目录时, push将验证项目结构,运行 Studio Web 架构验证阶段( --skip-schema-validation除外),打包到临时.uis (不包括.agent-builder/ ),并将存档发布到 Studio Web 解决方案导入 API。当输入已经是.uis时,系统会按原样上传存档。

成功目录推送后,项目根目录中的SolutionStorage.json将使用返回的云解决方案和项目 ID 进行更新 — 后续的uip agent eval run调用可以使用这些 ID,而无需您传递--solution-id

大纲

uip agent push [path] [-n <name>] [--overwrite <solutionId>] [--skip-schema-validation] [--login-validity <minutes>]
uip agent push [path] [-n <name>] [--overwrite <solutionId>] [--skip-schema-validation] [--login-validity <minutes>]

参数

  • [path] (可选,默认为. — 智能体项目目录.uis文件的路径。

选项

标记默认用途
-n, --name <name>智能体metadata.name → 路径基本名称Studio Web 中的解决方案名称。
--overwrite <solutionId>按 ID 覆盖现有解决方案,而不是创建新解决方案。将端点从POST /api/Solution/Import更改为POST /api/Solution/<id>/Overwrite
--skip-schema-validation关闭跳过 Studio Web 架构验证阶段。仅目录输入 — .uis输入从不运行架构验证。
--login-validity <minutes>10令牌有效期的最短分钟数要求。

示例

# Push the current directory as a new solution
uip agent push

# Push a specific directory
uip agent push ./my-agent

# Overwrite an existing solution in place
uip agent push ./my-agent --overwrite a1b2c3d4-0000-0000-0000-000000000001

# Push a pre-packed archive
uip agent push ./dist/my-agent.uis
# Push the current directory as a new solution
uip agent push

# Push a specific directory
uip agent push ./my-agent

# Overwrite an existing solution in place
uip agent push ./my-agent --overwrite a1b2c3d4-0000-0000-0000-000000000001

# Push a pre-packed archive
uip agent push ./dist/my-agent.uis

数据形状(--输出 json)

{
  "Code": "AgentPush",
  "Data": {
    "Status": "Agent imported into Studio Web",
    "Name": "my-agent",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "ProjectCount": 1,
    "CloudProjectId": "a1b2c3d4-0000-0000-0000-000000000002"
  }
}
{
  "Code": "AgentPush",
  "Data": {
    "Status": "Agent imported into Studio Web",
    "Name": "my-agent",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "ProjectCount": 1,
    "CloudProjectId": "a1b2c3d4-0000-0000-0000-000000000002"
  }
}

对于--overwriteStatus"Solution overwritten successfully" ,而SolutionId会回显您传递的值。如果响应不包含项目数组,则CloudProjectId"-"


UIP 智能体拉取

从 Studio Web 将解决方案下载为.uis存档。(可选)将存档提取到同级目录中。

大纲

uip agent pull <solutionId> [-d <dir>] [-n <name>] [--extract] [--login-validity <minutes>]
uip agent pull <solutionId> [-d <dir>] [-n <name>] [--extract] [--login-validity <minutes>]

参数

  • <solutionId> (必填) — 解决方案 UUID。从uip agent list中获取一个。

选项

标记默认用途
-d, --destination <dir>.已下载文件的目标目录。根据需要创建。
-n, --name <name><solutionId>输出文件名(去除扩展名)。如果不存在,则会附加.uis
--extract关闭下载后,将.uis提取到与其一起命名的目录中。
--login-validity <minutes>10令牌有效期的最短分钟数要求。

示例

# Download by ID into the current directory
uip agent pull a1b2c3d4-0000-0000-0000-000000000001

# Download into a specific directory
uip agent pull a1b2c3d4-0000-0000-0000-000000000001 -d ./downloads

# Download with a friendly filename and extract
uip agent pull a1b2c3d4-0000-0000-0000-000000000001 \
  -d ./downloads \
  -n invoice-agent \
  --extract
# Download by ID into the current directory
uip agent pull a1b2c3d4-0000-0000-0000-000000000001

# Download into a specific directory
uip agent pull a1b2c3d4-0000-0000-0000-000000000001 -d ./downloads

# Download with a friendly filename and extract
uip agent pull a1b2c3d4-0000-0000-0000-000000000001 \
  -d ./downloads \
  -n invoice-agent \
  --extract

数据形状(--输出 json)

{
  "Code": "AgentPull",
  "Data": {
    "Status": "Solution exported successfully",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Output": "/abs/path/downloads/a1b2c3d4-0000-0000-0000-000000000001.uis"
  }
}
{
  "Code": "AgentPull",
  "Data": {
    "Status": "Solution exported successfully",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Output": "/abs/path/downloads/a1b2c3d4-0000-0000-0000-000000000001.uis"
  }
}

使用--extract时,有效负载还会包含ExtractedTo: "/abs/path/downloads/<name>"


往返示例

# Iterate locally, push to Studio Web, edit in the UI, pull back
uip agent init ./my-agent
uip agent validate ./my-agent
uip agent push ./my-agent               # captures SolutionId

# (edit in Studio Web)

uip agent pull <SolutionId> -d ./downloads --extract
# compare ./my-agent with ./downloads/<SolutionId>/ to reconcile
# Iterate locally, push to Studio Web, edit in the UI, pull back
uip agent init ./my-agent
uip agent validate ./my-agent
uip agent push ./my-agent               # captures SolutionId

# (edit in Studio Web)

uip agent pull <SolutionId> -d ./downloads --extract
# compare ./my-agent with ./downloads/<SolutionId>/ to reconcile

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新