Skip to content

Platform Nodes

Platform nodes are pre-built templates for common CLI tools. Each declares the correct Nix packages, input/output types, and command structure.

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 }
TemplateDescription
ffmpeg.transcodeConvert between video formats.
ffmpeg.extract_audioExtract audio track from video.
ffmpeg.thumbnailGenerate thumbnail at timestamp.
ffmpeg.concatConcatenate multiple media files.

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 }
TemplateDescription
pandoc.convertConvert between document formats.
pandoc.pdfRender to PDF via LaTeX.
pandoc.htmlRender to standalone HTML.

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 }
TemplateDescription
imagemagick.resizeResize images to target dimensions.
imagemagick.convertConvert between image formats.
imagemagick.compositeOverlay images (watermark, badge).
imagemagick.annotateAdd text to images.

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 }
TemplateDescription
yt-dlp.downloadDownload video in specified format.
yt-dlp.audioExtract audio only (mp3, opus, wav).
yt-dlp.metadataFetch metadata without downloading.
yt-dlp.playlistDownload all items in a playlist.