CLICommands
renderLast updated on
Last updated on
Render artifact layers to output
Renders an artifact layer to a file or stdout.
Usage
ofm render <artifact> [options]Arguments
| Argument | Description |
|---|---|
artifact | Artifact file (JSON/YAML) or - for stdin |
Options
| Option | Description |
|---|---|
--data <pathOrJson> | Data payload (path to JSON/YAML or inline JSON) |
--bindings <pathOrJson> | Renderer bindings (path to JSON/YAML or inline JSON) |
--renderer <id> | Force a renderer id: text, pdf |
--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 artifact.defaultLayer) |
--dry-run | Validate and resolve layer without rendering |
Description
The render command reads an artifact, resolves the specified layer, and outputs its content. For file-backed layers, it reads the referenced file. For inline layers, it outputs the embedded content.
Examples
Render default layer to stdout:
ofm render my-form.yamlRender specific layer:
ofm render my-form.yaml --layer markdownRender to file:
ofm render my-form.yaml --out output.mdDry run (validate only):
ofm render my-form.yaml --dry-runOutput
When rendering to file:
✓ Layer rendered to output.md
Artifact: lease-agreement
Layer: markdown
Type: text/markdownDry 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