CLI Reference¶
All divvun-runtime commands.
init¶
Initialize a new pipeline project.
Creates pipeline.ts and generates type definitions in .divvun-rt/.
sync¶
Generate TypeScript type definitions.
Run after changing Cargo features or updating Divvun Runtime.
bundle¶
Create a .drb bundle for distribution.
Options:
- -a, --assets-path <PATH> - Assets directory (default: ./assets)
- -p, --pipeline-path <PATH> - Pipeline file (default: ./pipeline.ts)
- --skip-check - Skip TypeScript type checking
- --type <TYPE> - Bundle type metadata (e.g. grammar, spellcheck, tts)
- --name <NAME> - Bundle name metadata
- --vers <VERSION> - Bundle version metadata
- --locales <TAGS> - BCP-47 tags the bundle serves, comma-separated (e.g.
se-NO,se-SE), recorded as drb.locales
Writes bundle.drb in the current directory. Dev pipelines (functions ending
in _dev) are left out.
run¶
Execute a pipeline.
Path: -p, --path <PATH> takes a .drb bundle, a .ts pipeline file, or
a directory containing pipeline.ts. It defaults to the current directory.
Input: the text to process. With no input, run starts an interactive
REPL. When stdin is not a terminal, run reads its input from stdin instead,
and the input argument is ignored.
Options:
- -p, --path <PATH> - Bundle, pipeline file, or directory to run
- -P, --pipeline <NAME> - Select a specific named pipeline
- -c, --config <KEY=VALUE> - Runtime configuration
- -o, --output-path <PATH> - Write output to file
- -C, --command <CMD> - Run command on output
- -b, --break-after <STEP> - Run up to the named step, print its raw output,
and stop. A step is named by the id passed as a command's first argument;
an unknown name lists the available steps.
- --skip-check - Skip type checking
Examples:
# Run pipeline.ts in the current directory
divvun-runtime run "text"
# Run a TypeScript pipeline
divvun-runtime run -p ./pipeline.ts "text"
# Run specific pipeline
divvun-runtime run -p ./pipeline.ts --pipeline spell-only "text"
# Run from bundle
divvun-runtime run -p bundle.drb "text"
# Read input from stdin
echo "text" | divvun-runtime run -p bundle.drb
# Inspect an intermediate step
divvun-runtime run -p bundle.drb --break-after <step> "text"
# With configuration
divvun-runtime run -p bundle.drb -c 'suggest={"locales":["fo"]}' "text"
# Save output
divvun-runtime run -p bundle.drb -o output.wav "text"
list¶
List pipelines in a bundle or project.
Shows all available pipelines and marks default and dev pipelines.
Example:
Output:
playground¶
Open a bundle or pipeline in the graphical playground (alias play).
Looks for the playground app in $DRT_PLAYGROUND, then
/Applications/Divvun Runtime Playground.app on macOS, then
divvun-rt-playground on PATH.
test¶
Run TypeScript test files with Deno.
With no files, runs the .ts files in tests/.
Global options¶
-V, --version- Show the version, build date and git revision.-VVadds the enabled features, dependencies and toolchain.--theme <THEME>- Syntax highlighting theme (also$DRT_THEME)
Configuration Syntax¶
Runtime configuration passed with -c flag:
String:
JSON object:
Array:
Multiple configs:
Common configurations: