UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

上次更新日期 2026年5月7日

uip agent pack

uip agent pack bundles a local agent project into a .uis file. A .uis is a plain ZIP archive of the project tree; it is the transport format accepted by Studio Web (uip agent push) and the input to the Orchestrator publishing flow (uip agent publish).

Before packing, the command:

  1. Validates the project structure (agent.json, entry-points.json, project.uiproj, resource tree).
  2. Runs the Studio Web schema validation pass (unless --skip-schema-validation is set). Any non-fatal warnings are surfaced; any fatal issue aborts the pack with a Schema validation failed error.

The produced archive excludes .agent-builder/ (local-development scaffolding that Studio Web regenerates on import).

Synopsis

uip agent pack [path] [-d <dir>] [-n <name>] [--skip-schema-validation]
uip agent pack [path] [-d <dir>] [-n <name>] [--skip-schema-validation]

All uip agent pack invocations honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.

参数

  • [path] (optional, default .) — Path to the agent project directory.

选项

标记默认用途
-d, --destination <dir>.Destination directory for the .uis file. Created if it does not exist.
-n, --name <name>agent metadata.name → project dir basenamePackage name. The output file is <name>.uis.
--skip-schema-validationoffSkip the Studio Web schema validation pass. Useful for inspecting work-in-progress projects that would be rejected by the live API; do not use in a release pipeline.

示例

# Pack the current directory into ./my-agent.uis
uip agent pack

# Pack a specific project into ./dist/my-agent.uis
uip agent pack ./my-agent -d ./dist

# Override the archive name
uip agent pack ./my-agent -d ./dist --name invoice-agent-v1

# Skip schema validation to pack a work-in-progress project
uip agent pack ./my-agent --skip-schema-validation
# Pack the current directory into ./my-agent.uis
uip agent pack

# Pack a specific project into ./dist/my-agent.uis
uip agent pack ./my-agent -d ./dist

# Override the archive name
uip agent pack ./my-agent -d ./dist --name invoice-agent-v1

# Skip schema validation to pack a work-in-progress project
uip agent pack ./my-agent --skip-schema-validation

Data shape (--output json)

{
  "Code": "AgentPack",
  "Data": {
    "Status": "Agent packed successfully",
    "Name": "my-agent",
    "Output": "/abs/path/dist/my-agent.uis"
  }
}
{
  "Code": "AgentPack",
  "Data": {
    "Status": "Agent packed successfully",
    "Name": "my-agent",
    "Output": "/abs/path/dist/my-agent.uis"
  }
}

Warnings emitted during schema validation are logged separately (Warning entries) and do not appear in the success Data. Fatal schema errors fail the command before the archive is written.

Relationship to publish

uip agent publish runs its own pack/migrate/repack pipeline internally; you do not need to run pack first if your next step is publish. Use pack when you want:

  • A .uis you can hand-inspect (rename to .zip and unzip).
  • A .uis you plan to push to Studio Web via uip agent push <file.uis>.
  • A deterministic local archive as an artifact in a CI job.

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新