CLI
Pipelines
Reference values from piped stdin in the next tool's flags.
Any flag can pull its value from the previous tool's stdout. References are resolved before any network call, so you can chain tools without parsing JSON in shell.
Reference Tokens
| Token | Meaning |
|---|---|
- | Auto — first output's primary value (scalar field) or all primary values (array field) |
@<n> | n-th output's primary value (@0 = first) |
@<n>.<path> | jsonpath into the n-th output (e.g. @0.url, @1.meta.fps, @0.text) |
@* | All outputs as an array of primary values |
@stdin | The entire piped envelope |
@stdin:<path> | jsonpath into the whole envelope (e.g. @stdin:result.usage.creditsCost) |
"Primary value" = url for media, text for text, value for json. The CLI logic lives in packages/cli/src/lib/refs.ts.
Examples
# 1) Single image → video, auto-resolution
dlazy gpt-image-2 --prompt "detective profile" \
| dlazy veo-3.1 --firstFrame - --prompt "drone push-in, rainy night"
# 2) Pick the second image from a 4-up batch
dlazy gpt-image-2 --prompt "neon alley" --batch 4 \
| dlazy veo-3.1 --firstFrame @1.url --prompt "slow zoom"
# 3) Array slot — flatten upstream's URLs in
dlazy gpt-image-2 --prompt "..." --batch 4 \
| dlazy image-replicate --images -Validate Without Calling APIs
Append --dry-run to any tool to print the resolved input without paying credits or hitting the network — perfect for verifying complex @stdin:... paths.
dlazy gpt-image-2 --prompt "..." --dry-run