External Command tool
The External Command tool pipes each block's text through an external command-line program and captures the program's standard output as the new text. It lets a pipeline reuse an existing CLI filter — a custom normalizer, a spell-fixer, a transliterator — without writing a native tool.
Text can be sent to the command on standard input or substituted into the
argument list via the ${source} and ${target} placeholders. A command is
required, and a target locale is required when applying to the target. Each
invocation has a timeout; the exit code is recorded on the block, and a
non-zero exit leaves the text unchanged and records the error.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
applySource | boolean | false | Process source text |
applyTarget | boolean | true | Process target text |
args | string[] | Command arguments; use ${source} and ${target} as placeholders | |
command | string | The command to execute | |
sendAsStdin | boolean | true | Send text via stdin instead of command arguments |
targetLocale | string | Target locale for processing | |
timeout | integer | 30 | Timeout in seconds |
Configure these parameters interactively and copy the flow-step YAML on the Tool Reference.
Examples
Pipe target text through a formatter
Run an external program on the target, sending text on stdin.
command: my-formatter applyTarget: true targetLocale: fr-FR
Pass text as an argument
Substitute the text into the argument list instead of stdin.
command: transform
args: ["--text", "${source}"]
applySource: true
sendAsStdin: falseProcessing notes
Operates on translatable blocks only; non-translatable blocks pass through unchanged.
Trailing newlines are trimmed from the captured output.
Limitations
A non-zero exit code leaves the text unchanged and records the exit code and error message as block properties.
The command runs once per block per scope (source and/or target), which can be slow for large documents.
← Back to the Tool Reference