Platform Nodes
Pre-built nodes for common platform tasks.
Platform nodes are templates that bundle the correct Nix packages, input/output types, and command structure for widely-used CLI tools. You specify parameters; the template handles the rest.
Available platform nodes
Section titled “Available platform nodes”| Node | Tool | Description |
|---|---|---|
ffmpeg.* | ffmpeg | Video and audio processing. |
pandoc.* | pandoc | Document format conversion. |
imagemagick.* | imagemagick | Image manipulation. |
yt-dlp.* | yt-dlp | Media download from supported sites. |
ffmpeg
Section titled “ffmpeg”Video and audio processing. Nix package: ffmpeg.
transcode-video: type: deterministic op: cli.run template: ffmpeg.transcode params: command: > ffmpeg -i {{ input_path }} -vf scale={{ width }}:{{ height }} -c:v libx264 -preset {{ preset }} artifacts/{{ output_name }}.mp4 nix: { packages: [ffmpeg] } inputs: config: { type: Record } outputs: result: { type: Record }| Template | What it does |
|---|---|
ffmpeg.transcode | Convert between video formats. |
ffmpeg.extract_audio | Extract audio track from video. |
ffmpeg.thumbnail | Generate thumbnail at a timestamp. |
ffmpeg.concat | Concatenate multiple media files. |
pandoc
Section titled “pandoc”Document conversion. Nix packages: pandoc, texlive.combined.scheme-small.
convert-docs: type: deterministic op: cli.run template: pandoc.convert params: command: > pandoc {{ input_path }} -f {{ from_format }} -t {{ to_format }} -o artifacts/{{ output_name }}.{{ to_format }} nix: { packages: [pandoc, texlive.combined.scheme-small] } inputs: config: { type: Record } outputs: result: { type: Record }| Template | What it does |
|---|---|
pandoc.convert | Convert between document formats. |
pandoc.pdf | Render to PDF via LaTeX. |
pandoc.html | Render to standalone HTML. |
imagemagick
Section titled “imagemagick”Image manipulation. Nix package: imagemagick.
resize-batch: type: deterministic op: cli.run template: imagemagick.resize params: command: > convert {{ input_path }} -resize {{ dimensions }} -quality {{ quality }} artifacts/{{ output_name }} nix: { packages: [imagemagick] } inputs: images: { type: Table } outputs: results: { type: Table }| Template | What it does |
|---|---|
imagemagick.resize | Resize images to target dimensions. |
imagemagick.convert | Convert between image formats. |
imagemagick.composite | Overlay images (watermark, badge). |
imagemagick.annotate | Add text to images. |
yt-dlp
Section titled “yt-dlp”Media download from supported sites. Nix package: yt-dlp.
download-media: type: source op: cli.run template: yt-dlp.download params: command: > yt-dlp -f "{{ format }}" -o "artifacts/%(title)s.%(ext)s" {{ url }} nix: { packages: [yt-dlp] } inputs: request: { type: Record } outputs: result: { type: Record }| Template | What it does |
|---|---|
yt-dlp.download | Download video in specified format. |
yt-dlp.audio | Extract audio only (mp3, opus, wav). |
yt-dlp.metadata | Fetch metadata without downloading. |
yt-dlp.playlist | Download all items in a playlist. |
Platform nodes vs. custom CLI nodes
Section titled “Platform nodes vs. custom CLI nodes”Use a platform node when a template exists for your task. Templates guarantee correct package versions, handle common edge cases, and produce consistent output schemas.
Use a custom CLI node (op: cli.run without a template) when:
- No template covers your tool or workflow.
- You need to chain multiple tools in a single command.
- You want full control over the command string and output parsing.
Platform nodes are just CLI nodes with pre-configured defaults. You can always override any field in the template by setting it explicitly in params.
Versioning
Section titled “Versioning”Platform node templates are versioned with Radhflow itself. When you upgrade Radhflow, template defaults may change (e.g., new ffmpeg flags for better compression). Existing pipelines that pin nix.nixpkgs are unaffected — the underlying tool versions stay the same.
To check which version of a template you’re using:
rf inspect --node transcode-videoThis shows the resolved template, including all default values.