# @uipath/maestro-tool

CLI tool for UiPath Maestro orchestration projects. The tool is exposed under `uip maestro` and groups BPMN, Flow, and Case commands.

## BPMN Commands

### `maestro bpmn init`

Create a new Maestro BPMN project.

```bash
uip maestro bpmn init <projectName> [--force]
```

### `maestro bpmn validate`

Validate a Maestro BPMN `.bpmn` file or Studio Web BPMN `.xml` export.

```bash
uip maestro bpmn validate <file>
```

The command checks that the file exists, is a `.bpmn` or `.xml` document, parses as BPMN, contains a process, and has at least one start event. It also reports UiPath BPMN extension tag counts and warnings for unsupported or missing extension metadata.

Successful validation returns `Code: BpmnValidate` with the validated file path, process count, start event count, and UiPath extension count.

### `maestro bpmn pack`

Pack a Maestro BPMN project into a NuGet package (`.nupkg`).

```bash
uip maestro bpmn pack <project-path> <output-path> [-n <name>] [-v <version>]
```

### `maestro bpmn debug`

Debug a local Maestro BPMN project or a single BPMN file via Studio Web.

```bash
uip maestro bpmn debug [project-path]
uip maestro bpmn debug --bpmn-file <file>
```

### `maestro bpmn registry`

Browse, search, and inspect the Maestro BPMN extension registry.

```bash
uip maestro bpmn registry pull
uip maestro bpmn registry list
uip maestro bpmn registry search <keyword>
uip maestro bpmn registry get <extensionType>
```

### `maestro bpmn process`

List, inspect, and run deployed Maestro BPMN processes.

```bash
uip maestro bpmn process list
uip maestro bpmn process get <process-key> <feed-id>
uip maestro bpmn process run <process-key> <folder-key> [options]
```

### `maestro bpmn processes`

List Maestro process summaries and inspect incident details.

```bash
uip maestro bpmn processes list [--folder-key <folderKey>] [--limit <number>] [--offset <number>] [--status <status>]
uip maestro bpmn processes incidents <process-key> --folder-key <folderKey>
uip maestro bpmn processes diagnose <process-key> --folder-key <folderKey>
uip maestro bpmn processes error-codes <process-key> --folder-key <folderKey>
```

### `maestro bpmn job`

Inspect Maestro BPMN job status and traces.

```bash
uip maestro bpmn job status <job-key> [options]
uip maestro bpmn job traces <job-key> [options]
```

### `maestro bpmn instance`

Inspect and control Maestro BPMN process instances.

```bash
uip maestro bpmn instance list --folder-key <folder-key>
uip maestro bpmn instance get <instance-id> --folder-key <folder-key>
uip maestro bpmn instance variables <instance-id> --folder-key <folder-key>
uip maestro bpmn instance incidents <instance-id> --folder-key <folder-key>
uip maestro bpmn instance pause <instance-id> --folder-key <folder-key>
uip maestro bpmn instance resume <instance-id> --folder-key <folder-key>
uip maestro bpmn instance cancel <instance-id> --folder-key <folder-key>
```

### `maestro bpmn incident`

Summarize and inspect runtime incidents.

```bash
uip maestro bpmn incident summary
uip maestro bpmn incident get <incident-id> --folder-key <folder-key>
```

### `maestro bpmn debug-instance`

Manage active debug instances.

```bash
uip maestro bpmn debug-instance create --solution-id <id> --project-id <id> --entry-point <path>
uip maestro bpmn debug-instance breakpoints <debug-instance-id>
uip maestro bpmn debug-instance continue <debug-instance-id>
uip maestro bpmn debug-instance cancel <debug-instance-id>
```

## Related Surfaces

Flow commands are available under `uip maestro flow`.

Case Management commands are available under `uip maestro case`.
