- 概述
- 开始使用
- 概念
- 使用 UiPath CLI
- 操作指南
- CI/CD 方法
- 命令参考
- 迁移
- 参考与支持
UiPath CLI 中无需安装工具的核心命令,包括身份验证、工具生命周期、技能、MCP 网桥和 Shell 补全。
核心命令界面是主机 ( @uipath/cli ) 附带的所有内容 — 无需安装工具。这些命令管理身份验证、工具生命周期、AI 编码智能体技能、MCP 网桥和 Shell 补全。在npm install -g @uipath/cli完成后,此页面上的每个命令都可用。
有关与 UiPath 界面(Orchestrator、解决方案、智能体等)对话的命令,请参阅每个工具的参考页面 — 每个页面都由主机根据需要加载的单独 npm 包提供。
The host commands
The CLI host registers 11 top-level commands (uip track is hidden internal telemetry and isn't user-facing — the other 10 are):
| 命令 | 用途 | 需要登录 |
|---|---|---|
uip login | Authenticate via interactive OAuth2, External App, environment variables, or federated/workload-identity; switch tenants. Writes a session to .uipath/.auth. | — |
uip logout | 删除凭据文件。 | — |
uip login status | 显示当前组织、租户、到期日期以及 CLI 正在读取的凭据文件。 | 可选(否则报告Not logged in ) |
uip config | Get, set, and clear local CLI configuration values (including the version-pin uip tools update reads). | — |
uip user | Show the identity of the currently authenticated user. | 是 |
uip feedback | Send feedback about the CLI. | — |
uip tools | List, search, install, update, uninstall the installable tools (Orchestrator, Solution, Agent, Test Manager, …). | — |
uip skills | Install UiPath skills into AI coding agents. | — |
uip mcp | 通过 Stdio 将 CLI 公开为模型上下文协议服务器。 | 根据run_command (继承基于文件的会话)。 |
uip update | Self-update the CLI, its installed tools, and installed skills. | — |
uip completion | 安装或打印 shell 制表符补全(bash、zsh、rocket、pwsh)。 | — |
大纲
uip login [--tenant <name>] [--organization <name>] [--authority <url>] [--client-id <id>] [--client-secret <secret> | --client-assertion <jwt>] [--scope <scopes>] [--no-browser] [-f <folder>]
uip login status [-f <folder>]
uip login refresh [--login-validity <minutes>]
uip login which [-f <folder>]
uip login tenant list [-f <folder>]
uip login tenant set <name> [-f <folder>]
uip logout [-f <folder>]
uip config get / set / clear <key>
uip user
uip feedback send
uip tools list / search / install / update / uninstall …
uip skills list / search / show / install / update / uninstall --agent <name>
uip mcp serve
uip update [--dry-run] [--tools-only] [--skills-only]
uip completion [shell] [--print] [--uninstall]
uip login [--tenant <name>] [--organization <name>] [--authority <url>] [--client-id <id>] [--client-secret <secret> | --client-assertion <jwt>] [--scope <scopes>] [--no-browser] [-f <folder>]
uip login status [-f <folder>]
uip login refresh [--login-validity <minutes>]
uip login which [-f <folder>]
uip login tenant list [-f <folder>]
uip login tenant set <name> [-f <folder>]
uip logout [-f <folder>]
uip config get / set / clear <key>
uip user
uip feedback send
uip tools list / search / install / update / uninstall …
uip skills list / search / show / install / update / uninstall --agent <name>
uip mcp serve
uip update [--dry-run] [--tools-only] [--skills-only]
uip completion [shell] [--print] [--uninstall]
Every command also honors the global --interactive/--no-interactive flag (see Global options) — there is no command-specific short form for it.
All core commands honor the global options (--output, --output-filter, --log-level, --log-file, --profile, --interactive/--no-interactive) and follow the standard exit-code contract.
核心表面与工具的关系
每隔一段uip <tool> …调用就会在这些调用之上运行:
- 通过
uip login建立一次身份验证,后续的每个工具调用(Orchestrator、解决方案、智能体等)都会继承身份验证。 - 工具生命周期(
uip tools install) 控制下次调用工具前缀时加载哪些扩展包。 - 技能与工具相邻 — 教 AI 智能体如何使用
uip而不是添加新命令。 - MCP将整个界面(核心 + 已安装的工具)包装为任何 MCP 感知客户端都可以调用的 MCP 工具。
- 补全会在安装时发现命令,因此,如果您希望完成新添加的命令,请在
uip tools install后重新运行uip completion。
身份验证形状
除 auth 命令本身外,每个核心命令的工作方式都无需会话 — 它们仅与本地文件(配置文件、清单文件、完成脚本)通信。身份验证命令本身管理会话:
uip login— interactive OAuth2 (browser), External App (client credentials), environment-variable token, and federated/workload-identity (--client-assertion). See Authentication.--profilescopes the session to a named credential set, orthogonal to which flow you use.uip logout— 删除文件。env-var 流程无需清除任何内容。uip login status— 报告活动会话。uip login refresh— proactively refreshes the access token and emits a machine-readable session payload for programmatic consumers.uip login which— prints where the active session/credential file was resolved from.uip login tenant list / set— 切换租户而无需重新进行身份验证。
工具命令会继承调用时磁盘上的任何会话;每次调用时都会覆盖--tenant 。
每个命令其输出的发送位置
| 流 | 内容 |
|---|---|
| 标准输出 | 结构化 JSON 信封( Result 、 Code 、 Data …)。每次调用一个。 |
| 标准错误 | 日志(由--log-level控制)、进度指示器和人类可读的错误文本。JSON 绝不是计算机可解析的 JSON。 |
在所有位置强制拆分;您可以独立对其进行重定向:
uip tools list > tools.json 2> uip.log
uip tools list > tools.json 2> uip.log
See Output formats for the five formats (json, table, yaml, plain, markdown) and JMESPath filtering.
另请参阅
- 概念:UiPath CLI 的组织方式—“主机”的含义以及为何将核心从工具中拆分开。
- 概念:工具(插件) — 自动安装白名单和版本固定。
- 概念:技能—
uip skills install如何扩展 AI 智能体。 - 概念:会话和凭据—
uip login写入的内容和位置。 - Authentication — the auth flows in detail, including federated/workload-identity login.
- 全局选项、退出代码— 每个命令共享的合同。