# uip maestro flow pack

> Syntax and options for `uip maestro flow pack`, which packages a Flow project directory into a `.nupkg` for Orchestrator publication.

`uip maestro flow pack` packages a Flow project directory into a `.nupkg` file ready to publish to Orchestrator.

## Synopsis

```
uip maestro flow pack <projectPath> <outputPath> [-n <name>] [-v <version>] [--author <author>] [--description <text>] [--repository-url <url>] [--repository-commit <sha>] [--repository-branch <branch>] [--repository-type <type>] [--release-notes <text>] [--project-url <url>]
```

Honors [global options](./global-options.md). Exit codes follow the [standard contract](./exit-codes.md).

## Arguments

- `<projectPath>` *(required)* — path to the Flow project directory (must contain `project.uiproj` and at least one `.flow` file).
- `<outputPath>` *(required)* — output directory where the `.nupkg` will be written. Created if it does not exist.

## Options

- `-n, --name <name>` — package name. Defaults to the project folder name.
- `-v, --version <version>` — package version. Defaults to `1.0.0`.

### Package-metadata options (shared across pack commands)

| Option | Description |
|---|---|
| `--author <author>` | Package author. |
| `--description <text>` | Package description. |
| `--repository-url <url>` | Source repository URL, recorded in the package for traceability. |
| `--repository-commit <sha>` | Source repository commit hash. |
| `--repository-branch <branch>` | Source repository branch. |
| `--repository-type <type>` | Source repository type. Defaults to `git` when `--repository-url` is set. |
| `--release-notes <text>` | Release notes for the package. |
| `--project-url <url>` | Automation Hub idea URL. |

## Examples

```bash
# Pack with defaults (name = folder, version = 1.0.0)
uip maestro flow pack ./invoice-flow ./dist

# Pack with an explicit version
uip maestro flow pack ./invoice-flow ./dist --version 1.2.0

# Override the package name
uip maestro flow pack ./invoice-flow ./dist --name Invoicing.Flow --version 1.2.0
```

## Data shape (--output json)

```json
{
  "Code": "FlowPack",
  "Data": {
    "Package": "invoice-flow.1.2.0.nupkg",
    "Output": "./dist/invoice-flow.1.2.0.nupkg"
  }
}
```

## Known issue — Solution pack

When a Flow project is added to a solution (`uip solution projects add`) and packed with `uip solution pack`, the resulting `.nupkg` inside the solution zip can be **missing critical files** (`.bpmn`, `.flow`, `entry-points.json`, `bindings_v2.json`).

The root cause is a non-recursive `copyFiles()` helper in the published `@uipath/tool-flow` — it silently skips the `content/` and `flow_files/` subdirectories. `uip maestro flow pack` uses a recursive copy and is not affected.

**Workaround**: use `uip maestro flow pack` directly to produce deployable `.nupkg` files until the solution pipeline is fixed.

## See also

- [`uip maestro flow init`](./uip-maestro-flow-init.md) — scaffold the project first
- [`uip maestro flow validate`](./uip-maestro-flow-validate.md) — validate before packing
- [Flow overview](./uip-maestro-flow.md)
