CLI Reference
Quick run
Section titled “Quick run”No global install needed. Run the latest version directly via npx:
npx imferno@latest validate ./my-packageInstall
Section titled “Install”# Via npm (prebuilt binaries for all platforms)npm install -g imferno
# Via Cargocargo install imfernoimferno validate
Section titled “imferno validate”Validate an IMF package against SMPTE ST-2067.
imferno validate <PATH> [OPTIONS]| Option | Description |
|---|---|
--verify-hashes | Verify SHA-1 hashes of all assets against PKL (slow) |
--format <FORMAT> | Output format: summary (default), json |
--core-spec <SPEC> | Core spec version: auto (default), v2013, v2016, v2020 |
--app2e-spec <SPEC> | App profile: auto (default), none, v2020, v2021, v2023 |
--xml-only | Skip file manifest and MXF header checks (validates XML structure only) |
--exit-zero | Always exit 0, even on validation errors (useful for CI) |
--rules-config <PATH> | Path to a JSON rules config file |
Examples
Section titled “Examples”# Basic validationimferno validate ./my-imp
# JSON output for CI pipelinesimferno validate ./my-imp --format json --exit-zero
# Full validation with hash verificationimferno validate ./my-imp --verify-hashes
# Force specific spec versionsimferno validate ./my-imp --core-spec v2020 --app2e-spec v2023
# XML-only mode (skip disk I/O — useful for remote filesystems)imferno validate ./my-imp --xml-only
# Custom rules configimferno validate ./my-imp --rules-config rules.jsonimferno cpl
Section titled “imferno cpl”Show detailed CPL information.
imferno cpl <PATH> [OPTIONS]| Option | Description |
|---|---|
--uuid <UUID> | CPL UUID (shows first CPL if not specified) |
Examples
Section titled “Examples”imferno cpl ./my-impimferno cpl ./my-imp --uuid urn:uuid:abcd1234-...imferno export
Section titled “imferno export”Export a full report (package metadata, validation results, and CPL analysis) as JSON.
imferno export <PATH> [OPTIONS]| Option | Description |
|---|---|
--ancestor <PATH> | Path to ancestor IMP directory (for supplemental packages) |
--core-spec <SPEC> | Core spec version: auto (default), v2013, v2016, v2020 |
--app2e-spec <SPEC> | App profile: auto (default), none, v2020, v2021, v2023 |
--xml-only | Skip file manifest and MXF header checks |
--rules-config <PATH> | Path to a JSON rules config file |
Examples
Section titled “Examples”# Export full report as JSONimferno export ./my-imp > report.json
# Export supplemental package with ancestorimferno export ./supplemental-imp --ancestor ./original-imp
# Pipe into report for pretty-printingimferno export ./my-imp | imferno report -imferno report
Section titled “imferno report”Pretty-print a previously exported JSON report.
imferno report <PATH>PATH is a JSON file exported by imferno export, or - to read from stdin.
Examples
Section titled “Examples”# Print from fileimferno report report.json
# Pipe from exportimferno export ./my-imp | imferno report -
# Pipe from curl (remote report)cat report.json | imferno report -Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Validation passed (or --exit-zero used) |
1 | Validation errors found |
Rules config
Section titled “Rules config”Create a rules.json to override severity levels:
{ "ST2067-2:2020:8.3/FileNotFound": "critical", "ST2067-21:2023:7.1/AppIdMismatch": "off"}See Configuration for details on available severities and typed code constants.