> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/flows.md). Agents can also search and read this documentation through its [MCP server](https://developer.celigo.com/~gitbook/mcp).

# flows

Manage flows, the pipelines that connect `pageGenerators` (exports) to `pageProcessors` (imports) or `routers` (branching), plus their run, error, test-run, and execution-log surface.

> ⚠️ **Response mapping shape.** `pageProcessors[].responseMapping.fields`/`.lists` are bare arrays — the same shape `get` returns. The API does not reject the object-wrapper shape (`{"fields": {"type": [...]}}`) that its generated schema docs described before 2026-08-22: it accepts it and silently corrupts the mapping to `fields: [null]`, erasing the step's mappings. Always send the bare-array shape; repair a corrupted flow by resending the full document with correct bare-array mappings via `update`. Since celigo-cli 2026.10.1, `create`, `update`, and `set` refuse the object wrapper (or `null`) in `pageProcessors[].responseMapping` before the request, as `celigo push` does, and `create` also refuses the `[null]`/`[{}]` residue a corrupted copy carries.

> ⚠️ **A router with no script has no `script` key.** The API accepts and stores `"script": null` on a router, but Flow Builder's router editor crashes the whole app when it opens that router, and a reload crashes again. Since celigo-cli 2026.10.2, every write refuses a router whose `script` is `null`, with no override: `create`, `update`, `set`, the four structural commands (`add-processor`, `remove-processor`, `add-generator`, `remove-generator`), and [`celigo push`](https://developer.celigo.com/cli/local-tree/push.md) and [`celigo promote`](https://developer.celigo.com/cli/local-tree/promote.md) at plan time. Every `routers` array is checked, an instance flow's `overrides.routers` included. Leave the key out. To repair a flow that already holds one, run `celigo flows set <id> 'routers[<n>].script=null'`: assigning `null` deletes the key. A `set` of PATCH-whitelisted fields (`disabled`, `schedule`, `name`, …) never sends the routers, so it is not refused.

**Abstract/instance (multi-instance) flows:** a flow with `isAbstract: true` is a reusable template that never runs directly; instances reference it via `_abstractFlowId` (immutable) and customize only through `overrides`. Structure belongs to the abstract — editing the abstract's graph propagates to every instance implicitly, and the server rejects structural fields on an instance write (`422 flow_instance_invalid_fields`), so the structural commands (`add-processor`, `remove-processor`, `add-generator`, `remove-generator`) refuse instance targets up front and point at the abstract. Use `list --abstract-flow-id` to enumerate an abstract's instances and `get --merge-instance` for an instance's effective config.

**REST API**: [Flows](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows)

```
celigo flows <subcommand> [args] [flags]
```

Supports all [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

## Subcommands

| Subcommand                                                      | Purpose                                                                                                                                        |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `list`                                                          | List all flows.                                                                                                                                |
| `get <id>`                                                      | Fetch one flow.                                                                                                                                |
| `create`                                                        | Create a flow from a JSON body (stdin, or `--file`).                                                                                           |
| `update <id>`                                                   | Full replace from a JSON body (PUT). Omitted fields are erased.                                                                                |
| `set <id> key=value …`                                          | Safe field edit: whitelisted fields (including whole `schedule` and `timezone`) as one atomic PATCH, any other field through GET, modify, PUT. |
| `delete <id>`                                                   | Delete a flow.                                                                                                                                 |
| `dependencies <id>` (alias `used-by`)                           | List resources that depend on this flow.                                                                                                       |
| `audit <id>`                                                    | Show the audit log (change history) for one flow.                                                                                              |
| `graph [ref]`                                                   | Render the flow's Flow Builder graph from the local tree, offline — as JSON, Mermaid, or DOT. Added in celigo-cli 2026.9.1.                    |
| `run <id>`                                                      | Trigger a one-off flow run; `--wait` waits for the run to finish.                                                                              |
| `replay <id>`                                                   | Replay Event Streams messages through the flow's topic listeners. Added in celigo-cli 2026.11.2.                                               |
| `clone <id> <integrationId> <environmentId>`                    | Clone a flow into another integration/environment.                                                                                             |
| `errors <id> <exportOrImportId>`                                | List open errors for one step.                                                                                                                 |
| `resolved-errors <id> <exportOrImportId>`                       | List errors already resolved.                                                                                                                  |
| `resolve-errors <id> <exportOrImportId> [errorIds]`             | Resolve errors (or all if omitted).                                                                                                            |
| `error <id> <exportOrImportId> <errorId>`                       | One open error by id. `--request-detail` adds the captured HTTP request/response; `--retry-data` adds the editable retry data.                 |
| `delete-debug-requests <id> <exportOrImportId> [reqAndResKeys]` | Delete stored request/response traces (specific keys, or all the step's).                                                                      |
| `retry-errors <id> <exportOrImportId> [retryDataKeys]`          | Retry errors (or all if omitted).                                                                                                              |
| `assign-errors <id> <exportOrImportId> <email> [errorIds]`      | Assign errors to a user.                                                                                                                       |
| `unassign-errors <id> <exportOrImportId> [errorIds]`            | Unassign errors (or all if omitted).                                                                                                           |
| `delete-resolved-errors <id> <exportOrImportId> [errorIds]`     | Purge resolved errors.                                                                                                                         |
| `update-error-data <id> <exportOrImportId> <errorId>`           | Update an error's retry data before re-running (resolves its retryDataKey internally).                                                         |
| `tag-errors <id> <exportOrImportId>`                            | Set or clear tags on a batch of errors.                                                                                                        |
| `error-summary <id>`                                            | Per-step open-error counts and last-error times for a flow.                                                                                    |
| `error-analysis <id> <exportOrImportId>`                        | Group errors by code and message, counting each pattern's errors by classification and by `retryAt`.                                           |
| `add-processor <id> <exportOrImportId>`                         | Add a page processor to a flow.                                                                                                                |
| `remove-processor <id> <exportOrImportId>`                      | Remove a page processor.                                                                                                                       |
| `add-generator <id> <exportId>`                                 | Add a page generator (export).                                                                                                                 |
| `remove-generator <id> <exportId>`                              | Remove a page generator.                                                                                                                       |
| `replace-connection <id> <oldConnId> <newConnId>`               | Swap a connection across every step.                                                                                                           |
| `set-group <flowGroupingId> <flowIds...>`                       | Assign flows to a flow group.                                                                                                                  |
| `unset-group <flowIds...>`                                      | Remove flows from their flow group.                                                                                                            |
| `debug-requests <id> <exportOrImportId>`                        | List debug HTTP request log entries.                                                                                                           |
| `debug-request-detail <id> <exportOrImportId> <key>`            | Full request/response for one debug entry.                                                                                                     |
| `test-run <id>`                                                 | Start a test run and return stage-by-stage results.                                                                                            |
| `test-run-step-results <id> <runId> <exportOrImportId>`         | Step results for a test run.                                                                                                                   |
| `test-run-step-logs <id> <runId> <exportOrImportId>`            | HTTP logs for a test run step.                                                                                                                 |
| `enable-execution-logs <id>`                                    | Arm debug execution logging on a flow, for up to 60 minutes.                                                                                   |
| `disable-execution-logs <id>`                                   | Disarm debug execution logging.                                                                                                                |
| `execution-logs <id> <jobId>`                                   | List execution log entries for a run.                                                                                                          |
| `query-execution-logs <id> <jobId>`                             | Search execution log metadata for a step, or trace a Tool step's chain.                                                                        |
| `execution-log-detail <id> <jobId>`                             | Get per-stage data for an execution log step.                                                                                                  |
| `last-export-date <id>`                                         | Flow-level delta checkpoint.                                                                                                                   |
| `run-stats <id>`                                                | Runtime statistics for the flow's completed runs — the data behind the proactive-alert threshold chart. Added in celigo-cli 2026.10.1.         |
| `delete-execution-logs <id>`                                    | Delete a flow's execution logs within a time range.                                                                                            |
| `cancel-jobs <id>`                                              | Cancel a flow's jobs.                                                                                                                          |

***

## `celigo flows list`

List all flows in the account, with optional server-side filters.

**Signature**

```bash
celigo flows list [flags]
```

**Flags**

| Flag                      | Type             | Default   | Description                                                                                                                                                                                                                                                     |
| ------------------------- | ---------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--integration <id>`      | string           | —         | List only flows belonging to this integration. Since celigo-cli 2026.11.2, an id that matches no integration is reported as not found instead of printing an empty list.                                                                                        |
| `--name <substring>`      | string           | —         | Filter by name — a server-side substring match, not exact. Added in celigo-cli 2026.8.7.                                                                                                                                                                        |
| `--disabled`              | boolean          | `false`   | Only flows with `disabled: true`. Added in celigo-cli 2026.8.7.                                                                                                                                                                                                 |
| `--enabled`               | boolean          | `false`   | Only flows that are not disabled (sends `disabled=false`). With `--disabled` it is refused before any request. Added in celigo-cli 2026.12.1.                                                                                                                   |
| `--sort-by <field>`       | `lastExecutedAt` | —         | Sort by last execution — most recently executed first, never-run flows last. Added in celigo-cli 2026.8.7.                                                                                                                                                      |
| `--order <dir>`           | `asc` \| `desc`  | —         | Direction of the list order: of `lastExecutedAt` with `--sort-by` (most recent first by default), otherwise of the default order. Added in celigo-cli 2026.11.2.                                                                                                |
| `--include-instances`     | boolean          | `false`   | Include instance flows generated from abstract (multi-instance) flows, otherwise excluded from the results. Added in celigo-cli 2026.8.7.                                                                                                                       |
| `--abstract-flow-id <id>` | string           | —         | List the instance flows generated from this abstract flow (the API's `_abstractFlowId` filter). Implies `--include-instances`: the filter alone returns the instances even though plain lists exclude them. Added in celigo-cli 2026.8.7.                       |
| `--merge-instance`        | boolean          | `false`   | With `--abstract-flow-id`: return each instance merged with its abstract flow, as [`flows get --merge-instance`](#celigo-flows-get) returns it. Use `--fields all` for the merged documents. Added in celigo-cli 2026.11.2.                                     |
| `--fields <spec>`         | string           | `default` | Fields to request per row. `default` returns `_id`, `name`, and the table columns; `all` returns complete documents; a comma-separated list requests specific fields. See [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md). |
| `--limit <n>`             | integer          | —         | Return at most `<n>` rows, fetching a single page.                                                                                                                                                                                                              |

`--include-instances` also applies to the `--integration` form; `--name`, `--disabled`, `--enabled`, `--sort-by`, `--order`, `--abstract-flow-id`, and `--merge-instance` are main-list only — the integration-scoped endpoint ignores them, so the CLI rejects the combination.

`--merge-instance` works only with `--abstract-flow-id`. Without it the API answers `400` (`Required query parameter _abstractFlowId is missing`), and the CLI adds a hint that names `--abstract-flow-id`.

Since celigo-cli 2026.11.2, a blank filter value (an unset shell variable), such as `--name ""`, is refused before any request; earlier releases sent it as an empty filter.

Default table columns: `_id`, `name`, `_integrationId`, `disabled`, `lastModified`, `lastExecutedAt`. Since celigo-cli 2026.10.1, `--fields a,b,…` with `--format table` draws `_id`, `name`, and the fields you name instead.

**Example**

```bash
celigo flows list --format table
celigo flows list --integration 5f83a9b2c7d3e8f1a2b3c4d5

# Disabled flows whose name mentions "orders", most recently run first
celigo flows list --name orders --disabled --sort-by lastExecutedAt

# Every instance generated from one abstract flow
celigo flows list --abstract-flow-id 5f83a9b2c7d3e8f1a2b3c4d5

# The same instances, each merged with the abstract flow
celigo flows list --abstract-flow-id 5f83a9b2c7d3e8f1a2b3c4d5 --merge-instance --fields all

# Sorted by last execution, oldest first
celigo flows list --sort-by lastExecutedAt --order asc

# Complete flow documents, including every step
celigo flows list --fields all

# Find flows that have never run
celigo flows list --jq '.[] | select(.lastExecutedAt == null) | .name'
```

**Corresponds to**: [`GET /v1/flows`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows) (operationId: `listFlows`)

***

## `celigo flows get`

Fetch one flow by ID.

**Signature**

```bash
celigo flows get <id> [--merge-instance]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag               | Type    | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--merge-instance` | boolean | `false` | For an instance flow: return its effective config — the abstract flow's structure (`pageGenerators`/`routers`) merged with this instance's `overrides` (the API's `mergeInstance` param). The merged document keeps `_abstractFlowId` but absorbs the overrides into the structure (the `overrides` key disappears). Without it an instance returns its sparse document: `_abstractFlowId`, `overrides`, and instance-level fields only. Non-instance flows are returned unchanged (the server ignores the param). Added in celigo-cli 2026.8.7. |

**Example**

```bash
celigo flows get 5f83a9b2c7d3e8f1a2b3c4d5

# An instance flow's effective config, structure and overrides merged
celigo flows get 6a1b2c3d4e5f6a7b8c9d0e1f --merge-instance
```

**Corresponds to**: [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id) (operationId: `getFlowById`)

***

## `celigo flows create`

Create a flow from a JSON body (stdin, or `--file`).

Since celigo-cli 2026.10.1, the body is checked before it is sent. It is validated against the published API schemas — the pack [`celigo lint`](https://developer.celigo.com/cli/local-tree/lint-and-resolve.md#celigo-lint) uses: a field the spec does not document, a wrong JSON type, or a value outside an enum prints a `warning` line on stderr, and the flow is still created. Refused before any request, with no override: a body that is not a JSON object, masked `"******"` credential placeholders, and a `responseMapping` object wrapper, `null`, or the `[null]`/`[{}]` residue it leaves. Since celigo-cli 2026.10.2, a router whose `script` is `null` is refused the same way (see the router warning at the top of this page).

**Signature**

```bash
celigo flows create [flags]
```

**Flags**

| Flag                | Type   | Default | Description                                                             |
| ------------------- | ------ | ------- | ----------------------------------------------------------------------- |
| `-f, --file <path>` | string | stdin   | Read the JSON body from a file instead of stdin (`-` also means stdin). |

**Request body**

Reads JSON on stdin (or from `--file`). See the `POST /v1/flows` schema for the full payload shape.

**Example**

```bash
cat flow.json | celigo flows create
celigo flows create --file flow.json
```

**Corresponds to**: [`POST /v1/flows`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#post-v1-flows) (operationId: `createFlow`)

***

## `celigo flows update`

Full replace of a flow from a JSON body (stdin, or `--file`). Omitted fields are erased.

> ⚠️ **`PUT` fully replaces the flow.** Any field omitted from the body is erased. `GET` the flow first, edit, then send the complete object back — or use `set` for targeted edits.

Since celigo-cli 2026.10.1, the body is checked against the published API schemas before the PUT (when it has findings, the current flow is read first, so only what the update adds or changes is reported); findings are stderr warnings and never block. A body that is not a JSON object, and a `responseMapping` object wrapper or `null`, are refused before any request. Since celigo-cli 2026.10.2, so is a router whose `script` is `null`, even one copied from a GET: leave the key out. On an Integration App's flow (`_connectorId` set), the platform answers `200` and keeps its own value for every field the app locks: each field the update changed whose reply still holds the previous value is named on stderr, and the command exits `1`.

**Signature**

```bash
celigo flows update <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                | Type    | Default | Description                                                                                                                                                                                                                    |
| ------------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-f, --file <path>` | string  | stdin   | Read the JSON body from a file instead of stdin (`-` also means stdin).                                                                                                                                                        |
| `--force`           | boolean | `false` | Submit even if the body contains masked credential values (`"******"`) copied from a GET. Since celigo-cli 2026.10.1, a masked value is four or more asterisks and nothing else: a lone `*` is a value and needs no `--force`. |

**Request body**

Reads JSON on stdin (or from `--file`). See the `PUT /v1/flows/{_id}` schema for the full payload shape.

**Example**

```bash
celigo flows get 5f83a9b2c7d3e8f1a2b3c4d5 --format json > flow.json
# edit flow.json
cat flow.json | celigo flows update 5f83a9b2c7d3e8f1a2b3c4d5
celigo flows update 5f83a9b2c7d3e8f1a2b3c4d5 --file flow.json
```

**Corresponds to**: [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows set`

Safe field edit. The flows PATCH whitelist — `name`, `description`, `aiDescription`, `disabled`, `runPageGeneratorsInParallel`, `logging.debugUntil`, `logging.mode`, `schedule`, and `timezone` — is applied via an atomic PATCH; other fields go through GET, modify, PUT. Accepts `key=value` pairs; values auto-parse as JSON (`disabled=false` is a boolean; `=null` removes a field). Supports dot paths and array indexing. A value can also be loaded from a file with `key=file://<path>` (avoids hand-escaping multi-line content like script source or SQL; `~` and relative paths are supported).

**`schedule` and `timezone` are single strings.** A flow's `schedule` is one Celigo 6-field cron expression, `? minute hour day-of-month month day-of-week` (`'? 5 0 ? * *'` runs daily at 00:05), and `timezone` is an IANA time zone name. Assign each whole; `schedule=null` clears the schedule. Since celigo-cli 2026.10.1, the two are on the PATCH whitelist in place of `schedule.cron`, `schedule.days`, `schedule.frequency`, `schedule.startDate`, and `schedule.endDate`, and a path beneath either is refused before any request, in every mode — the platform answers a PATCH beneath `/schedule` with `204` and changes nothing. The refusal names the assignment to use:

```
Cannot set schedule.cron: schedule is one string — a Celigo 6-field cron expression, '? minute hour day-of-month month day-of-week' — with nothing beneath it to set (a PATCH beneath /schedule answers 204 and changes nothing). Assign the whole value: celigo flows set <id> schedule='? 5 0 ? * *'
```

A schedule an earlier release set through `schedule.cron=…` was never changed: check it with `flows get`.

In `operate` mode, `set` takes only `disabled`, `logging.debugUntil`, and `schedule`. Since celigo-cli 2026.10.1, any other field — `debugUntil` included — is refused in `operate` mode instead of opening a GET + PUT of the whole flow. See [permission modes](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

Since celigo-cli 2026.10.1, `set` also checks what it sends and what landed. The assigned values (PATCH) or the document it would PUT are checked against the published API schemas, as warnings that never block, and a GET + PUT that would send a `responseMapping` object wrapper or `null` is refused. After a GET + PUT, a field the server's reply still holds at its previous value prints `not stored <field> the server answered the PUT but still holds its previous value …` on stderr, and the command exits `1` — the platform answers `200` for a change it ignores. On an Integration App's flow (`_connectorId` set), one line names the fields the app kept instead (`celigo: flows set: the platform kept its own value for <fields> — the Integration App locks them`), with the same exit code.

Since celigo-cli 2026.10.2, a GET + PUT that would send back a router whose `script` is `null` is refused before the PUT (see the router warning at the top of this page). The refusal names the assignment to add to the same `set`: `'routers[<n>].script=null'` deletes the key. A PATCH never sends the routers, so a `set` of whitelisted fields is not refused.

**Signature**

```bash
celigo flows set <id> [assignments...]
```

**Arguments**

| Argument           | Type              | Required | Description                                                                         |
| ------------------ | ----------------- | -------- | ----------------------------------------------------------------------------------- |
| `<id>`             | string            | Yes      | Flow ID.                                                                            |
| `[assignments...]` | `key=value` pairs | Yes      | One or more field assignments. Use `key=file://<path>` to load a value from a file. |

**Example**

```bash
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 disabled=false
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 'schedule=? */15 * * * *'
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 schedule='? 5 0,6,12,18 ? * *' timezone=America/New_York
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 pageGenerators[0]._exportId=6a1b2c3d4e5f6a7b8c9d0e1f
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 routers[0].branches[0].pageProcessors[0].script.content=file://./hook.js

# Delete a router's null script key, which Flow Builder cannot open
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 'routers[0].script=null'
```

**Corresponds to**: [`PATCH /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) for whitelisted fields; otherwise [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) followed by [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows delete`

Delete a flow.

> ⚠️ **Deleting a flow is destructive.** The flow and its step wiring are removed. Run `dependencies` first to confirm nothing references it.

**Signature**

```bash
celigo flows delete <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag        | Type    | Default | Description        |
| ----------- | ------- | ------- | ------------------ |
| `-y, --yes` | boolean | `false` | Skip confirmation. |

**Example**

```bash
celigo flows delete 5f83a9b2c7d3e8f1a2b3c4d5 -y
```

**Corresponds to**: [`DELETE /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#delete-v1-flows-_id) (operationId: `deleteFlow`)

***

## `celigo flows audit`

Show the audit log (change history) for one flow. Since celigo-cli 2026.10.1, every page of the log is read, and the table shows `_id`, `resourceType`, `event`, `source`, `byUser.email`, and `time` — `resourceType` tells the flow's own entries from its descendants'.

**Signature**

```bash
celigo flows audit <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Example**

```bash
celigo flows audit 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: `GET /v1/flows/{_id}/audit` (per-resource audit log; returns entries for the flow and its descendants).

***

## `celigo flows graph`

Render a flow's Flow Builder graph from the local tree, offline — the sources, steps, branchings, merges, and terminals, as the canvas draws them. Each step carries its name, category, application, and step components (filters, mappings, hooks, response mapping, error handling), resolved through the tree that `celigo pull` wrote. See [The local tree](https://developer.celigo.com/cli/local-tree.md) for how the tree is laid out. Added in celigo-cli 2026.9.1.

The graph is rendered from the documents on disk, so no profile or token is needed and the command is never mode-gated. `[ref]` is a tree path, a link, a resource folder, `type:id`, or a bare id. Any `flow.json` on disk works through `--file` (`-` for stdin), but its references stay unresolved unless the file sits in a pulled tree. A `flow:`, `api:`, or `tool:` ref renders with its own builder's shape from any of the three groups, and a `--file` document whose shape names no builder renders as a flow. An instance flow renders as its abstract flow's structure with the instance's `overrides` applied; `--no-merge-instance` shows the sparse document as is.

Since celigo-cli 2026.11.2, a `[ref]` given beside `--file` is refused (`Pass either a <ref> or --file <path>, not both.`); earlier releases read the file and ignored the ref. A blank `--dir` or `--file` (an unset shell variable) is refused too; a blank `--dir` used to mean the current directory.

The JSON output is the graph the Celigo VS Code extension's Flow Canvas consumes — the extension opens the same graph as an interactive canvas; see [VS Code extension](https://developer.celigo.com/cli/vscode-extension.md). `--as mermaid` renders natively in GitHub pull requests, and `--as dot` is Graphviz input.

**Signature**

```bash
celigo flows graph [ref] [--dir <path>] [--as json|mermaid|dot] [--file <path>] [--status] [--no-merge-instance] [--no-components]
```

**Arguments**

| Argument | Type   | Required | Description                                                                                                                                                                                                                                                            |
| -------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[ref]`  | string | No       | The flow to render: a tree path, a link, a resource folder, `flow:<id>` (or `api:`/`tool:`), or a bare id. Required unless `--file` is given; with neither, the command exits `1` with `Provide a ref (a tree path, type:id, or id) or --file <path> ('-' for stdin).` |

**Flags**

| Flag                  | Type                         | Default | Description                                                                                                                                                                                                                                                                                                                                                         |
| --------------------- | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--dir <path>`        | string                       | `.`     | Tree root directory.                                                                                                                                                                                                                                                                                                                                                |
| `--as <format>`       | `json` \| `mermaid` \| `dot` | `json`  | Output format. `json` is the graph the VS Code canvas consumes; `mermaid` renders natively in GitHub pull requests; `dot` is for Graphviz. Since celigo-cli 2026.10.1, a node id that is one of the format's reserved words (`end`, `graph`, `subgraph`, `node`, `edge`, `sources`, …) is prefixed with `n_`, and `#` and backticks in a Mermaid label are escaped. |
| `--file <path>`       | string                       | —       | Read the document from a file instead of the tree (`-` for stdin). References render unresolved unless the file sits in a pulled tree. Since celigo-cli 2026.10.1, anything but one JSON object — a `flows list` array, `null`, a number — is refused.                                                                                                              |
| `--status`            | boolean                      | `false` | Add the tree's `celigo status` state (`clean`, `modified`, `missing`, or `untracked`) for the document and each step's resource. In `mermaid`/`dot` output the states appear as comment lines.                                                                                                                                                                      |
| `--no-merge-instance` | boolean                      | `false` | Render an instance flow's sparse document as is, without merging the abstract flow's structure. By default an instance renders as its abstract flow's structure with the instance's `overrides` applied.                                                                                                                                                            |
| `--no-components`     | boolean                      | `false` | Leave the step component chips out of `mermaid`/`dot` output.                                                                                                                                                                                                                                                                                                       |

**Example**

```bash
# From inside a pulled tree: the graph as JSON
celigo flows graph flow:5f83a9b2c7d3e8f1a2b3c4d5

# Mermaid for a pull request description, without the step component chips
celigo flows graph "integrations/Shop/flows/Order Sync/flow.json" --as mermaid --no-components

# Graphviz, with the tree's status for the flow and each step
celigo flows graph 5f83a9b2c7d3e8f1a2b3c4d5 --dir ./envs/prod --as dot --status

# Any flow document on disk (references stay unresolved outside a tree)
celigo flows get 5f83a9b2c7d3e8f1a2b3c4d5 | celigo flows graph --file - --as mermaid
```

**Corresponds to**: no API call — the graph is built from the local tree.

***

## `celigo flows run`

Trigger a one-off flow run. Use `--start-time` / `--end-time` to override the delta window, or `--export-ids` to run a subset of a multi-generator flow. The run is asynchronous: the command prints the platform's answer, which names the queued job (`_jobId`), and returns. Add `--wait` to wait for the run to finish.

The window's end becomes the flow's checkpoint, so the next run starts there: a window in the past moves the checkpoint back. A run that exports no records leaves the checkpoint where it was.

> **The delta override flags were renamed in celigo-cli 2026.8.1.** They were `--start-date` and `--end-date`, which read as calendar dates but accept full timestamps. Use `--start-time` and `--end-time`.

The platform can refuse a run inside an HTTP 200 answer — a disabled flow's exports each come back with an `errors` entry and no job. Since celigo-cli 2026.10.1, when the platform refuses every export, `run` exits `1` with `Flow <id> was not run — the platform refused every export: <exportId>: <code>: <message>.`, adding `Enable the flow first: celigo flows set <id> disabled=false` for a disabled flow. In a multi-generator run, the exports the platform refused are named in a stderr warning while the others run. Since celigo-cli 2026.11.2, an answer that carries a reason and no job (`{"error": …}`) fails too, with `Flow <id> was not run — the platform answered with an error and no job: <reason>. If a run was queued all the same, find it with 'celigo jobs current --flow <id>'.`; earlier releases printed that answer and exited `0`. The run is sent once: a timeout or a 5xx is reported, never retried, because the run may have started. Since celigo-cli 2026.11.1 a `429` is not retried either; earlier releases retried it. Requires `operate` mode.

Since celigo-cli 2026.11.2, `--wait` waits for the run as [`jobs wait`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-wait) does. It prints the queued jobs as the wait leaves them, in place of the trigger's answer: one job object, or an array of jobs when the run queued several or the platform answered with a list. A run of several page generators queues one parent job per generator, and the trigger's answer names only the first. The CLI finds the others by the run's `flowExecutionGroupId` and waits on them too, all under one deadline (`--timeout`, default 100 seconds). The exit code is the run's outcome:

* `0` — every job completed.
* `1` — a job failed or was canceled.
* `75` — a job is still in progress at the deadline. Keep waiting with `celigo jobs wait <jobId>`, which stderr names for each such job. Do not run `flows run` again to resume: that starts another run.

Progress and the outcome go to stderr, so stdout stays one JSON document. With `--wait`, an answer that names no job to wait on fails, quoting the answer. `--timeout` without `--wait` is refused before the prompt:

```
--timeout only applies with --wait. Add --wait, or drop --timeout.
```

Since celigo-cli 2026.11.2, an empty `--export-ids`, `--start-time`, or `--end-time` (an unset shell variable) is refused before the prompt; an empty `--export-ids` used to run every export. The window is checked there too: a bound that is not a timestamp is refused (`Invalid --start-time 'yesterday'. Use an ISO-8601 timestamp (e.g. 2026-10-01T00:00:00Z).`), and so is a `--start-time` later than `--end-time`.

**Signature**

```bash
celigo flows run <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                  | Type         | Default        | Description                                                                                                                                               |
| --------------------- | ------------ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--start-time <iso>`  | ISO 8601     | —              | Start of the delta window. Maps to `lastExportDateTime`.                                                                                                  |
| `--end-time <iso>`    | ISO 8601     | —              | End of the delta window. Maps to `currentExportDateTime`.                                                                                                 |
| `--export-ids <ids>`  | string (csv) | all generators | Comma-separated export IDs to run. Since celigo-cli 2026.10.1, a list that names no export (`--export-ids ,,`) is refused before the confirmation prompt. |
| `--wait`              | boolean      | `false`        | Wait for the queued job(s) as `jobs wait` does, and print them in place of the trigger's answer. Added in celigo-cli 2026.11.2.                           |
| `--timeout <seconds>` | integer      | `100`          | With `--wait`: seconds to wait before returning exit `75`. Refused without `--wait`. Added in celigo-cli 2026.11.2.                                       |
| `-y, --yes`           | boolean      | `false`        | Skip confirmation.                                                                                                                                        |

**Example**

```bash
celigo flows run 5f83a9b2c7d3e8f1a2b3c4d5 -y

# Backfill one day
celigo flows run 5f83a9b2c7d3e8f1a2b3c4d5 \
  --start-time 2026-04-01T00:00:00Z --end-time 2026-04-02T00:00:00Z -y

# Run the flow and wait for it: exit 0 completed, 1 failed or canceled, 75 still in progress
celigo flows run 5f83a9b2c7d3e8f1a2b3c4d5 -y --wait

# After exit 75, keep waiting for the job that stderr named
celigo jobs wait 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`POST /v1/flows/{_id}/run`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#post-v1-flows-_id-run) (operationId: `runFlow`). With `--wait`, the CLI then reads [`GET /v1/jobs/{_id}/family`](https://developer.celigo.com/api/api-reference/monitoring/jobs#get-v1-jobs-_id-family) for each queued job, as `jobs wait` does. To find the jobs of the run's other page generators, it also reads the flow and lists its recent jobs (`GET /v1/flows/{_id}`, `GET /v1/jobs`).

***

## `celigo flows replay`

Replay Event Streams messages through a flow. The command queues a run that delivers again the messages already published to the topics the flow's listeners read. Use it to reprocess messages after a fix, without publishing anything again. Added in celigo-cli 2026.11.2.

Only the flow's topic exports (`adaptorType: TopicExport`) run; the flow's other sources are skipped. Name the range to replay by topic offset or by message time:

* `--start-offset` and `--end-offset` take topic offsets. [`topics messages`](https://developer.celigo.com/cli/commands/topics.md#celigo-topics-messages) shows the offset of every message. Its `--offset-gt N` excludes offset `N`, where `--start-offset N` includes it.
* `--start-time` and `--end-time` take message times.

The range is inclusive, and on the same side an offset wins over a time. With no end, the replay stops at the last message the listener has already delivered, so a listener that has never read its topic replays nothing. A replay moves neither the listener's read position ([`topics offsets`](https://developer.celigo.com/cli/commands/topics.md#celigo-topics-offsets)) nor the flow's delta checkpoint.

The flow must be enabled, and a flow runs one instance at a time: a replay requested while a run is queued or running answers `409 job_already_queued`. A flow with no topic export answers `422`.

The replay is asynchronous, like [`run`](#celigo-flows-run): the platform queues one job per topic listener, each with `runType: replay`, and its answer names only the first. `--wait` waits for all of them as [`jobs wait`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-wait) does, finding the others by the replay's `flowExecutionGroupId`, and prints the jobs in place of the answer. The exit codes are the same: `0` when every job completed, `1` when one failed or was canceled, and `75` when one is still in progress at the deadline (`--timeout`, default 100 seconds). After exit `75`, keep waiting with `celigo jobs wait <jobId>`. Do not run `flows replay` again to resume: that queues another replay.

A time is a full calendar date (`YYYY-MM-DD`) or a timestamp, on a day the calendar has, with the zone as `Z` or an offset such as `+02:00`. A date alone is read as UTC midnight, and a time with no zone in the machine's time zone. Anything else is refused before the prompt and the request:

```
Invalid --start-time '5'. Use an ISO 8601 calendar date or timestamp on a day the calendar has, e.g. 2026-10-01 or 2026-10-01T00:00:00Z, with the zone as Z or an offset such as +02:00.
```

The other bounds are checked there too. An offset that is not a non-negative integer is refused, and so are an `--end-offset` lower than `--start-offset`, an `--end-time` earlier than `--start-time`, an `--export-ids` list that names no export, and `--timeout` without `--wait`.

The command prompts for confirmation unless you pass `-y`, and requires `operate` mode. The request is sent once: a timeout, a `5xx`, or a `429` is reported and never retried, because the replay may have been queued. An answer that carries a reason and no job fails, as a rejected `run` does.

**Signature**

```bash
celigo flows replay <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                  | Type         | Default            | Description                                                                                                           |
| --------------------- | ------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
| `--export-ids <ids>`  | string (csv) | every topic export | Comma-separated topic export IDs to replay.                                                                           |
| `--start-offset <n>`  | integer      | —                  | First topic offset to replay (a non-negative integer).                                                                |
| `--end-offset <n>`    | integer      | —                  | Last topic offset to replay (not lower than `--start-offset`).                                                        |
| `--start-time <iso>`  | ISO 8601     | —                  | Earliest message timestamp to replay. Ignored when `--start-offset` is set.                                           |
| `--end-time <iso>`    | ISO 8601     | —                  | Latest message timestamp to replay. Ignored when `--end-offset` is set.                                               |
| `--wait`              | boolean      | `false`            | After the replay is queued, wait for its job(s) as `jobs wait` does, and print them in place of the request's answer. |
| `--timeout <seconds>` | integer      | `100`              | With `--wait`: seconds to wait before returning exit `75`. Refused without `--wait`.                                  |
| `-y, --yes`           | boolean      | `false`            | Skip confirmation.                                                                                                    |

**Example**

```bash
# Replay offsets 120 to 180 through every topic listener of the flow, and wait for the jobs
celigo flows replay 5f83a9b2c7d3e8f1a2b3c4d5 --start-offset 120 --end-offset 180 --wait -y

# Replay one listener's messages of one day, by message time
celigo flows replay 5f83a9b2c7d3e8f1a2b3c4d5 --export-ids 6a1b2c3d4e5f6a7b8c9d0e1f \
  --start-time 2026-11-01 --end-time 2026-11-02 -y
```

**Corresponds to**: [`POST /v1/flows/{_id}/replay`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) — body `{"_exportIds": [...], "replay": {"startOffset", "endOffset", "startDate", "endDate"}}`, each field only when its flag is given.

***

## `celigo flows clone`

Clone a flow into a target integration and environment. A same-env clone needs no body: the CLI reads the flow's own export and import steps and maps each step's connection (`_connectionId`) to itself. A cross-env clone requires a `connectionMap` piped via stdin or passed with `--file`.

A flow whose hooks or wrapper connections run on a stack (its clone preview says `stackRequired: true`) clones only when the request names a stack. Pass `--stack-id`; without it, the platform refuses the clone with `400 stack_not_found`.

**Signature**

```bash
celigo flows clone <id> <integrationId> <environmentId> [flags]
```

**Arguments**

| Argument          | Type   | Required | Description            |
| ----------------- | ------ | -------- | ---------------------- |
| `<id>`            | string | Yes      | Source flow ID.        |
| `<integrationId>` | string | Yes      | Target integration ID. |
| `<environmentId>` | string | Yes      | Target environment ID. |

**Flags**

| Flag                | Type   | Default                 | Description                                                                                                                                                                                                                       |
| ------------------- | ------ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--flow-group <id>` | string | —                       | Target flow group ID within the integration.                                                                                                                                                                                      |
| `--name <name>`     | string | `Clone - <source name>` | Name for the cloned flow.                                                                                                                                                                                                         |
| `-f, --file <path>` | string | —                       | Read the `connectionMap` body from a file instead of stdin. `--file -` waits until stdin closes. Added in celigo-cli 2026.10.1.                                                                                                   |
| `--stack-id <id>`   | string | —                       | The stack the copy's hooks and wrapper connections run on, sent as `_stackId`. Required when the clone preview says `stackRequired: true`; without it, the platform answers `400 stack_not_found`. Added in celigo-cli 2026.10.2. |

**Request body** (optional)

Reads optional JSON on stdin, or from `--file`. A cross-env clone needs the `connectionMap`:

```json
{"connectionMap": {"<sourceConnId>": "<targetConnId>"}}
```

Since celigo-cli 2026.10.1, a body piped without `--file` must start arriving within one second and is then read to its end, however long the rest takes; behind a slower producer, use `--file -`. A body that is not a JSON object, or whose `connectionMap` is not an object, is refused before any request instead of being ignored for a self-map.

Since celigo-cli 2026.10.2, a string `_stackId` in the body is sent with the clone, as `--stack-id` is; `--stack-id` wins when both are given. Earlier releases built their own request body and dropped it.

Since celigo-cli 2026.11.2, a blank `--name`, `--flow-group`, or `--stack-id` (an unset shell variable) is refused before any request.

**Example**

```bash
celigo flows clone 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 7b2c3d4e5f6a7b8c9d0e1f2a

# A flow whose hooks run on a stack
celigo flows clone 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 7b2c3d4e5f6a7b8c9d0e1f2a \
  --stack-id 8c3d4e5f6a7b8c9d0e1f2a3b
```

**Corresponds to**: [`POST /v1/flows/{_id}/clone`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#post-v1-flows-_id-clone) (operationId: `cloneFlow`)

***

## `celigo flows errors`

Get open errors for a flow export or import step. Table columns: `errorId`, `code`, `message`, `occurredAt`, `retryDataKey`, `tags`. Since celigo-cli 2026.10.1, the table shows each error's `errorId` — the id `error`, `resolve-errors`, and the other error commands take — and its `retryDataKey`, the key `retry-errors` takes.

Since celigo-cli 2026.10.2, a `404` from a step's `errors` or `resolved` route carries a hint that names the step: it is not one of the flow's steps now, or the flow does not exist. A step detached from its flow keeps its open errors out of sight until it is attached again, and `celigo flows get <id>` shows the flow's steps. The other commands on this page that call those routes, and [`jobs errors`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-errors), print the same hint.

**Signature**

```bash
celigo flows errors <id> <exportOrImportId>
```

**Arguments**

| Argument             | Type   | Required | Description                          |
| -------------------- | ------ | -------- | ------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                             |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow. |

**Example**

```bash
celigo flows errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --format json | jq length
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/errors`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowStepErrors`)

***

## `celigo flows resolved-errors`

Get errors already marked resolved on a flow step. Table columns: `errorId`, `code`, `message`, `resolvedAt`; since celigo-cli 2026.10.1, the first column is each error's `errorId`.

**Signature**

```bash
celigo flows resolved-errors <id> <exportOrImportId>
```

**Arguments**

| Argument             | Type   | Required | Description                          |
| -------------------- | ------ | -------- | ------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                             |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow. |

**Example**

```bash
celigo flows resolved-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/resolved`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowStepResolvedErrors`)

***

## `celigo flows resolve-errors`

Mark errors resolved. Pass a comma-separated `[errorIds]` list, or omit to resolve every open error on the step.

Since celigo-cli 2026.9.1 the command reports what the API did, not how many ids were sent. The resolve endpoint answers `204 No Content` whether or not an id matched, so with explicit `[errorIds]` the CLI lists the step's open errors before and after the write and counts only ids that were present and are now gone. Ids that were not listed, or are still listed, are named on stderr. A run that changed nothing exits `1` with the reason (for example `None of the 3 id(s) given is listed on this step. Nothing was resolved.`).

**Signature**

```bash
celigo flows resolve-errors <id> <exportOrImportId> [errorIds] [flags]
```

**Arguments**

| Argument             | Type         | Required | Description                                            |
| -------------------- | ------------ | -------- | ------------------------------------------------------ |
| `<id>`               | string       | Yes      | Flow ID.                                               |
| `<exportOrImportId>` | string       | Yes      | Export or import ID within the flow.                   |
| `[errorIds]`         | string (csv) | No       | Error IDs to resolve. Omit to resolve all open errors. |

**Flags**

| Flag        | Type    | Default | Description                           |
| ----------- | ------- | ------- | ------------------------------------- |
| `-y, --yes` | boolean | `false` | Skip confirmation when resolving all. |

**Example**

```bash
celigo flows resolve-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`PUT /v1/flows/{_id}/{_exportOrImportId}/resolved`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `resolveFlowStepErrors`)

***

## `celigo flows error`

Get one open error on a flow step **by its error id**. With no flags it prints the error record. Two flags enrich it, each resolving a derived key off the error record so you only ever need the `errorId`:

* `--request-detail` — also fetch the captured HTTP request/response trace (via the error's `reqAndResKey`). If you already hold a `reqAndResKey` — e.g. from `debug-requests` — use `debug-request-detail` instead.
* `--retry-data` — also fetch the editable retry data (via the error's `retryDataKey`), the same payload you edit and pipe into `update-error-data`.

With either flag the output is a composite `{ error, requestResponse?, retryData? }`.

Since celigo-cli 2026.11.1, the trace's credentials print as `********`: the value of each credential header, and a captured URL's userinfo and credential query parameters. The retry data prints as stored, since it is edited and sent back. See [Credentials in a run's result](https://developer.celigo.com/cli/using-the-cli/output-formats.md#credentials-in-a-runs-result).

**Signature**

```bash
celigo flows error <id> <exportOrImportId> <errorId> [--request-detail] [--retry-data]
```

**Arguments**

| Argument             | Type   | Required | Description                                                                                                                                                                              |
| -------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                                                                                                                                                                 |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow.                                                                                                                                                     |
| `<errorId>`          | string | Yes      | `errorId` from a `flows errors` entry. Record-level errors from non-HTTP adaptors have no stored trace (`--request-detail`) and only retryable errors carry retry data (`--retry-data`). |

**Example**

```bash
celigo flows error 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 4694681992 --request-detail --retry-data
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/errors`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowStepErrors`), plus [`GET .../requests/{key}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (`getFlowStepRequestDetail`) with `--request-detail` and [`GET .../{retryDataKey}/data`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (`getFlowStepErrorData`) with `--retry-data`.

***

## `celigo flows retry-errors`

Retry errors by `retryDataKey`. Pass a comma-separated `[retryDataKeys]` list, or omit to retry every open error.

Since celigo-cli 2026.9.1 the command reports what the API did, not how many keys were sent. The retry endpoint answers `204 No Content` for unknown keys, so the CLI counts only the batches that returned a `type: retry` job and names the job: `Retry queued for N record(s). (job <id>)`. Keys that matched no open error are listed on stderr, and a run that queued nothing exits `1` with the reason and the kind of key the command takes (`retryDataKey` values, the `retryDataKey` column of `flows errors`, not `errorId`s). An all-digit key is rejected before anything is sent — it `looks like an errorId, not a retryDataKey`.

Since celigo-cli 2026.10.1, retrying every open error when none of them carries a `retryDataKey` fails instead of reporting `Retry queued for 0 record(s).` — `3 open error(s) found, but none carries a key this command can act on (a retry needs a retryDataKey; connection-level errors have none and are cleared by rerunning the flow). Nothing was sent.`

**Signature**

```bash
celigo flows retry-errors <id> <exportOrImportId> [retryDataKeys] [flags]
```

**Arguments**

| Argument             | Type         | Required | Description                                         |
| -------------------- | ------------ | -------- | --------------------------------------------------- |
| `<id>`               | string       | Yes      | Flow ID.                                            |
| `<exportOrImportId>` | string       | Yes      | Export or import ID within the flow.                |
| `[retryDataKeys]`    | string (csv) | No       | Retry keys to retry. Omit to retry all open errors. |

**Flags**

| Flag        | Type    | Default | Description                          |
| ----------- | ------- | ------- | ------------------------------------ |
| `-y, --yes` | boolean | `false` | Skip confirmation when retrying all. |

**Example**

```bash
celigo flows retry-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`POST /v1/flows/{_id}/{_exportOrImportId}/retry`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `retryFlowStepErrors`)

***

## `celigo flows assign-errors`

Assign errors to a user by email. Pass a comma-separated `[errorIds]` list, or omit to assign every open error.

Since celigo-cli 2026.9.1 the command counts the ids the API echoes back as assigned, not the ids sent. Ids that were not open errors on the step are listed on stderr, and a run that assigned nothing exits `1` (`None of the N id(s) given is an open error on this step. Nothing was assigned.`).

**Signature**

```bash
celigo flows assign-errors <id> <exportOrImportId> <email> [errorIds] [flags]
```

**Arguments**

| Argument             | Type         | Required | Description                                          |
| -------------------- | ------------ | -------- | ---------------------------------------------------- |
| `<id>`               | string       | Yes      | Flow ID.                                             |
| `<exportOrImportId>` | string       | Yes      | Export or import ID within the flow.                 |
| `<email>`            | string       | Yes      | Assignee email address.                              |
| `[errorIds]`         | string (csv) | No       | Error IDs to assign. Omit to assign all open errors. |

**Flags**

| Flag        | Type    | Default | Description                           |
| ----------- | ------- | ------- | ------------------------------------- |
| `-y, --yes` | boolean | `false` | Skip confirmation when assigning all. |

**Example**

```bash
celigo flows assign-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f ops@example.com -y
```

**Corresponds to**: [`PUT /v1/flows/{_id}/{_exportOrImportId}/errors/assign`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `assignFlowStepErrors`)

***

## `celigo flows unassign-errors`

Unassign errors on a flow step. Pass a comma-separated `[errorIds]` list, or omit to unassign every open error on the step.

Since celigo-cli 2026.9.1 the command counts the ids the API echoes back as unassigned, not the ids sent. Ids that were not open errors on the step are listed on stderr, and a run that unassigned nothing exits `1`.

**Signature**

```bash
celigo flows unassign-errors <id> <exportOrImportId> [errorIds] [flags]
```

**Arguments**

| Argument             | Type         | Required | Description                                              |
| -------------------- | ------------ | -------- | -------------------------------------------------------- |
| `<id>`               | string       | Yes      | Flow ID.                                                 |
| `<exportOrImportId>` | string       | Yes      | Export or import ID within the flow.                     |
| `[errorIds]`         | string (csv) | No       | Error IDs to unassign. Omit to unassign all open errors. |

**Flags**

| Flag        | Type    | Default | Description                             |
| ----------- | ------- | ------- | --------------------------------------- |
| `-y, --yes` | boolean | `false` | Skip confirmation when unassigning all. |

**Example**

```bash
celigo flows unassign-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`PUT /v1/flows/{_id}/{_exportOrImportId}/errors/unassign`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `unassignFlowStepErrors`)

***

## `celigo flows delete-resolved-errors`

Delete resolved errors. Pass a comma-separated `[errorIds]` list, or omit to delete every resolved error on the step.

Since celigo-cli 2026.9.1 the command reports what the API did, not how many ids were sent. The delete endpoint answers `204 No Content` regardless, so with explicit `[errorIds]` the CLI lists the step's resolved errors before and after the write and counts only ids that were present and are now gone. Ids that were not listed, or are still listed, are named on stderr; a run that deleted nothing exits `1`.

> ⚠️ **Deleting resolved errors is permanent.** Purged error records cannot be recovered. Omitting `[errorIds]` deletes every resolved error on the step.

**Signature**

```bash
celigo flows delete-resolved-errors <id> <exportOrImportId> [errorIds] [flags]
```

**Arguments**

| Argument             | Type         | Required | Description                                              |
| -------------------- | ------------ | -------- | -------------------------------------------------------- |
| `<id>`               | string       | Yes      | Flow ID.                                                 |
| `<exportOrImportId>` | string       | Yes      | Export or import ID within the flow.                     |
| `[errorIds]`         | string (csv) | No       | Error IDs to delete. Omit to delete all resolved errors. |

**Flags**

| Flag        | Type    | Default | Description                          |
| ----------- | ------- | ------- | ------------------------------------ |
| `-y, --yes` | boolean | `false` | Skip confirmation when deleting all. |

**Example**

```bash
celigo flows delete-resolved-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`DELETE /v1/flows/{_id}/{_exportOrImportId}/resolved`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `deleteFlowStepResolvedErrors`)

***

## `celigo flows update-error-data`

Update an error's retry data before retrying. Pass the **error id** — the CLI resolves the error's `retryDataKey` internally — and pipe the error's whole retry-data envelope via stdin with its `data` edited: the `retryData` object `flows error --retry-data` prints (that command's whole output is accepted as it is). The PUT replaces the stored envelope, so a field left out is lost.

Since celigo-cli 2026.10.1, the CLI sends the envelope whole and refuses, before the PUT, a body without `data` and the error's own `retryDataKey` — earlier releases sent any body, and a field it left out was lost. An envelope that belongs to another error's `retryDataKey` is refused too, naming the command that reads this error's.

Since celigo-cli 2026.11.2, an envelope that holds `data` and `stage` but no `retryDataKey` is accepted. An error that a source export raised in its transform, filter, or preSave stage has such retry data, and earlier releases refused it.

**Signature**

```bash
celigo flows update-error-data <id> <exportOrImportId> <errorId>
```

**Arguments**

| Argument             | Type   | Required | Description                                                        |
| -------------------- | ------ | -------- | ------------------------------------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                                                           |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow.                               |
| `<errorId>`          | string | Yes      | `errorId` from a `flows errors` entry (same key as `flows error`). |

**Request body**

Reads JSON on stdin: the retry-data envelope (`{"data", "stage", "retryDataKey" where it has one, …}`), or the whole `flows error --retry-data` output. See the `PUT /v1/flows/{_id}/{_exportOrImportId}/{retryDataKey}/data` schema for the full payload shape.

**Example**

```bash
celigo flows error 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 4694681992 --retry-data --format json \
  | jq '.retryData.data.quantity = 5' \
  | celigo flows update-error-data 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 4694681992
```

**Corresponds to**: [`PUT /v1/flows/{_id}/{_exportOrImportId}/{retryDataKey}/data`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `updateFlowStepErrorData`)

***

## `celigo flows tag-errors`

Update tags on a batch of errors. `tagIds` uses the short tag code from `tags list` (the `tagId` field, e.g. `F3ZBQ`), not the Mongo `_id`. An empty `tagIds` array clears all tags. Since celigo-cli 2026.10.1, a body that is not a JSON object is refused before any request.

**Signature**

```bash
celigo flows tag-errors <id> <exportOrImportId>
```

**Arguments**

| Argument             | Type   | Required | Description                          |
| -------------------- | ------ | -------- | ------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                             |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow. |

**Request body**

Reads JSON on stdin:

```json
{"errors":[{"id":"<errorId>","rdk":"<retryDataKey>"}],"tagIds":["F3ZBQ"]}
```

See the `PUT /v1/flows/{_id}/{_exportOrImportId}/tags` schema for the full payload shape.

**Example**

```bash
echo '{"errors":[{"id":"abc","rdk":"xyz"}],"tagIds":["F3ZBQ"]}' \
  | celigo flows tag-errors 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`PUT /v1/flows/{_id}/{_exportOrImportId}/tags`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `updateFlowStepErrorTags`)

***

## `celigo flows error-summary`

Summarize a flow's open errors, with a count and the last error time per step. One request returns the flow-level rollup, and the command reports only steps with at least one open error.

Output columns: `stepId`, `openErrors`, `lastErrorAt`, and with `--tool-import-id` a `toolStage` column after `stepId`. In `table` format, a flow with no open errors prints a confirmation message. In `json` format it prints `[]`, so downstream parsing stays valid.

A Tool step's row counts the open errors of its whole tool chain, but the errors are listed under the step inside the tool that failed. Pass `--tool-import-id` with the Tool step's id for the chain's per-step counts, then read that step's errors with [`flows errors <id> <stepId>`](#celigo-flows-errors). Each Tool level of the chain has two more rows, `toolStage` `input` and `output`, for the errors at the tool's two ends. A Tool step nested inside another tool answers no rows: pass the flow's own Tool step. Added in celigo-cli 2026.12.1.

**Signature**

```bash
celigo flows error-summary <id> [--tool-import-id <id>]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                    | Type   | Default | Description                                                                             |
| ----------------------- | ------ | ------- | --------------------------------------------------------------------------------------- |
| `--tool-import-id <id>` | string | —       | Summarize the tool chain of this Tool step of the flow instead of the flow's own steps. |

**Example**

```bash
celigo flows error-summary 5f83a9b2c7d3e8f1a2b3c4d5

# The per-step counts of a Tool step's chain
celigo flows error-summary 5f83a9b2c7d3e8f1a2b3c4d5 --tool-import-id 6a1b2c3d4e5f6a7b8c9d0e1f

# The step that failed most recently
celigo flows error-summary 5f83a9b2c7d3e8f1a2b3c4d5 --jq 'max_by(.lastErrorAt)'
```

**Corresponds to**: [`GET /v1/flows/{_id}/errors`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows), the flow-level error rollup. One request covers every step.

***

## `celigo flows error-analysis`

Fetch a sample of errors on a step and group by `code` + `message`, counting occurrences, most frequent first. Client-side analysis over `listFlowStepErrors`. The output is `{totalErrors, analyzed, patterns}`, each pattern `{message, code, count, sampleId, classifications, withRetryAt}`; since celigo-cli 2026.10.1, `sampleId` is one matching error's `errorId`.

Since celigo-cli 2026.11.1, each pattern also counts its errors two ways. Earlier releases kept only the code, message, count, and sample id.

* `classifications` — a count per `classification` value, such as `{"intermittent": 3, "connection": 1}`. Identical messages can classify differently, and errors the platform left unclassified are not counted here.
* `withRetryAt` — how many of the pattern's errors carry `retryAt`, which the platform sets while it retries an intermittent error on its own.

**Signature**

```bash
celigo flows error-analysis <id> <exportOrImportId> [flags]
```

**Arguments**

| Argument             | Type   | Required | Description                          |
| -------------------- | ------ | -------- | ------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                             |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow. |

**Flags**

| Flag          | Type    | Default | Description                                                                                                                   |
| ------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `--limit <n>` | integer | `100`   | Max errors to analyze. Since celigo-cli 2026.10.1, a value that is not a positive whole number is refused before any request. |

**Example**

```bash
celigo flows error-analysis 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --limit 500
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/errors`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowStepErrors`)

***

## `celigo flows add-processor`

Add a page processor to a flow (auto-detects whether the ID is an export or import). For router-based flows, `--router` and optionally `--branch` are required. Since celigo-cli 2026.10.1, a `--branch` name that two branches of the router share is refused — rename one so the name picks a single branch — and a failure to look the step up (a `401`, a `403`, the network) is reported as such instead of calling the id invalid, with nothing written.

> **Instance flows are refused.** All four structural commands (`add-processor`, `remove-processor`, `add-generator`, `remove-generator`) reject an instance-flow target up front, before the confirmation prompt and the PUT: an instance inherits its whole graph from its abstract flow, and the server rejects structural fields on an instance write (`422 flow_instance_invalid_fields`). The error names the abstract flow to edit instead — structural changes there propagate to every instance automatically; per-instance customization goes through `overrides`.

Since celigo-cli 2026.10.2, all four structural commands also refuse a flow with a router whose `script` is `null`, before the confirmation prompt and the PUT: each sends back the copy it read, which would store the value again. The refusal names the `set` to run first (see the router warning at the top of this page):

```
Refusing to update flow <id>: routers[0].script (router '<routerId>') is null — the platform stores it, but Flow Builder crashes opening that router. This command sends back the copy it read, so remove it first: celigo flows set <id> 'routers[0].script=null'
```

**Signature**

```bash
celigo flows add-processor <id> <exportOrImportId> [flags]
```

**Arguments**

| Argument             | Type   | Required | Description                                |
| -------------------- | ------ | -------- | ------------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                                   |
| `<exportOrImportId>` | string | Yes      | Export or import ID to add as a processor. |

**Flags**

| Flag                    | Type    | Default | Description                                                |
| ----------------------- | ------- | ------- | ---------------------------------------------------------- |
| `--router <routerId>`   | string  | —       | Target a specific router. Required for router-based flows. |
| `--branch <branchName>` | string  | —       | Target a specific branch within the router.                |
| `-y, --yes`             | boolean | `false` | Skip confirmation.                                         |

**Example**

```bash
celigo flows add-processor 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id) (operationId: `getFlowById`) → [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows remove-processor`

Remove a page processor from a flow by its export or import ID. In a router-based flow the step is found in whichever branch holds it. Since celigo-cli 2026.10.1, a step held by more than one branch is refused until `--router` and `--branch` say which (it used to be removed from the first branch holding it); `--branch <name>` alone removes it from the branch of that name that holds it, `--router <routerId>` alone from that router's branch that holds it, and a router with no branches is named as such.

**Signature**

```bash
celigo flows remove-processor <id> <exportOrImportId> [flags]
```

**Arguments**

| Argument             | Type   | Required | Description                                     |
| -------------------- | ------ | -------- | ----------------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                        |
| `<exportOrImportId>` | string | Yes      | Export or import ID of the processor to remove. |

**Flags**

| Flag                    | Type    | Default | Description                                                                  |
| ----------------------- | ------- | ------- | ---------------------------------------------------------------------------- |
| `--router <routerId>`   | string  | —       | Look for the step in this router's branches only.                            |
| `--branch <branchName>` | string  | —       | Remove the step from the branch of this name (within `--router` when given). |
| `-y, --yes`             | boolean | `false` | Skip confirmation.                                                           |

**Example**

```bash
celigo flows remove-processor 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y

# The same import sits in two branches: say which one
celigo flows remove-processor 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --router aB3dE5fG7hJ --branch "Log errors" -y
```

**Corresponds to**: [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id) (operationId: `getFlowById`) → [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows add-generator`

Add a page generator (export) to a flow. Appends to the end of `pageGenerators` by default; `--index` inserts at a specific 0-based position. `--schedule` sets a per-generator cron override.

**Signature**

```bash
celigo flows add-generator <id> <exportId> [flags]
```

**Arguments**

| Argument     | Type   | Required | Description                      |
| ------------ | ------ | -------- | -------------------------------- |
| `<id>`       | string | Yes      | Flow ID.                         |
| `<exportId>` | string | Yes      | Export ID to add as a generator. |

**Flags**

| Flag                 | Type         | Default | Description                                                                                                                                                                                   |
| -------------------- | ------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--index <position>` | integer      | append  | 0-based insert position, from `0` to the number of generators. Since celigo-cli 2026.10.1, anything but a whole number in that range (`1abc`, `1.9`) is refused instead of being read as one. |
| `--schedule <cron>`  | 6-field cron | —       | Per-generator schedule override. Since celigo-cli 2026.11.2, a blank value (an unset shell variable) is refused; it used to add the generator with no schedule.                               |
| `-y, --yes`          | boolean      | `false` | Skip confirmation.                                                                                                                                                                            |

**Example**

```bash
celigo flows add-generator 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --schedule '? */5 * * * *' -y
```

**Corresponds to**: [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id) (operationId: `getFlowById`) → [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows remove-generator`

Remove a page generator from a flow by export ID.

**Signature**

```bash
celigo flows remove-generator <id> <exportId> [flags]
```

**Arguments**

| Argument     | Type   | Required | Description                           |
| ------------ | ------ | -------- | ------------------------------------- |
| `<id>`       | string | Yes      | Flow ID.                              |
| `<exportId>` | string | Yes      | Export ID of the generator to remove. |

**Flags**

| Flag        | Type    | Default | Description        |
| ----------- | ------- | ------- | ------------------ |
| `-y, --yes` | boolean | `false` | Skip confirmation. |

**Example**

```bash
celigo flows remove-generator 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`GET /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id) (operationId: `getFlowById`) → [`PUT /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id) (operationId: `updateFlow`)

***

## `celigo flows replace-connection`

Swap a connection across every export and import in a flow.

Since celigo-cli 2026.10.1, the CLI first reads the flow's steps (`GET /v1/flows/{_id}/descendants`) and refuses an old connection that no export or import of the flow uses: the platform answers success without replacing anything. A flow that runs a tool is not checked, because a tool's own steps are not part of that answer.

**Signature**

```bash
celigo flows replace-connection <id> <oldConnectionId> <newConnectionId>
```

**Arguments**

| Argument            | Type   | Required | Description                                             |
| ------------------- | ------ | -------- | ------------------------------------------------------- |
| `<id>`              | string | Yes      | Flow ID.                                                |
| `<oldConnectionId>` | string | Yes      | Connection ID currently referenced by the flow's steps. |
| `<newConnectionId>` | string | Yes      | Connection ID to swap in.                               |

**Example**

```bash
celigo flows replace-connection 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f 7b2c3d4e5f6a7b8c9d0e1f2a
```

**Corresponds to**: [`PUT /v1/flows/{_id}/replaceConnection`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-_id-replaceconnection)

***

## `celigo flows set-group`

Assign one or more flows to a flow group (a section defined on the integration via [`integrations create-flow-group`](https://developer.celigo.com/cli/commands/integrations.md#celigo-integrations-create-flow-group)). Group *membership* is a property of the flows, not the integration — which is why this lives under `flows`. Since celigo-cli 2026.10.1, each flow id is read first and an id that names no flow is refused before anything is sent: the platform skips an unknown id and answers success anyway.

**Signature**

```bash
celigo flows set-group <flowGroupingId> <flowIds...>
```

**Arguments**

| Argument           | Type              | Required | Description                                                                                                                |
| ------------------ | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `<flowGroupingId>` | string            | Yes      | Flow group ID (must be non-empty). To remove flows from their group, use [`flows unset-group`](#celigo-flows-unset-group). |
| `<flowIds...>`     | string (variadic) | Yes      | One or more flow IDs to set.                                                                                               |

**Flags**

*None beyond* [*global flags*](https://developer.celigo.com/cli/getting-started/global-flags.md)*.*

**Example**

```bash
celigo flows set-group grp123 flow1 flow2
```

**Corresponds to**: [`PUT /v1/flows/updateFlowGrouping`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-updateflowgrouping)

***

## `celigo flows unset-group`

Remove one or more flows from their flow group, leaving them ungrouped. (Calls the same endpoint as `set-group` with `_flowGroupingId: null`.) Since celigo-cli 2026.10.1, an id that names no flow is refused before anything is sent, as `set-group` refuses one.

**Signature**

```bash
celigo flows unset-group <flowIds...>
```

**Arguments**

| Argument       | Type              | Required | Description                                      |
| -------------- | ----------------- | -------- | ------------------------------------------------ |
| `<flowIds...>` | string (variadic) | Yes      | One or more flow IDs to remove from their group. |

**Example**

```bash
celigo flows unset-group flow1 flow2
```

**Corresponds to**: [`PUT /v1/flows/updateFlowGrouping`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#put-v1-flows-updateflowgrouping) (`_flowGroupingId: null`)

***

## `celigo flows debug-requests`

List debug HTTP request log entries for an export or import step. Requires `debugUntil` to be set on the export or import (run `celigo exports enable-debug` / `celigo imports enable-debug` first).

The window defaults to the last 60 minutes (`--since`). Since celigo-cli 2026.10.1, `--time-gt` and `--time-lte` set it in epoch milliseconds instead — `--since` and `--time-gt` both set the lower bound, so the two together are refused — and `--format table` lists one request per row: `key` (printed whole, for `debug-request-detail`), `time`, `method`, `statusCode`, `stage`. Each page moves `time_lte` back 10 minutes; while more of the window remains, the table names on stderr the `--time-gt` / `--time-lte` values that read the next page:

```
Note: more of the window remains; for the next page, repeat the command with --time-gt 1790000000000 --time-lte 1790002400000.
```

JSON output is the API's envelope (`requests`, `nextPageURL`), as before.

**Signature**

```bash
celigo flows debug-requests <id> <exportOrImportId> [flags]
```

**Arguments**

| Argument             | Type   | Required | Description                          |
| -------------------- | ------ | -------- | ------------------------------------ |
| `<id>`               | string | Yes      | Flow ID.                             |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow. |

**Flags**

| Flag                | Type               | Default | Description                                                                                                                |
| ------------------- | ------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| `--since <minutes>` | integer            | `60`    | Show requests from the last N minutes. Since celigo-cli 2026.10.1, a value that is not a positive whole number is refused. |
| `--time-gt <ms>`    | epoch milliseconds | —       | Lower bound of the window (exclusive), in place of `--since`. Added in celigo-cli 2026.10.1.                               |
| `--time-lte <ms>`   | epoch milliseconds | —       | Upper bound of the window (inclusive). Added in celigo-cli 2026.10.1.                                                      |

**Example**

```bash
celigo flows debug-requests 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --since 30

# One request per row; stderr names the next page's window
celigo flows debug-requests 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --format table

# The next page, with the values the note named
celigo flows debug-requests 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --format table \
  --time-gt 1790000000000 --time-lte 1790002400000
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/requests?time_gt=<ms>`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (and `time_lte=<ms>` with `--time-lte`)

***

## `celigo flows debug-request-detail`

Full request/response payload for one debug log entry.

**Signature**

```bash
celigo flows debug-request-detail <id> <exportOrImportId> <key>
```

**Arguments**

| Argument             | Type   | Required | Description                              |
| -------------------- | ------ | -------- | ---------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                 |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow.     |
| `<key>`              | string | Yes      | Request key from `flows debug-requests`. |

**Example**

```bash
celigo flows debug-request-detail 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f abcd1234
```

**Corresponds to**: [`GET /v1/flows/{_id}/{_exportOrImportId}/requests/{key}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `getFlowStepRequestDetail`)

***

## `celigo flows delete-debug-requests`

Delete stored HTTP request/response traces for a flow step. Pass `reqAndResKeys` (comma-separated) to delete specific traces, or omit them to clear every trace referenced by the step's current errors. The error records themselves remain (their `reqAndResKey` pointers dangle). Prompts for confirmation unless `-y`.

> ⚠️ **Deleting request traces is permanent.** The stored request/response captures are removed and cannot be recovered; the error records keep dangling `reqAndResKey` pointers.

**Signature**

```bash
celigo flows delete-debug-requests <id> <exportOrImportId> [reqAndResKeys] [-y]
```

**Arguments**

| Argument             | Type   | Required | Description                                                                                  |
| -------------------- | ------ | -------- | -------------------------------------------------------------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                                                                     |
| `<exportOrImportId>` | string | Yes      | Export or import ID within the flow.                                                         |
| `[reqAndResKeys]`    | string | No       | Comma-separated `reqAndResKey` values. Omit to clear all of the step's current error traces. |

**Flags**

| Flag        | Type    | Default | Description                   |
| ----------- | ------- | ------- | ----------------------------- |
| `-y, --yes` | boolean | `false` | Skip the confirmation prompt. |

**Example**

```bash
celigo flows delete-debug-requests 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f -y
```

**Corresponds to**: [`DELETE /v1/flows/{_id}/{_stepId}/requests`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `deleteFlowStepRequests`) — body `{ "keys": [...] }`; the CLI enumerates the step's error traces when keys are omitted.

***

## `celigo flows test-run`

Start a test run and return stage-by-stage results. `--export` (a page generator export ID) is required; since celigo-cli 2026.10.1 a missing `--export` is refused before anything is sent, and since celigo-cli 2026.11.2 so is a blank one. The flow may be enabled or disabled. The output carries the metadata (stages per step), `flowJob`, and `childJobs`. Requires `operate` mode.

The reply holds counts only. A failed run's errors, each with its `code`, `message`, and `classification`, are in the step's results: read them with [`test-run-step-results <id> <flowJob._id> <childJobs[]._expOrImpId>`](#celigo-flows-test-run-step-results). Since celigo-cli 2026.11.2, after a run with an error, a note on stderr names that command for each failed step that recorded a stage:

```
Note: the test run failed with 1 error. This reply holds only the counts; each step's errors (code, message, classification) are in its step results: celigo flows test-run-step-results 5f83a9b2c7d3e8f1a2b3c4d5 7b2c3d4e5f6a7b8c9d0e1f2a 6a1b2c3d4e5f6a7b8c9d0e1f.
```

A failed step that the metadata lists no stage for has no results to read: its step results answer `404`. For such a step the note names no step-results command. It says to find the step's connection with `celigo exports get <stepId>` or `celigo imports get <stepId>`, and to check it with [`connections ping`](https://developer.celigo.com/cli/commands/connections.md#celigo-connections-ping-less-than-id-greater-than). A run that comes back `canceled` with no error gets a note that says so. The platform ends a flow's test run that is still going at about 270 seconds, and returns it canceled.

A test run saves each lookup step's response on its export as `mockOutput`, and later test runs answer that lookup from it, whatever their input. A stale lookup result comes from the export: remove the export's `mockOutput` to test against the live system again. A source export with a saved `mockOutput` is replayed too. An HTTP source is replayed even on a connection whose credentials do not work. A Salesforce source on a connection that nobody has authorized is not: its step fails before the mock is read.

**Signature**

```bash
celigo flows test-run <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                  | Type   | Default | Description                               |
| --------------------- | ------ | ------- | ----------------------------------------- |
| `--export <exportId>` | string | —       | **Required.** Export ID (page generator). |

**Example**

```bash
celigo flows test-run 5f83a9b2c7d3e8f1a2b3c4d5 --export 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`POST /v1/flows/{_id}/test/run`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows)

***

## `celigo flows test-run-step-results`

Get stage-by-stage results for one step in a test run. Base64-encoded responses are auto-decoded.

**Signature**

```bash
celigo flows test-run-step-results <id> <runId> <exportOrImportId>
```

**Arguments**

| Argument             | Type   | Required | Description                             |
| -------------------- | ------ | -------- | --------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                |
| `<runId>`            | string | Yes      | Test run ID (from `test-run` response). |
| `<exportOrImportId>` | string | Yes      | Step ID (from test-run metadata).       |

**Example**

```bash
celigo flows test-run-step-results 5f83a9b2c7d3e8f1a2b3c4d5 run_abc123 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`GET /v1/flows/{_id}/test/run/{runId}/{_stepId}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows)

***

## `celigo flows test-run-step-logs`

HTTP request/response logs for a test-run step. Only steps that issued outbound HTTP calls (exports, imports, lookups) produce logs — others return `404 Not Found`. Since celigo-cli 2026.10.1, that answer is explained: `No request/response logs for step <stepId> in run <runId>. Logs are only recorded for steps that issued outbound HTTP calls. Check the test-run metadata for a step with a 'lookup' or 'request' stage.`

**Signature**

```bash
celigo flows test-run-step-logs <id> <runId> <exportOrImportId>
```

**Arguments**

| Argument             | Type   | Required | Description                             |
| -------------------- | ------ | -------- | --------------------------------------- |
| `<id>`               | string | Yes      | Flow ID.                                |
| `<runId>`            | string | Yes      | Test run ID (from `test-run` response). |
| `<exportOrImportId>` | string | Yes      | Step ID (from test-run metadata).       |

**Example**

```bash
celigo flows test-run-step-logs 5f83a9b2c7d3e8f1a2b3c4d5 run_abc123 6a1b2c3d4e5f6a7b8c9d0e1f
```

**Corresponds to**: [`GET /v1/flows/{_id}/test/run/{runId}/{_stepId}/logs/requestAndResponse`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id-test-run-runid-_stepid-logs-requestandresponse) (operationId: `getFlowTestRunStepLogs`)

***

## `celigo flows enable-execution-logs`

Arm debug execution logging on a flow. Sets `logging.debugUntil` via JSON-patch. Subsequent runs capture detailed per-stage logs viewable via `execution-logs`, `query-execution-logs`, and `execution-log-detail`.

The window stops at 60 minutes, whatever `--duration` asks for. For a longer window, for example to catch a nightly run, set the end time on the flow with `celigo flows set <flowId> logging.debugUntil=<ISO time>`. The platform takes a time up to the plan's `logging.maxDebugDuration` minutes ahead (see [`subscriptions licenses`](https://developer.celigo.com/cli/commands/subscriptions.md#celigo-subscriptions-licenses)) and refuses a later one with `422`.

**Signature**

```bash
celigo flows enable-execution-logs <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                   | Type           | Default | Description                                                                                                                                                                                                    |
| ---------------------- | -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--duration <minutes>` | integer (1–60) | `60`    | Debug window length in minutes. A longer value sets a 60-minute window. Since celigo-cli 2026.10.1, a value that is not a positive whole number is refused instead of setting a window that has already ended. |

**Example**

```bash
celigo flows enable-execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 --duration 30

# Longer than 60 minutes: set the end time, up to the plan's logging.maxDebugDuration
celigo flows set 5f83a9b2c7d3e8f1a2b3c4d5 logging.debugUntil=2026-10-28T06:00:00Z
```

**Corresponds to**: [`PATCH /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#patch-v1-flows-_id) with `[{op:"replace", path:"/logging/debugUntil", value:<iso>}]`

***

## `celigo flows disable-execution-logs`

Disarm debug execution logging on a flow (removes `logging.debugUntil`).

**Signature**

```bash
celigo flows disable-execution-logs <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Example**

```bash
celigo flows disable-execution-logs 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`PATCH /v1/flows/{_id}`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#patch-v1-flows-_id) with `[{op:"remove", path:"/logging/debugUntil"}]`

***

## `celigo flows execution-logs`

List execution log entries for a flow run. Each entry has `recordId`, `groupId`, `traceKey`, and `_expOrImpId` — feed these to `query-execution-logs` and `execution-log-detail` to drill into per-step traces.

`--status` and `--trace-key-prefix` filter on the server. `--status error` lists the records that failed at a step, and `--status ignore` lists the ones that a filter, a router branch, or an import's ignore-existing or ignore-missing rule skipped. A `--status` other than `success`, `error`, or `ignore`, or a blank `--trace-key-prefix`, is refused before the request.

The command returns one page: the newest entries first, 1000 at most. `nextPageUrl` in the answer says when more exist. Since celigo-cli 2026.11.2, `--page-size` and `--sort-order` shape the page, and `--export-or-import-id` keeps the entries that the steps you name produced. A list that names no step, a page size outside 1 to 1000, or a sort order other than `asc` or `desc` is refused before the request.

A Tool step (a `ToolImport`) gets one entry per record for its whole tool chain. The entry carries `_toolImportId` and the chain's rolled-up status. The steps inside the tool, nested tools included, get no entries of their own. To list them, pass the entry's `_toolImportId` to [`query-execution-logs --tool-import-id`](#celigo-flows-query-execution-logs).

**Signature**

```bash
celigo flows execution-logs <id> <jobId> [--status <status>] [--trace-key-prefix <prefix>] [--export-or-import-id <ids>] [--page-size <n>] [--sort-order <dir>]
```

**Arguments**

| Argument  | Type   | Required | Description                                                       |
| --------- | ------ | -------- | ----------------------------------------------------------------- |
| `<id>`    | string | Yes      | Flow ID.                                                          |
| `<jobId>` | string | Yes      | Job ID of the flow run, from `jobs list --type flow --flow <id>`. |

**Flags**

| Flag                          | Type                             | Default | Description                                                                                                                                                                                                    |
| ----------------------------- | -------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--status <status>`           | `success` \| `error` \| `ignore` | —       | Only entries with this record outcome at a step. Sent as `status`. Added in celigo-cli 2026.10.2.                                                                                                              |
| `--trace-key-prefix <prefix>` | string                           | —       | Only entries whose `traceKey` starts with this prefix. Sent as `traceKeyPrefix`. Added in celigo-cli 2026.10.2.                                                                                                |
| `--export-or-import-id <ids>` | string (csv)                     | —       | Only entries that these steps produced: comma-separated export or import IDs. A Tool step's ID lists its chain entries; a step inside the tool has none. Sent as `_expOrImpId`. Added in celigo-cli 2026.11.2. |
| `--page-size <n>`             | integer (1–1000)                 | —       | Entries per page. Sent as `pageSize`. Added in celigo-cli 2026.11.2.                                                                                                                                           |
| `--sort-order <dir>`          | `asc` \| `desc`                  | `desc`  | Sort by start time: `desc` is newest first. Sent as `sortOrder`. Added in celigo-cli 2026.11.2.                                                                                                                |

**Example**

```bash
celigo flows execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f

# Only the records that failed at a step
celigo flows execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f --status error

# The entries one step produced, oldest first
celigo flows execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f \
  --export-or-import-id 7b2c3d4e5f6a7b8c9d0e1f2a --sort-order asc
```

**Corresponds to**: [`GET /v1/flows/{_id}/jobs/{jobId}/logs`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowExecutionLogs`), with `status`, `traceKeyPrefix`, `_expOrImpId`, `pageSize`, and `sortOrder` as query parameters.

***

## `celigo flows query-execution-logs`

Search execution log metadata for a step. Pass `--trace-key` to widen results to every step sharing that trace (both the export side and the import side).

Since celigo-cli 2026.11.2, `--tool-import-id` traces a Tool step's chain. Pass the `_toolImportId` of the step's `execution-logs` entry. The answer lists the chain's steps, a nested tool's included, each with the `groupId` that [`execution-log-detail`](#celigo-flows-execution-log-detail) reads its stages by. `--group-id` is not needed with it; with `--group-id` alone, the answer is the Tool step by itself. With neither flag, the command is refused before the request.

**Signature**

```bash
celigo flows query-execution-logs <id> <jobId> --export-or-import-id <id> --record-id <id> [--group-id <id>] [--tool-import-id <id>] [--trace-key <key>]
```

**Arguments**

| Argument  | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `<id>`    | string | Yes      | Flow ID.    |
| `<jobId>` | string | Yes      | Job ID.     |

**Flags**

| Flag                         | Type   | Default | Description                                                                                                                           |
| ---------------------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `--export-or-import-id <id>` | string | —       | **Required.** Export or import ID.                                                                                                    |
| `--group-id <id>`            | string | —       | Group ID from `execution-logs`. Required unless `--tool-import-id` is given.                                                          |
| `--record-id <id>`           | string | —       | **Required.** Record ID from `execution-logs`.                                                                                        |
| `--trace-key <key>`          | string | —       | Trace key — enables traceView across paired steps.                                                                                    |
| `--tool-import-id <id>`      | string | —       | Trace a Tool step's chain: the `_toolImportId` of its `execution-logs` entry. Sent as `_toolImportId`. Added in celigo-cli 2026.11.2. |

**Example**

```bash
celigo flows query-execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f \
  --export-or-import-id 7b2c3d4e5f6a7b8c9d0e1f2a \
  --group-id g_abc --record-id r_xyz

# Trace a Tool step's chain: every step inside the tool, each with its groupId
celigo flows query-execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f \
  --export-or-import-id 7b2c3d4e5f6a7b8c9d0e1f2a \
  --tool-import-id 7b2c3d4e5f6a7b8c9d0e1f2a --record-id r_xyz
```

**Corresponds to**: [`POST /v1/flows/{_id}/jobs/{jobId}/logs/metadata/query`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `queryFlowExecutionLogMetadata`)

***

## `celigo flows execution-log-detail`

Get per-stage execution log data for a step in a flow run. Take `groupId`, `recordId`, and `_expOrImpId` from `execution-logs`, then name one stage with `--stage`:

* `apiCall` holds the decoded HTTP request and response of an `HTTPExport` or `HTTPImport` step.
* `mapping` holds an import's per-record mapping input and output.
* `transformation` (not `transform`) holds an export's transform.
* `outputFilter` holds an export's output filter, and `inputFilter` (not `filter`) holds an import's filter. In either filter stage, a record the filter dropped reads `success: false`.
* `responseMapping` holds an import's response mapping.
* A script hook records under its hook type plus `Hook`, whatever its function is called: `preSavePageHook`, `preMapHook`, `postMapHook`, `postSubmitHook`, or `postResponseMapHook`. On a run logged at debug level (see [`enable-execution-logs`](#celigo-flows-enable-execution-logs)), the stage holds the hook's input and its return value. The input is the hook's `options` object, with the records under `data`. Neither the bare hook name, such as `preMap`, nor `<functionName>Hook` returns this data. A `postMap` hook records only when the import has mappings.
* `tool` holds the record's input to and output from a whole tool, for a Tool step. The payloads can arrive a minute after the entry itself.

An unknown stage name returns an empty result, not an error. An empty answer can also mean a misspelled stage.

Since celigo-cli 2026.11.2, `--stage tool` needs no `--group-id`; every other stage still needs one. On the outermost Tool step of a chain, add `--tool-import-id` with the same ID as `--export-or-import-id`, so the answer carries the chain's errors: without it, `errors` is empty. Leave it out for a tool nested inside another. The combinations that the API answers `400` for are refused before the request: another stage without `--group-id`, `--tool-import-id` with another stage, and a `--tool-import-id` that differs from `--export-or-import-id`.

**Signature**

```bash
celigo flows execution-log-detail <id> <jobId> --export-or-import-id <id> --stage <stage> --record-id <id> [--group-id <id>] [--tool-import-id <id>]
```

**Arguments**

| Argument  | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `<id>`    | string | Yes      | Flow ID.    |
| `<jobId>` | string | Yes      | Job ID.     |

**Flags**

| Flag                         | Type   | Default | Description                                                                                                                                                      |
| ---------------------------- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--export-or-import-id <id>` | string | —       | **Required.** Export or import ID.                                                                                                                               |
| `--stage <stage>`            | string | —       | **Required.** Execution stage, for example `apiCall`, `mapping`, `tool`, or `<hookType>Hook` such as `preMapHook`. An unknown name returns an empty result.      |
| `--group-id <id>`            | string | —       | Group ID from `execution-logs`. Required for every stage but `tool`.                                                                                             |
| `--record-id <id>`           | string | —       | **Required.** Record ID from `execution-logs`.                                                                                                                   |
| `--tool-import-id <id>`      | string | —       | With `--stage tool` on the outermost Tool step: the step's ID again, so the chain's errors are returned. Sent as `_toolImportId`. Added in celigo-cli 2026.11.2. |

**Example**

```bash
celigo flows execution-log-detail 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f \
  --export-or-import-id 7b2c3d4e5f6a7b8c9d0e1f2a \
  --stage apiCall --group-id g_abc --record-id r_xyz

# A Tool step's input and output for one record, with the chain's errors
celigo flows execution-log-detail 5f83a9b2c7d3e8f1a2b3c4d5 6a1b2c3d4e5f6a7b8c9d0e1f \
  --export-or-import-id 7b2c3d4e5f6a7b8c9d0e1f2a --tool-import-id 7b2c3d4e5f6a7b8c9d0e1f2a \
  --stage tool --record-id r_xyz
```

**Corresponds to**: [`POST /v1/flows/{_id}/jobs/{jobId}/logs/data/query`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `queryFlowExecutionLogData`)

***

## `celigo flows last-export-date`

Get the flow-level delta checkpoint, the most recent export timestamp across all generators in the flow.

**Signature**

```bash
celigo flows last-export-date <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Example**

```bash
celigo flows last-export-date 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`GET /v1/flows/{_id}/lastExportDateTime`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows#get-v1-flows-_id-lastexportdatetime) (operationId: `getFlowLastExportDateTime`)

***

## `celigo flows run-stats`

Runtime statistics for one flow's completed runs — the data behind the threshold chart of a proactive [alert](https://developer.celigo.com/cli/commands/alerts.md). The answer carries `totalRuns`, `totalAlertsTriggered` (the runs longer than the threshold), `statistics.suggestedThreshold` (the p99 runtime rounded up, at least 5 minutes), and `chartEntries`: hourly buckets for a window up to 24 hours, daily buckets for a longer one, each with the average, p5, and p95 runtime. Use it to choose a runtime threshold for an alert on the flow; for statistics across flows, see [`jobs run-stats`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-run-stats). Added in celigo-cli 2026.10.1.

The window spans 1 hour to 90 days and may not reach into the future. It defaults to the 30 days before `--end-time`, which defaults to now. `--threshold` counts the runs longer than the minutes you give instead of the suggested threshold. Two answers carry no chart, and a stderr line says what each means:

* `{emptyState: true}` — fewer than 3 completed runs in the window: `Fewer than 3 completed runs in this window; widen it with --start-time.`
* `{clickhouseAvailable: false}` — the account has no run statistics: `Run statistics are not available to this account.`

Since celigo-cli 2026.11.2, `--start-time` and `--end-time` take a full calendar date (`YYYY-MM-DD`) or a timestamp, on a day the calendar has, with the zone as `Z` or an offset such as `+02:00`. A date alone is read as UTC midnight, and a time with no zone in the machine's time zone. Anything else is refused before any request: a bare number, a month name, a date with slashes, a year or a month alone, and a day that does not exist such as `2026-02-30`, which earlier releases read as another date. A blank value (an unset shell variable) is refused too; it used to total the default window.

The request is a POST that only reads, so `run-stats` works in every [permission mode](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes), `read` included.

**Signature**

```bash
celigo flows run-stats <id> [--start-time <iso>] [--end-time <iso>] [--threshold <minutes>]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                    | Type     | Default                 | Description                                                                    |
| ----------------------- | -------- | ----------------------- | ------------------------------------------------------------------------------ |
| `--start-time <iso>`    | ISO 8601 | 30 days before the end  | Window start.                                                                  |
| `--end-time <iso>`      | ISO 8601 | now                     | Window end.                                                                    |
| `--threshold <minutes>` | integer  | the suggested threshold | Count the runs longer than this many minutes — a whole number from 5 to 59940. |

**Example**

```bash
# The last 30 days, in daily buckets
celigo flows run-stats 5f83a9b2c7d3e8f1a2b3c4d5

# One day in hourly buckets, counting the runs longer than 15 minutes
celigo flows run-stats 5f83a9b2c7d3e8f1a2b3c4d5 \
  --start-time 2026-10-16T00:00:00Z --end-time 2026-10-17T00:00:00Z --threshold 15

# Only the suggested threshold
celigo flows run-stats 5f83a9b2c7d3e8f1a2b3c4d5 --jq '.statistics.suggestedThreshold'
```

**Corresponds to**: [`POST /v1/flows/{_id}/runs/stats`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) — body `{"type": "runtimeSummary", "startTime", "endTime", "thresholdMinutes"}`; `endTime` and `thresholdMinutes` only when their flags are given.

***

## `celigo flows dependencies`

List resources that depend on this flow (alias: `used-by`). Use it to check whether a flow is safe to delete; an empty result means nothing references it. Since celigo-cli 2026.10.1, an id that matches no flow is reported as not found instead of as having no dependents.

**Signature**

```bash
celigo flows dependencies <id>
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Example**

```bash
celigo flows dependencies 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`GET /v1/flows/{_id}/dependencies`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `listFlowDependencies`)

***

## `celigo flows delete-execution-logs`

Delete a flow's execution logs within a time range. `--started-gte` and `--started-lte` are required ISO 8601 timestamps, and `--started-gte` must be before `--started-lte`. The command prompts for confirmation unless you pass `-y`. Since celigo-cli 2026.10.1, the window is checked before the prompt: a value that is not an ISO 8601 timestamp, or a `--started-gte` that is not before `--started-lte`, is refused before anything is asked or sent.

Since celigo-cli 2026.11.2, each bound is a full calendar date (`YYYY-MM-DD`) or a timestamp, on a day the calendar has, read as [`run-stats`](#celigo-flows-run-stats) reads its window. A bare number, a month name, a date with slashes, and a day that does not exist such as `2026-02-30` are refused; earlier releases read each as some other date and deleted from it. The prompt shows the window as it will be sent, in UTC. With `-y`, one stderr line names the window before the request:

```
Deleting logs for flow 5f83a9b2c7d3e8f1a2b3c4d5 from 2026-06-01T00:00:00.000Z to 2026-06-02T00:00:00.000Z (UTC).
```

> **These flags were renamed in celigo-cli 2026.8.1.** They were `--started-at` and `--end-at`. The new names match the `--*-gte` / `--*-lte` pattern used for every date bound in the CLI.

> ⚠️ **Deleting execution logs is permanent.** Logs in the given time range are removed and cannot be recovered.

**Signature**

```bash
celigo flows delete-execution-logs <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                  | Type     | Default | Description                                                                                            |
| --------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------ |
| `--started-gte <iso>` | ISO 8601 | —       | **Required.** Delete logs with `startedAt` at or after this timestamp.                                 |
| `--started-lte <iso>` | ISO 8601 | —       | **Required.** Delete logs with `startedAt` at or before this timestamp. Must be after `--started-gte`. |
| `-y, --yes`           | boolean  | `false` | Skip confirmation.                                                                                     |

**Example**

```bash
celigo flows delete-execution-logs 5f83a9b2c7d3e8f1a2b3c4d5 \
  --started-gte 2026-06-01T00:00:00Z --started-lte 2026-06-02T00:00:00Z -y
```

**Corresponds to**: [`DELETE /v1/flows/{_id}/logs`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `deleteFlowLogs`)

***

## `celigo flows cancel-jobs`

Cancel a flow's jobs. Optionally scope the cancellation with a JSON body (piped via stdin, or `--file`). Prompts for confirmation unless `-y`. Since celigo-cli 2026.10.1, a body piped on stdin is read — before the prompt — where earlier releases read only `--file`; a piped body must start arriving within one second, and `--file -` waits for a slower producer.

> ⚠️ **Canceling a flow's jobs is irreversible.** In-progress and queued jobs are stopped and cannot be resumed. Records already processed are not rolled back.

**Signature**

```bash
celigo flows cancel-jobs <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `<id>`   | string | Yes      | Flow ID.    |

**Flags**

| Flag                | Type    | Default | Description                         |
| ------------------- | ------- | ------- | ----------------------------------- |
| `-y, --yes`         | boolean | `false` | Skip confirmation.                  |
| `-f, --file <path>` | string  | stdin   | JSON body file (or pipe via stdin). |

**Example**

```bash
celigo flows cancel-jobs 5f83a9b2c7d3e8f1a2b3c4d5 -y
```

**Corresponds to**: [`POST /v1/flows/{_id}/jobs/cancel`](https://developer.celigo.com/api/api-reference/integrations-and-flows/flows) (operationId: `cancelFlowJobs`)

## Gotchas

* **Create flows with `disabled: true`.** Enable only after mappings and connections are verified — an enabled flow with a schedule runs immediately. `test-run` works on an enabled or a disabled flow.
* **`responseMapping` lives on the flow**, under the `pageProcessors[]` entry — not on the import. Its `fields`/`lists` are **bare arrays**: the API accepts the old object-wrapper shape without an error and silently corrupts the step's mappings (see the warning at the top of this page).
* **Instance flows are structural no-go zones.** The structural commands refuse them client-side, and any other path to a structural write (e.g. a structural `flows set`) hits the server's `422 flow_instance_invalid_fields`. Edit the abstract flow instead; customize an instance only through `overrides`.
* **Plain lists exclude instance flows.** `flows list` omits instances unless you pass `--include-instances` (or `--abstract-flow-id`, which implies it). If a flow id from a job or the UI is missing from your list, it is probably an instance.
* **`schedule` is a 6-field cron** (seconds first): `"? */5 * * * *"` runs every five minutes. It is one string: assign it whole (`flows set <id> schedule='? */5 * * * *'`). Since celigo-cli 2026.10.1, a path beneath it such as `schedule.cron=…` is refused before any request.
* **Router IDs must be unique within a flow**, and `nextRouterId` must match a real router `id`.
* **A router with no script has no `script` key.** The API stores `"script": null`, but Flow Builder crashes opening that router. Since celigo-cli 2026.10.2, every write refuses it (see the warning at the top of this page). Repair a flow that holds one with `celigo flows set <id> 'routers[<n>].script=null'`.
* **`update` is a full replace** (PUT). Use `set` for field edits unless you're supplying the complete resource body.
* **`debug-requests` vs. `execution-logs` are different surfaces.** `debug-requests` reads per-export/per-import debug captures (armed by `exports enable-debug` / `imports enable-debug`). `execution-logs` reads flow-level per-record execution traces (armed by `flows enable-execution-logs`).
* **A Tool step logs one entry for its whole chain.** `execution-logs` lists one entry per record for a Tool step (a `ToolImport`), with `_toolImportId`, and none for the steps inside the tool. Since celigo-cli 2026.11.2, trace the chain with `query-execution-logs --tool-import-id`, read the tool's input and output with `execution-log-detail --stage tool`, and list the run's Tool step jobs with [`jobs list --type tool`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-list).
* **`test-run-step-logs` returns `404 Not Found` for non-HTTP steps by design.** Routers and steps that did not issue outbound HTTP traffic have no request/response logs; since celigo-cli 2026.10.1 the command says so instead of printing the bare `404`.
* **`tag-errors` uses the short `tagId` code** from `tags list` (e.g. `F3ZBQ`), not the Mongo `_id`.
* **Bulk error actions report what the API did.** Since celigo-cli 2026.9.1, `retry-errors`, `resolve-errors`, `assign-errors`, `unassign-errors`, and `delete-resolved-errors` count the records the platform actually retried, resolved, assigned, or deleted — not the keys sent. The platform answers `204 No Content` for keys that match nothing, so earlier releases printed a success count while every error stayed open. Keys that matched nothing are listed on stderr, and a run that changed nothing exits `1`. `retry-errors` takes `retryDataKey` values, not `errorId`s, and rejects an all-digit key up front. Since celigo-cli 2026.11.2, when the step's error listing stops at its pagination cap, a note on stderr says so: without ids, only the errors read were acted on, so run the command again for the rest. `error-analysis` and `delete-debug-requests` without keys print such a note too.
* **`graph` is offline.** `flows graph` reads a pulled tree (or any `flow.json` through `--file`) and calls no API; it needs no profile or token. Pull first, or the references stay unresolved.
* **`create`, `clone`, and `run` are sent once.** Since celigo-cli 2026.10.1, a timeout or a 5xx on any of them is reported and never retried, and since celigo-cli 2026.11.1 neither is a `429`, which earlier releases retried: the request may have reached the server, so check for the result — `flows list`, `jobs list` — before you run the command again.
* **A run is asynchronous.** `run` and `replay` return when the job is queued, not when it ends. Since celigo-cli 2026.11.2, `--wait` waits for the queued jobs, and [`jobs wait <jobId>`](https://developer.celigo.com/cli/commands/jobs.md#celigo-jobs-wait) waits for one job: exit `0` completed, `1` failed or canceled, `75` still in progress at the deadline. After exit `75`, run `jobs wait` again. A second `flows run` starts another run.
* **A captured request prints its credentials as `********`.** Since celigo-cli 2026.11.1, `error --request-detail`, `execution-log-detail`, `test-run`, `test-run-step-results`, `test-run-step-logs`, and `debug-request-detail` mask the value of each credential header, and a captured URL's userinfo and credential query parameters. `get` and `error --retry-data` print as stored. See [Credentials in a run's result](https://developer.celigo.com/cli/using-the-cli/output-formats.md#credentials-in-a-runs-result).
* **A `run` with `--start-time`/`--end-time` moves the flow's checkpoint.** The window's end becomes the checkpoint the next run starts from, so a backfill of a past window moves it back. A run that exports no records leaves it where it was.
* **Permission modes.** The reads — `list`, `get`, `dependencies`, `audit`, the error listings, `debug-requests`, the test-run and execution-log reads, `last-export-date`, and `run-stats` — work in `read` mode, and `graph` needs no profile at all. `run`, `replay`, `test-run`, `cancel-jobs`, the error actions (`resolve-errors`, `retry-errors`, `assign-errors`, `unassign-errors`, `delete-resolved-errors`, `update-error-data`, `tag-errors`), `delete-debug-requests`, `delete-execution-logs`, `enable-execution-logs`, `disable-execution-logs`, and `set` of `disabled`, `logging.debugUntil`, or `schedule` need `operate`. `create`, `update`, `delete`, `clone`, the processor and generator edits, `replace-connection`, `set-group`, `unset-group`, and any other `set` need `full`. Since celigo-cli 2026.10.1, `read` mode refuses the `operate` verbs before any request — `resolve-errors` with nothing open used to exit `0` — with `Command 'flows run' cannot run in read mode (it writes to the account). Current mode: read. A person raises this profile's mode to operate or full at a terminal ('celigo config set mode <mode>') to run operational actions; an agent must not raise it, or switch profiles, to get past this refusal.` See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

## Related

* [exports](https://developer.celigo.com/cli/commands/exports.md) — page generators that feed the flow.
* [imports](https://developer.celigo.com/cli/commands/imports.md) — page processors that consume flow records.
* [integrations](https://developer.celigo.com/cli/commands/integrations.md) — the container that owns flows.
* [jobs](https://developer.celigo.com/cli/commands/jobs.md) — execution history for flow runs; `jobs wait` waits for a run to finish.
* [topics](https://developer.celigo.com/cli/commands/topics.md) — the Event Streams topics whose messages `flows replay` delivers again.
* [alerts](https://developer.celigo.com/cli/commands/alerts.md) — proactive alerts on a flow's runtime; `run-stats` shows the data behind their threshold chart.
* [The local tree](https://developer.celigo.com/cli/local-tree.md) — the pulled file tree that `flows graph` renders from.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/cli/commands/flows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
