---
title: "axiom instance preview"
description: "Preview the exact output a mapping produces, including not-yet-real (drafted) messages"
category: reference
surfaces: [cli]
related: [reference/cli/axiom-instance]
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 instance preview

Preview the exact output a mapping produces, including not-yet-real (drafted) messages

Preview an /adapters/preview mapping against sample source value(s), without a
live invoke — wraps POST /adapters/preview verbatim. Runs the SAME
mapping engine (PrepareAdapter/ExecuteAdapter, CEL, transforms) the registry
compiler and worker use at real dispatch time.

The request body is read from --request-file (or stdin) and forwarded
unmodified. It must match the registry's adapterPreviewRequest shape:

```text
{
  "dst_msg_name": "OrderSummary",
  "sources": [
    {"edge_id": "e1", "msg_name": "Order", "sample": {"id": 1}}
  ],
  "adapter": {"total": "$.amount"}
}
```

Any "msg_name" (dst_msg_name or a sources[] entry) may be a bare registry
message name (a JSON string, as above) OR an inline, not-yet-real draft — the
IDENTICAL {"message_name": ..., "fields": {...}} shape
"axiom instance create"'s --output-fields-file/--input-fields-file use — in
place of the string, letting you preview a mapping against a message you
haven't created yet:

```text
{"dst_msg_name": {"message_name": "OrderSummary", "fields": {"total": "double"}}, ...}
```

Exactly one of "adapter" (single-edge DSL) or "compose_mapping"
(edge_adapters + compose_plan, for a multi-source compose consumer) is
required.

```text
axiom instance preview --request-file ./preview-request.json
axiom instance preview --json   # machine-readable output, reads stdin
```

Requires a prior "axiom login".

## Usage

```sh
axiom instance preview [flags]
```

## Flags

| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
| `--help` | `-h` | bool |  | help for preview |
| `--json` |  | bool |  | Emit a single JSON result object |
| `--request-file` |  | string |  | Path to a JSON /adapters/preview request body (defaults to stdin) |

## See also

- [axiom instance](./axiom-instance.md) — Create Instances from a Generic node (type-bind, no build, no deploy)
