---
title: "axiom flow preview"
description: "Preview the exact value(s) a mapping produces for sample input"
category: reference
surfaces: [cli]
related: [reference/cli/axiom-flow]
last_reviewed: 2026-06-06
---

<!-- GENERATED by docs/scripts/gen-cli-reference — DO NOT EDIT.
     Source of truth: the cobra command definitions in cmd/axiom/cmd/.
     Regenerate from the repo root with: go run ./docs/scripts/gen-cli-reference -->

# axiom flow preview

Preview the exact value(s) a mapping produces for sample input

Preview a flow.yaml edge adapter or compose-consumer mapping against sample
source value(s), without a live invoke.

Runs the SAME mapping engine (PrepareAdapter/ExecuteAdapter, CEL, transforms)
the registry compiler and worker use at real dispatch time — the output is the
exact value your mapping produces, not an approximation.

Preview a plain edge's adapter (a single source, "from" node's alias, to a
"to" node's alias):

```text
axiom flow preview --edge from:to --sample source.json
```

source.json is one JSON object shaped like the "from" node's output message.

Preview a compose-consumer node's compose mapping (one or more incident
edges joined into a single input):

```text
axiom flow preview --node consumer_alias --sample sources.json
```

sources.json is a JSON object keyed by each incident edge's SOURCE node alias:

```text
{"branch_a": {...}, "branch_b": {...}}
```

--sample defaults to stdin when omitted. Requires a prior "axiom login" and a
flow.yaml whose nodes/edges resolve against the live registry (same
resolution "axiom flow compile" performs) — the flow does not need to be
compiled or saved first.

## Usage

```sh
axiom flow preview [flow.yaml] [flags]
```

## Flags

| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
| `--edge` |  | string |  | Preview a plain edge's adapter, given as "from:to" node aliases |
| `--help` | `-h` | bool |  | help for preview |
| `--json` |  | bool |  | Emit a single JSON result object |
| `--node` |  | string |  | Preview a compose-consumer node's compose mapping, given its alias |
| `--sample` |  | string |  | Path to a JSON file with sample source value(s) (defaults to stdin) |

## See also

- [axiom flow](./axiom-flow.md) — Author and compile flows (graphs of published nodes)
