Home

stencila outputs add

Add an output configuration

Usage

stencila outputs add [OPTIONS] <OUTPUT> [SOURCE] [-- <ARGUMENTS>...]

Examples

# Add a simple output (render report.md to report.pdf)
stencila outputs add report.pdf report.md

# Add with explicit render command
stencila outputs add report.pdf report.md --command render

# Add output that only runs on main branch
stencila outputs add report.pdf report.md --refs main

# Add static file (copy as-is)
stencila outputs add data.csv

# Add pattern-based outputs
stencila outputs add "exports/*.pdf" --pattern "exports/*.md"

# Add spread output (generates multiple variants)
stencila outputs add "{region}/report.pdf" report.md --command render -- region=north,south

# Add spread with multiple arguments (grid mode)
stencila outputs add "{region}/{year}/data.pdf" report.md --command render -- region=north,south year=2024,2025

# Add spread with zip mode
stencila outputs add "{q}-report.pdf" report.md --command render --spread zip -- q=q1,q2,q3,q4

Arguments

NameDescription
<OUTPUT>Output path.
[SOURCE]Source file path.
[ARGUMENTS]Arguments for spread outputs (comma-delimited key=val1,val2 pairs).

Options

NameDescription
-c, --commandProcessing command.
-r, --refsGit ref patterns for when to process this output.
-p, --patternGlob pattern for matching multiple source files.
-e, --excludeGlob patterns to exclude from pattern matches.
--spreadSpread mode for multi-variant outputs (grid or zip).

Possible values of --spread

ValueDescription
gridCartesian product of all arguments (default)
zipPositional pairing of values (all params must have same length)

Possible values of --command

ValueDescription
renderExecute code and convert to output format (default for different extensions)
convertFormat transformation only, no code execution
noneCopy file as-is (default for same extensions)
© 2026 Stencila