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

迁移:标记重命名

标记重命名参考,用于从 "uipcli" 迁移到 UiPath CLI,按域分组。

此页面将单个uipcli标志映射到uip对应项。与“命令图”一起使用——“命令图”显示要调用的动词;此页面显示了如何处理该动词上的每个标志。

标志按域分组。身份验证放在首位,因为它会立即针对每个命令进行更改。页面的其余部分将介绍因动词而异的标志,即包/解决方案输出、作业执行、测试运行程序输出、追踪等。

旧版标志条目反映2025.10及更早版本记录的公共uipcli标志界面。uip列与当前的参考页面匹配。

如何解读“所在位置”列

uip为您提供了三个位置可以放置uipcli中的标志值:

  • 每个命令上的标记— 每次按字面意思传递( --tenant <name>--folder-path Shared )。
  • Session state from uip login — the flag has become something you set once with uip login; subsequent commands pick it up automatically.
  • 环境变量— 在运行时由 CLI 读取。在适用的情况下,最好对--client-id env.VARNAME / --client-secret env.VARNAME使用uip login前缀形式,以将机密信息排除在命令行之外。

“位置”列会告知您其中哪一个适用。

身份验证

这是变化最大的块。旧版 CLI 接受每个命令的三种凭据模式(用户/密码、刷新令牌、外部应用程序)。新的 CLI 仅接受外部应用程序凭据和交互式 OAuth — 用户/密码和刷新令牌身份验证已删除。请参阅重大变更 — 已删除身份验证模式

外部应用程序(CI 流程)

