# render

Render artifact layers to output

Canonical URL: https://docs.paradoc.dev/cli/commands/render/

Renders an artifact layer to a file or stdout.

## Usage

```bash
paradoc render <artifact> [options]
```

## Arguments

| Argument   | Description                                |
| ---------- | ------------------------------------------ |
| `artifact` | Artifact file (JSON/YAML) or `-` for stdin |

## Options

| Option                    | Description                                                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `--data <pathOrJson>`     | Complete, valid data payload: file path (JSON/YAML), `-` for stdin, or inline JSON                                            |
| `--bindings <pathOrJson>` | PDF layers only: AcroForm field name to Paradoc path, merged over the layer's own bindings (path to JSON/YAML or inline JSON) |
| `--out <file>`            | Write output to file (defaults to stdout)                                                                                     |
| `--format <style>`        | Summary format: `pretty` or `json` (default: pretty)                                                                          |
| `--layer <key>`           | Layer key to use (defaults to `defaultLayer`, else the first declared layer)                                                  |
| `--dry-run`               | Validate and resolve layer without rendering                                                                                  |

## Description

The `render` command reads an artifact and resolves the requested layer. With
`--data`, it selects the text, PDF, or DOCX implementation automatically from
the layer's MIME type and fills the output. Without data, it returns the raw
layer content. File-backed layers resolve relative to the artifact file.
For artifacts read from stdin, file-backed layers resolve from the current
working directory.

## Examples

Render default layer to stdout:

```bash
paradoc render my-form.yaml
```

Render specific layer:

```bash
paradoc render my-form.yaml --layer markdown
```

Fill a PDF layer without choosing a renderer:

```bash
paradoc render my-form.yaml --layer pdf --data answers.json --out completed.pdf
```

Render to file:

```bash
paradoc render my-form.yaml --out output.md
```

Dry run (validate only):

```bash
paradoc render my-form.yaml --dry-run
```

## Output

When rendering to file:

```
✓ Layer rendered to output.md
  Artifact: lease-agreement
  Layer: markdown
  Type: text/markdown
```

Dry run output:

```
Dry run summary:
  Artifact:   lease-agreement (form)
  Version:    1.0.0
  Layer:      markdown
  Layer kind: inline
  MIME type:  text/markdown
  Source:     lease-agreement.yaml
```

## See also

* [show](/cli/commands/show) - Display artifact content
* [inspect](/cli/commands/inspect) - Inspect PDF form fields

An artifact argument may be a file path or an installed `@namespace/name` reference from `.paradoc/lock.json`. An uninstalled reference fails with an error.

`--data` and `--bindings` apply only to forms. Other artifact kinds ignore `--data` with a warning and reject `--bindings`. Invalid form data stops rendering.
Use the SDK's progressive fill and render flow for an incomplete draft. React layers also require an SDK React renderer; the CLI reports the core `UnregisteredLayerRendererError` for them.
