Skip to main content

Module cmd

Module cmd 

Source
Expand description

Native command implementations, one module per subcommand.

Each run(args) receives the arguments after the command name — what a Python main() sees in sys.argv[1:] — and returns the exit code.

Modules§

assemble
xil assemble — mix stems straight to a master MP3: a two-pass foreground/background mix when a parsed script exists, a plain sequential join otherwise. Port of XILP003_audio_assembly.py.
cleanup
xil cleanup — delete stems whose seq no longer matches the parsed script. Port of XILP008_stale_stem_cleanup.py.
csv_join
xil csv-join — annotate a parsed episode CSV with SFX and cast config columns. Port of XILU003_csv_sfx_join.py.
cues
xil cues — parse a sound cues & music prompts sheet into an asset manifest, audit the SFX library, and optionally generate new assets or enrich the episode SFX config. Port of XILP006_cues_ingester.py.
daw
xil daw — export an episode as five aligned DAW layer WAVs, Audacity label tracks, an import helper script and a timeline. Port of XILP005_daw_export.py.
db_profile
xil db-profile — peak, average and minimum dBFS per MP3. Port of XILU010_db_profile.py.
episode_summary
xil episode-summary — one-row-per-episode CSV. Port of XILU014_episode_summary.py.
gui
xil gui — the web dashboard. Port of xil_gui.py’s entry point; the dashboard itself lives in the xil-web crate.
import
xil import — extract an ElevenLabs Studio export ZIP into pipeline stems. Port of XILP010_studio_import.py.
init
xil init — scaffold a new workspace. Port of xil_init.py.
master
xil master — overlay the DAW layer WAVs into one stereo 48 kHz VBR MP3 with ID3 tags and cover art. Port of XILP011_master_export.py.
migrate
xil migrate — carry stems across a script revision. Port of XILP007_stem_migrator.py.
migrate_workspace
xil migrate-workspace — move a pre-0.1.8 flat workspace to the normalized layout. Port of XILU009_migrate_workspace.py.
mp3_hash
xil mp3-hash — recursive MP3 SHA-256 hash log. Port of XILU007_mp3_hash.py.
parse
xil parse — production script markdown → structured JSON, plus the cast and SFX config skeletons. Port of XILP001_script_parser.py’s CLI.
parsed_csv
xil parsed-csv — parsed JSON → one row per entry. Port of XILU012_parsed_csv.py.
produce
xil produce — generate one voice stem per dialogue line (ElevenLabs, gTTS or Chatterbox Turbo), plus optional SFX stems, with a manifest that lets --reconcile re-link stems after a re-parse. Port of XILP002_producer.py.
publish
xil publish — draft social media posts for an episode through the Claude API. Port of XILP012_publish.py.
regen
xil regen — parsed JSON back to a production script. Port of XILP009_script_regenerator.py.
removal
Shared pieces of xil remove-show and xil remove-episode: the removal item model, size formatting, and deletion.
remove_episode
xil remove-episode — delete one episode’s workspace files. Port of XILU018_remove_episode.py.
remove_show
xil remove-show — delete every workspace file for a show. Port of XILU017_remove_show.py.
sample
xil sample — audition each cast voice with a short generated line. Port of XILU004_sample_voices_T2S.py.
scan
xil scan — pre-flight check of a production script. Port of XILP000_script_scanner.py.
setup
xil setup — build the venv a local ML worker runs under. Port of XILU023_setup.py.
sfx
xil sfx — generate SFX / music / ambience stems from an episode’s SFX config, standalone from the producer. Port of XILU002_generate_SFX.py.
sfx_csv
xil sfx-csv — sfx config → one row per effect. Port of XILU011_sfx_csv.py.
sfx_hydrate
xil sfx-hydrate — write pipe-hint fields from a parsed JSON into the SFX config without re-parsing. Port of XILU013_sfx_hydrate.py.
sfx_impact
xil sfx-impact — which source-backed cues are clipped short by duration_seconds, and by how much. Port of XILU021_sfx_impact.py.
sfx_lib
xil sfx-lib — inventory of the local SFX library from ID3 and MPEG headers, or of the account’s ElevenLabs sound-generation history with --api. Port of XILU005_discover_SFX.py.
sfx_match
xil sfx-match — find existing library assets for cues whose declared source is not on disk. Port of XILU022_sfx_match.py.
sfx_restore
xil sfx-restore — replay the timeline edit journal onto an episode’s SFX config. Port of XILU020_sfx_restore.py.
splice
xil splice — insert or delete parsed entries with automatic seq renumbering. Port of XILU006_splice_parsed.py.
status
xil status — make-style staleness check of an episode’s artifacts. Port of XILU019_episode_status.py.
stem_compare
xil stem-compare — flag dialogue stems whose Whisper transcript strays from the scripted line. Port of XILU016_stem_compare.py.
stem_log
xil stem-log — daily logs → stem generation chronology CSV. Port of XILU008_stem_log_report.py.
stem_verify
xil stem-verify — a JSON report of every stem’s attributes and, optionally, its Faster-Whisper transcript. Port of XILU015_stem_verify.py.
studio_onboard
xil studio-onboard — build an ElevenLabs Studio project from a parsed episode. Port of XILP004_studio_onboard.py.
use_cmd
xil use — set or display the active show context. Port of xil_use.py.
voices
xil voices — list the workspace’s ElevenLabs voices with enriched metadata, or back-fill a cast file from them. Port of XILU001_discover_voices_T2S.py.

Structs§

SysExit
A sys.exit(<message>) from inside a command, reported the way Python reports it once the run banner has closed: through the xil dispatcher (_normalize_exit_code) the message is logged as an error; through an xil-<command> entry point the interpreter prints it to stderr. Either way the status is 1.

Statics§

PROG 🔒
What Python sees as sys.argv[0] for this run: "xil parse" through the dispatcher, "xil-parse" through an alias. Feeds the run banner.

Functions§

argv_line
" ".join(sys.argv) — the BEGIN record’s argv= field.
finish
Finish a command whose body may have raised SysExit. Call after the banner guard has been dropped.
get_or_blank
entry.get(key) or "" — falsy values (null, "", 0, false) become an empty string, anything else passes through.
get_or_empty
data.get(key, "") — the value when the key is present (even null), an empty string when it is absent.
parse_or_exit
Parse args with a clap derive type, using prog as argv[0] so help and usage lines name the command the way argparse does (xil-use).
prog
py_str
bool(value) for a JSON value: null, false, 0, "", [] and {} are false, everything else true. str(value) for a JSON value printed through an f-string.
set_prog
truthy