旧版标志旧版用途uip 标记其所在位置注意
-A, --accountForApp <name>外部应用程序的组织名称--organization <name>标记 uip login通常是可选的 — 从外部应用程序记录中推断出组织。在需要消除歧义时发送此字段。
-I, --applicationId <id>外部应用程序客户端 ID--client-id <id> (或--client-id env.VARNAME标记 uip login首选env.VARNAME从环境变量中读取。
-S, --applicationSecret <secret>外部应用程序客户端密码--client-secret <secret> (或--client-secret env.VARNAME标记 uip login始终在 CI 中使用env.前缀,以避免机密信息泄露到 Shell 历史记录和ps输出中。
--applicationScope "<space-separated>"OAuth 作用域--scope "<space-separated>" / -s, --scope标记 uip login相同的空格分隔格式。旧版调用通常会列出所有OR.*作用域;保留相同列表。
--identityUrl <url>自定义身份授权机构 (Automation Suite/PaaS)--authority <url>标记 uip login已重命名;语义相同。对于 Automation Cloud,请省略。
(位置) <orchestrator_url>OrchestratorBaseURL(从会话中隐式)不需要uip login上的标志— CLI 从登录时选择的租户/组织解析 Orchestrator URL。
(位置) <orchestrator_tenant>租户名称-t, --tenant <name>标记 uip loginOnce set at login, every subsequent command uses this tenant. Switch it mid-session with uip login tenant set <name>, without re-authenticating.
-o, --organizationUnit <folder>命令的默认文件夹--folder-path <path> 或者 --folder-key <guid>标记需要的命令不是uip中的会话级概念;在每次jobs / processes / resource *调用时传递此参数。配置文件可以固定默认值。

用户/密码身份验证 — 已删除

旧版标志状态于 uip
-u, --username <user>已删除。创建一个外部应用程序并使用--client-id
-p, --password <pass>已删除。使用--client-secret

在尚未配置外部应用程序的环境中,旧版 CLI 支持针对 Orchestrator 进行用户/密码身份验证。uip没有;请参阅“重大变更 — 已删除身份验证模式”

刷新令牌身份验证 — 已删除

旧版标志状态于 uip
-t, --token <refresh-token>已删除。旧版-t--token的缩写;在uip中, -t--tenant的缩写。
-a, --accountName <name>已删除。改为将--organization与外部应用程序配合使用。

如果旧版管道使用刷新令牌身份验证,请迁移到“外部应用程序”。Automation Cloud 不再为新的工作负载配置刷新令牌流程。

现有令牌(新 — 无等效旧版)

对于已保存 UiPath 访问令牌且不需要交换凭据的容器或运行程序, uip支持环境变量身份验证:设置UIPATH_CLI_ENABLE_ENV_AUTH=true并通过环境变量传递令牌 + 组织 + 租户。请参阅身份验证 — 流程 3 。未写入任何文件;令牌未刷新。

env.VAR_NAME 前缀

uip login接受--client-id / --client-secretenv.VAR_NAME前缀形式的文字密码,在运行时从环境变量中读取值:

# Resolves at runtime from $UIPATH_CLIENT_SECRET; the secret never appears on the command line.
uip login \
  --client-id env.UIPATH_CLIENT_ID \
  --client-secret env.UIPATH_CLIENT_SECRET \
  --tenant "$UIPATH_TENANT"
# Resolves at runtime from $UIPATH_CLIENT_SECRET; the secret never appears on the command line.
uip login \
  --client-id env.UIPATH_CLIENT_ID \
  --client-secret env.UIPATH_CLIENT_SECRET \
  --tenant "$UIPATH_TENANT"

uipcli不同, uip不会隐式读取UIPATH_CLIENT_ID / UIPATH_CLIENT_SECRET ;则必须通过env.前缀(或传递文本值)引用它们。请参阅身份验证 — env.VAR_NAME前缀重大变更 — 已删除隐式环境变量读取

输出、日志记录和追踪

适用于每个uipcli动词。

旧版标志旧版用途uip 标记其所在位置注意
--traceLevel <None|Critical|Error|Warning|Information|Verbose>日志详细信息--log-level <debug|info|warn|error>每个命令上的全局标志值范围已缩小到四个级别;默认infoVerbosedebugInformationinfoWarningwarn ,其他所有内容 → error 。请参阅全局选项
(旧版文本标准输出;无标志)结构化输出--output <json|table|yaml|plain>全局标志每个命令的默认值为json 。传统打印的人工可读文本; uip打印 JSON。对于人工视图,请使用--output table 。请参阅输出格式
(无等效)后置筛选器输出--output-filter "<JMESPath>"全局标志uip中的新建。允许管道提取特定字段,而无需通过jq进行管道传输。
(无等效)将日志复制到文件--log-file <path>全局标志uip中的新建。附加 JSON 行。
-l, --language <locale>日志语言(无等效)已删除。uip中的日志输出为英语。
--captureCommandToJsonFile <path>将调用序列化为 JSON(无等效)已删除。用于驱动uipcli run ,后者也已被删除。请参阅命令映射 — 运行

包标志

Most legacy PascalCase flags become kebab-case in uip rpa (for example, --outputType--output-type), but several are renamed outright or dropped entirely rather than just re-cased - see the notes column in each table below. Run uip rpa pack --help for the complete list on your installed tool version.

包 Pack

Several flags do not follow the simple camelCase to kebab-case rule below, verified against real source (rpa-tool/src/commands/packager/pack.ts) rather than assumed:

旧版标志uip rpa pack注意
<workspace_path> (位置)[project-dir] (positional, optional)Path to the project directory, project.json, or a .uip archive. Defaults to --project-dir or the current directory.
-o, --output <dir>[output-path] (positional) or --output-path <path>No -o short alias. Required, pass it as the second positional or via --output-path; the command errors if both are omitted.
-v, --version <semver>--package-version <version>No -v short alias, and the flag itself is --package-version, not --version.
--autoVersion(no equivalent, this flag does not exist)There is no auto-generate-version flag on uip rpa pack. Compute the version yourself and pass --package-version.
--outputType <Process|Library|Tests|Objects>--output-type <Process|Library|Tests|Objects>强制输出类型。
--splitOutput--split-packagesNot a pure kebab-case rename - the flag itself is renamed to --split-packages.
--releaseNotes <text>--release-notes <text>嵌入到.nupkg数据中。
--repositoryUrl--repositoryCommit--repositoryBranch--repositoryType--repository-url--repository-commit--repository-branch--repository-typeVCS 元数据。
--projectUrl <url>--project-url <url>Automation Hub 概念 URL。
--certificatePath, --certificatePassword, --timestampServerUrl--signing-certificate-path, --signing-certificate-password, --signing-timestamp-serverNot pure kebab-case - all three gain a signing- prefix.
--author <name>--package-author <name>Not --author - the flag is --package-author.
--governanceFilePath <policy>--governance-file-path <policy>Run analyzer as part of pack. --governance-file-type <type> is also available (choices enum) if the file format cannot be inferred.
(no legacy equivalent)--package-id <id>, --package-description <desc>, --skip-analyze, --skip-dependency-optimization, --include-sources / --no-include-sources, --detailed-log-path <path>New flags with no legacy uipcli package pack counterpart.
库身份验证( --libraryOrchestratorUrl--libraryOrchestratorTenant-u-p-t-a-A-I-S--libraryOrchestratorApplicationScope--libraryOrchestratorFolder--libraryIdentityUrl--libraryOrchestratorAccountForApp--libraryOrchestratorAccountName--libraryOrchestratorApplicationId--libraryOrchestratorApplicationSecret--libraryOrchestratorUsername--libraryOrchestratorPassword--libraryOrchestratorAuthToken会话来源 uip login所有library*身份验证标志都会折叠为由uip login配置的单个会话。包处于离线状态,除非需要从私有订阅源中解析库依赖项;在这种情况下,CLI 将使用活动会话。

包分析

Verified against real source (rpa-tool/src/commands/packager/analyze.ts), several legacy flags have no equivalent at all, rather than merely being undocumented:

旧版标志uip rpa analyze
<workspace_path> (位置)[project-dir] (positional, optional, defaults to --project-dir or the current directory)
--governanceFilePath <policy>--governance-file-path <policy> (alias: --policy-file <path>)
--analyzerTraceLevel <Off|Error|Warning|Info|Verbose>(no equivalent, this flag does not exist)
--stopOnRuleViolation(no equivalent, this flag does not exist). The closest available control is --default-severity <level>, which sets the default severity for rules that do not specify their own.
--treatWarningsAsErrors(no equivalent, this flag does not exist)
--resultPath <path>(no equivalent, this flag does not exist). uip rpa analyze writes its findings to stdout in the selected --format; redirect it yourself (uip rpa analyze ... > result.json).
--ignoredRules <id1,id2>(no equivalent, this flag does not exist)
(no legacy equivalent)--governance-file-type <type>, --policy-file-type <type> (alias for --governance-file-type, defaults to AutomationOps when a policy/governance file is given), --repository-path <path> (Pipeline Analyze parity), --detailed-log-path <path>, --skip-analyze

包部署

旧版deploy现在是两次uip调用;请参阅命令映射 — 包部署。基于标志:

旧版标志uip 等效项注意
<packages_path> (位置)<file> ( uip or packages upload上的位置)单个文件。对于.nupkg的文件夹,在 Shell 中循环。
<orchestrator_url> (位置)(会话)放弃;由uip login提供。
<orchestrator_tenant> (位置)-t, --tenant 开启 uip login默认为会话。
-c, --createProcess <true|false>(隐式)uip or packages upload 从不创建流程。如果您想要一个流程,请在上传后调用uip or processes create
--processName <name>--name <name> 开启 uip or processes create已重命名;注意:新 CLI 上不存在--process <name>
--processNames <csv>(Shell 中循环 — 无直接等效项)编写 CSV 迭代的脚本;每行调用processes create
--processDescription <text>--description <text> 开启 uip or processes createNo -d short alias on create — that alias exists only on uip or processes update.
--use-package-description(默认行为)processes create 创建时默认会继承包描述。
--ignoreLibraryDeployConflict(无等效)由于版本重复,通过uip or libraries upload进行的库上传完全失败;调整管道逻辑以在版本已存在时跳过。
-e, --environments <csv>(无等效项;仅新式文件夹)新式文件夹模型中不会体现旧版经典文件夹“环境”概念。
-h, --entryPointsPath <csv>--entry-point <path> 开启 uip or processes create每次调用使用一个入口点;多入口点包的循环。

包还原

uip rpa restore takes only the common packager options below plus its two positionals, there are no restore-specific flags at all (verified against rpa-tool/src/commands/packager/restore.ts):

旧版标志uip rpa restore
<workspace_path> (位置)[project-dir] (positional, optional)
--restoreFolder <dir>[output-path] (positional, optional, must be OUTSIDE the project directory tree; omit to restore into the shared NuGet cache only)
--nugetConfigFilePath <path>--nuget-sources-config-path <path>
(no legacy equivalent)--exclude-configured-sources, --feed-folder <name> (resolve library dependencies from one Orchestrator folder feed instead of every tenant feed)
库身份验证标志会话来源 uip login

作业标志(uipcli 作业运行 → uip 或作业启动)

旧版标志uip or jobs start注意
<process_name> (位置)<process-key> (位置)GUID,而非名称。使用uip or processes list --name <name> --output-filter 'Data[0].Key' --output plain解析。
<orchestrator_url> (位置)(会话)
<orchestrator_tenant> (位置)-t, --tenant 开启 uip login默认为会话。
-i, --input_path <file>--input-file <path> (文件)或--input-arguments '<json>' (内联)。两个替代方案,互斥。
-P, --priority <Low|Normal|High>--job-priority <Low|Normal|High>
-j, --jobscount <n>--jobs-count <n>
-r, --robots <csv>(无直接等效项)旧版中的“仅限传统文件夹”。将--machine-keys--user-keys (GUID) 用于新式文件夹。
-U, --user <user>--user-keys <guid[,guid]>必须先将用户名解析为用户 GUID ( uip or users list )。
-M, --machine <hostname>--machine-keys <guid[,guid]>必须先将主机名解析为计算机 GUID ( uip or machines list )。
-R, --result_path <file>(重定向标准输出,或使用--output-filter )uip 将作业信封打印到标准输出。uip or jobs start <key> --wait-for-completion > result.json写入完整信封。
-W, --timeout <seconds>--timeout <seconds>需要 --wait-for-completion
-f, --fail_when_job_fails <true|false>(始终开启)使用--wait-for-completion ,如果作业结束Faulted ,则退出代码为1 。无法选择退出。
-w, --wait <true|false>--wait-for-completion (标记)新表单是布尔值标志 (无值)。
-b, --job_type <Unattended|NonProduction>--runtime-type <Unattended|Headless|Serverless|NonProduction|Development|TestAutomation>更广泛的枚举。
-o, --organizationUnit <folder>--folder-path <path> 或者 --folder-key <guid>或省略 — uip表示根据流程密钥推断文件夹。

测试标志

uipcli 测试运行 → uip tm 测试集运行 + uip tm 等待 + uip tm 获取报告

旧版标志uip target注意
-s, --testset <name>--test-set-key <key> 开启 uip tm testsets run是密钥,而非名称。格式化PROJECT:NN 。使用uip tm testsets list --project-key <key>解析。
-t, --testsetkey <key>--test-set-key <key>相同的值。注意:旧版-t与新 CLI 的-t, --tenant冲突;请使用长格式。
-P, --project-path <project.json>(返工)旧版“即时打包和测试”流程进行拆分: uip rpa packuip or packages upload → 在 Test Manager 中编写测试集 → uip tm testsets run 。编写测试集是一次性设置。
-a, --projectKey <key>--project-key <key> uip tm wait上的uip tm report get不同的projectKey :Test Manager 的旧版标志设置了 projectKey;新标志将等待/报告的范围限定为 Test Manager 项目。相同的基础值。
-e, --environment <name>(无等效)传统文件夹概念。
-o, --organizationUnit <folder>--folder-key <uuid> 开启 uip tm testsets listUsed to find the test set; not on execute. Takes a folder GUID (from uip or folders list), not a path string — there is no --folder-path option on testsets list.
--out <junit|uipath>(无等效)uip tm result download has no --output-format option — only JUnit XML is supported today.
-r, --result_path <file>--result-path <path> 开启 uip tm result download运行后下载。
-w, --timeout <seconds>--timeout <seconds> 开启 uip tm wait相同的语义,不同的动词。
-i, --input_path <file>--input-path <file> 开启 uip tm testsets run完全相同的标志; JSON 文件的架构保持不变。
--attachRobotLogs(在运行后使用uip tm attachment download
--retryCount <n>uip tm executions retry --execution-id <id>重新运行失败的案例。启动时不自动重试。
--repositoryUrl, --repositoryCommit, --repositoryBranch, --repositoryType, --projectUrl, --releaseNotes, --disableBuiltInNugetFeeds, --nugetConfigFilePath, --author(不适用于uip tm )当必须先打包test run时,这些是包端输入。它们属于uip rpa pack

UiPath CLI 测试并行

旧版标志uip 等效项
--testsConfigurationFilePath <file>(无等效项) — 在uip tm testsets run上编写 Shell 循环
--projectsRootDirectoryPath <dir>(无等效)
--executionArtifactsDirectoryPath <dir>--result-path <path> uip tm result downloaduip tm attachment download ,每次执行时运行
--cliDirectoryPath <uipcli.dll>(无等效)
--out <junit|uipath>(no equivalent)uip tm result download has no --output-format option; only JUnit XML is supported today
--disableBuiltInNugetFeeds(不适用于uip tm ;打包测试项目时请用于uip rpa pack
--projectKey <key>--project-key <key>
--author <name>(不适用于uip tm )

资产标志

两个旧版动词( asset deployasset delete )均使用 CSV 文件;新的 CLI 不支持批量部署 — 遍历 CSV 行并为每行调用uip or assets create / delete 。请参阅命令映射 — 资产

旧版标志uip 等效项注意
<assets_file> (位置)(在 Shell 中解析 CSV)
<orchestrator_url> (位置)(会话)
<orchestrator_tenant> (位置)-t, --tenant 开启 uip login
CSV 列 name<name> uip or assets create上的(位置)
CSV 列 value<value> (位置)
CSV 列 type--type <Text|Bool|Integer|Credential|Secret>不区分大小写。
CSV 列 description-d, --description <text>

解决方案标志

基本保留动词结构;标志名称已标准化为中横线命名法,并且身份验证块已折叠为会话。

旧版标志(跨动词)uip 等效项注意
-o, --output <dir> 开启 solution pack(位置<outputPath>
-v, --version <semver> 开启 solution pack--version <semver>
-n, --name <name> 开启 solution pack--name <name>
身份验证块(在每个涉及 Orchestrator 的solution动词上)会话来源 uip login
--packageName <n> 开启 solution deploy--package-name <n> 开启 uip solution deploy run
--packageVersion <v> 开启 solution deploy--package-version <v>
--folderName <n> 开启 solution deploy--folder-name <n>
--deploymentParentFolder <path> 开启 solution deploy--parent-folder-path <path> (或--parent-folder-key <guid> )上uip solution deploy run命名将在其下创建部署文件夹的父文件夹。
<deploymentName>位置,共solution deploy-activate ,共solution deploy-uninstall<deployment-name> uip solution deploy activate上的uip solution deploy uninstall

遥测和隐藏标志

旧版标志状态
-y, --disableTelemetry (隐藏)替换为环境变量UIPATH_TELEMETRY_DISABLED=1 。请参阅新增功能 — 遥测
--origin (隐藏)已删除。
--captureCommandToJsonFile (隐藏)uipcli run一起删除。

另请参阅

  • 命令映射— 按动词与前/后代码片段进行映射。
  • 重大变更— 身份验证、环境变量、退出代码、标准输出格式。
  • 身份验证— 三种受支持的身份验证流程。
  • 配置— 环境变量和标志优先级。
  • 全局选项--output--output-filter--log-level--log-file

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新