CLI command design

sch-ir

Exports Altium schematic documents or project schematics as gotIR JSON artifacts.

Usage

altium-cruncher sch-ir CPU.SchDoc -o output/sch-ir
altium-cruncher sch-ir Hydroscope.PrjPcb
altium-cruncher sch-ir ./project-folder

Arguments

file accepts .SchDoc, .PrjPcb, or a directory containing exactly one .PrjPcb. When omitted, the command attempts project auto-detection from the current working directory. -o selects the output directory. The default output directory is ./output/sch-ir.

Output

The command writes one .gotir.json file per schematic document under the output directory. It calls the same default to_ir(profile="onscreen") path used by schematic SVG rendering and the interactive schematic viewer. The payload includes render_hints.font_resolution diagnostics when the underlying altium-monkey renderer reports font substitutions or fallbacks, and the CLI logs warning messages for those diagnostics.

Tests

Unit coverage verifies single-document, project, current-working-directory auto-detected project, and directory-argument auto-detected project export. CLI coverage verifies help registration through the public command manifest.