> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.nora.my/llms.txt
> Use this file to discover all available pages before exploring further.

# nora flows

> Manage Flows from the terminal — list, edit, publish, roll back.

The `flows` command group is the primary handle on the Flow lifecycle. Most day-to-day CLI work runs through it. Pin an active Flow with `nora flows use <slug>` and every subsequent command defaults to that Flow.

## Commands

| Command                               | Description                                 |
| ------------------------------------- | ------------------------------------------- |
| `flows list`                          | List every Flow in the active workspace.    |
| `flows get <slug>`                    | Fetch full Flow payload.                    |
| `flows snapshot [slug]`               | Print editable blocks + edges as JSON.      |
| `flows apply <slug> <file>`           | Create/upsert a Flow from a JSON file.      |
| `flows delete <slug>`                 | Delete a Flow.                              |
| `flows use <slug>`                    | Pin the active Flow.                        |
| `flows current`                       | Print active Flow slug.                     |
| `flows publish [slug]`                | Freeze Draft into a live version.           |
| `flows rollback <slug> <seq>`         | Roll live pointer back to an older version. |
| `flows versions list [slug]`          | List versions.                              |
| `flows versions get <slug> <seq>`     | Fetch one version.                          |
| `flows versions restore <slug> <seq>` | Copy an old version into Draft.             |
| `flows settings get [slug]`           | See [Flow settings](/cli/flow-settings).    |
| `flows settings update [slug]`        | See [Flow settings](/cli/flow-settings).    |

## `flows list`

```bash theme={null}
nora flows list
```

Shows every Flow in the active workspace with slug, name, last-published version, and last-modified time.

Add `--json` for machine output — one line per Flow.

## `flows get`

```bash theme={null}
nora flows get <slug>
```

Prints the full Flow payload: blocks, wires, settings, publish state, timestamps. Always JSON.

Common uses:

* Backup a Flow before a risky change: `nora flows get support > support-backup.json`.
* Inspect a specific block: `nora flows get support | jq '.blocks[] | select(.id=="ag_1")'`.
* Compare two workspaces: `diff <(nora --workspace ws1 flows get x) <(nora --workspace ws2 flows get x)`.

## `flows snapshot`

```bash theme={null}
nora flows snapshot > my-flow.json
```

Dumps just the **editable payload** (blocks and edges — not settings, not publish state). Ideal for:

* Git-tracking your Flows outside of Nora.
* Bulk edits with `jq` or `yq`.
* Templates: snapshot one Flow, tweak the JSON, apply as a new Flow.

## `flows apply`

```bash theme={null}
nora flows apply <slug> my-flow.json
```

Upserts a Flow from a JSON file. If `<slug>` doesn't exist, it's created. On update, the JSON becomes the new Draft — publish separately.

Optional `--name "..."` sets the display name on creation.

Typical config-as-code workflow:

```bash theme={null}
# Source of truth in git
nora flows snapshot support > flows/support.json
git add flows/support.json && git commit -m "sync support flow"

# In CI on merge to main
nora flows apply support flows/support.json
nora flows publish support --note "$(git log -1 --pretty=%s)"
```

## `flows delete`

```bash theme={null}
nora flows delete <slug>
```

Deletes the Flow. Published versions remain reachable by their IDs for a grace period, but the slug is freed immediately.

Requires confirmation unless `--yes` is passed. `--yes` is for scripts — think before you type it interactively.

## `flows use` and `flows current`

```bash theme={null}
nora flows use support-agent
nora flows current  # prints "support-agent"
```

Pins a Flow per-workspace. Every command that defaults to a Flow (`agents create`, `tools list`, `flows publish`, etc.) uses the pinned slug.

Switch workspaces? The pin follows you — each workspace remembers its own pinned Flow.

Override for one command without changing the pin:

```bash theme={null}
nora --flow other-flow tools list
```

## Publish

```bash theme={null}
nora flows publish [slug] --summary "release 2026-07-31 refund cleanup"
```

Snapshots the current Draft as a new version and moves the live pointer. Only Owners and Managers can publish.

Optional flags:

* `--summary <text>` — release note (highly recommended; shown in the versions list and audit trail).
* `--author-label <text>` — displayed on the version card. Defaults to your account name.

Pre-publish server checks: no cycles, all inputs wired, no empty prompts, Draft ≠ current published (no no-op publishes).

Common CI recipe:

```bash theme={null}
nora flows apply support flows/support.json
nora flows publish support --summary "$(git log -1 --pretty=%B | head -n1)"
```

## Rollback

```bash theme={null}
nora flows versions list <slug>
nora flows rollback <slug> <seq>
```

Roll the live pointer back to an older version. Draft is not touched. Instant — it's a pointer flip, not a redeploy.

Rollback is safe: nothing is lost. You can roll forward again to the newer version anytime.

## Restore Draft from a version

```bash theme={null}
nora flows versions restore <slug> <seq>
```

Copies an old version's payload into the Draft. Production is untouched. Use this when you want to *edit* off an old version instead of shipping it as-is.

Common case: rolled back to v14 to stop the bleeding; want to fix the v16 change offline. Restore v16 to Draft on a scratch Flow, hand-edit, apply back, publish.

## Version metadata

```bash theme={null}
nora flows versions list <slug>          # summary
nora flows versions get <slug> <seq>     # full metadata (excluding payload)
```

Version history covers publishes, rollbacks, and restores. Great for reconstructing "who published what when."

Add `--json` for structured output.

## Working across workspaces

Many commands accept `--workspace` per-invocation so scripts can operate on multiple workspaces without switching:

```bash theme={null}
for ws in acme-dev acme-staging acme-prod; do
  nora --workspace $ws flows list --json | jq -r '.[].slug'
done
```

<Note>
  Empty canvases and re-publishing an identical Flow are rejected server-side. This is the same guardrail as the **Publish** button in the app.
</Note>
