Documentation

CLI reference

Every command takes one or more media files or globs. Flags that shape the pipeline are available on every command that reaches the stage they affect.

Commands

Overview
subkit subtitle      <media-file>...   # whole pipeline → .srt / .vtt
subkit generate      <media-file>...   # whole pipeline → any outputs
subkit extract-audio <media-file>...   # stop after audio
subkit transcribe    <media-file>...   # stop after transcript
subkit cues          <media-file>...   # stop after cues
subkit render        <media-file>...   # render from cached artefacts
subkit cache         path|list|clean
subkit version       [--verbose]
CommandWhat it does
subtitleGenerate subtitle files. --format srt by default; repeat or comma-separate for srt,vtt.
generateGenerate one or more outputs of any kind. Driven entirely by --output specs; defaults to subtitle:srt.
extract-audioExtract normalized audio artefacts. Needs --output, --output-dir or --output-template unless --cache-audio is set, because audio is otherwise run-local.
transcribeExtract audio if needed, transcribe it, and cache the normalized transcript JSON.
cuesBuild and cache subtitle cues from the transcript, without rendering a subtitle file.
renderRender outputs from cached or rebuilt artefacts. Same --output grammar as generate.
cachepath prints the cache root, list prints size and top-level artefact groups, clean empties it.
versionPrint the version; --verbose adds commit information.

Output specs

generate and render take --output / -o specs shaped kind:format, repeated or comma-separated:

bash
subkit generate movie.mp4 \
  --output subtitle:srt \
  --output subtitle:vtt \
  --output script:txt \
  --output words:json
SpecProduces
subtitle:srtSubRip cues. Speaker labels appear on their own line as [speaker 0], only when the speaker changes.
subtitle:vttWebVTT cues. Speakers are inline voice spans: <v Speaker 0>.
script:txtThe transcript text as one plain-text file. script:md is also accepted.
words:jsonThe word array from the normalized transcript: index, text, punctuated, start, end, confidence, speaker, channel, language.

Subtitle specs accept two extra attributes. algorithm= overrides the cue algorithm for that output alone, and file= sends it to an exact path:

bash
subkit generate movie.mp4 \
  --output subtitle:srt:algorithm=netflix \
  --output subtitle:vtt:algorithm=deepgram \
  --output script:txt:file=./out/notes.txt
Specs are validated before anything touches the filesystem, so a typo in one --output is reported on its own rather than half-way through a batch.

Output paths

With no path flags, outputs land next to the input: movie.srt, movie.script.txt, movie.words.json.

FlagEffect
--output, -oAn exact path. Single input only — for subtitle it is the subtitle file, for extract-audio / transcribe / cues it is the copied artefact. (The old --out spelling still works but is deprecated.)
--output-dirWrite everything into this directory, keeping the derived file names.
--output-templateA path template. Tokens: {dir}, {base}, {input_ext}, {kind}, {format}.
bash
subkit generate "./season-1/*.mkv" \
  --output subtitle:srt --output words:json \
  --output-template "./out/{base}.{kind}.{format}"

Batch & progress

Every pipeline command accepts multiple files and glob patterns. Inputs run concurrently, and a failure on one file does not stop the rest — errors are collected and printed as a summary at the end.

FlagDefault
--concurrency, -j4 — maximum files processed at once.
--progressauto — an interactive Bubble Tea view for multi-file terminal runs, plain logs when output is redirected. Force with tui, plain or off.
--fail-fastfalse — cancel remaining queued work after the first failure.

Audio flags

Available on extract-audio and every command that runs it.

FlagDefault
--audio-formatflac — intermediate audio format.
--audio-stream0 — zero-based input audio stream to extract.
--audio-channels1 — output channel count.
--audio-sample-rate0 — keep the ffmpeg default.

Deepgram flags

FlagDefault
--providerdeepgram
--modelnova-3
--languageen-US — a BCP-47 hint.
--punctuatetrue
--paragraphstrue
--smart-formattrue
--diarizetrue — speaker diarization.
--diarize-modelDeepgram diarization model version.
--utterancestrue — utterance segmentation.
--deepgram-endpointThe listen endpoint to call.

Subtitle flags

Available on subtitle, generate, cues and render. Every numeric flag defaults to 0, meaning use the selected algorithm's own default — so you only override what you actually care about. Full detail in cue algorithms.

FlagMeaning
--subtitle-algorithmdeepgram (default) or netflix.
--subtitle-max-charsMax characters per line.
--subtitle-max-linesMax lines per cue.
--subtitle-max-wordsMax words per cue — the deepgram algorithm's chunk size.
--subtitle-min-durationMinimum cue duration, in seconds.
--subtitle-max-durationMaximum cue duration, in seconds.
--subtitle-max-gapPause length that forces a cue boundary.
--subtitle-reading-speedCharacters per second — netflix only.
--subtitle-prefer-segmentstrue — prefer provider utterance segments when cueing.
--format, -fsrtsubtitle command only; repeat or comma-separate srt,vtt.

Cache flags

These are persistent flags: they work on every command. See caching for what goes into a key.

FlagEffect
--cache-dirUse a different cache directory instead of the OS default.
--no-cacheNeither read nor write the persistent cache.
--refreshIgnore cache reads and rebuild every artefact.
--rerunRerun selected steps: audio, transcribe, cues, render, or all.
--cache-audioRead and write persistent normalized audio artefacts instead of run-local ones.