CLI reference
The circuitscript command-line tool renders a Circuitscript source file into one or more output files and reports errors as a non-zero exit code.
Usage
circuitscript [input path] [output path]
input path is a .cst file; output path selects the output format from its file extension (see Output formats). Either can be replaced with -i/--input and --o, respectively.
Options
| Name | Description |
|---|---|
-i, --input <text> | Provide the input script directly as a string instead of a file path |
-u, --update-source | Update the source file with refdes annotation. See Annotation |
-j, --annotated-path [file-path] | Save an annotated copy of the source file at the given path. See Annotation |
-w, --watch | Watch the input file for changes and re-render on save |
-n, --dump-nets | Dump out net information |
-d, --dump-data | Dump data during parsing |
-s, --stats | Show stats during generation |
-x, --skip-output | Skip output generation |
-e, --erc | Enable ERC output. See Electrical Rules Check (ERC) |
-b, --bom [output-path] | Generate a Bill of Materials in CSV format. See BOM generation |
--kicad-version <version> | KiCad schematic output version, 9 or 10 (default 9) |
--no-simplify-refdes | Disable simplification of single-instance indexed refdes (for example R1_1 → R1) |
--o <fileName> | Additional output path; repeatable to generate several outputs in one run |
Exit codes
The CLI exits 1 when:
- the input has a syntax or parsing error,
- an ERC check reports at least one
Error-severity result, - the input file cannot be found,
- an unexpected error occurs.
Otherwise it exits 0. This makes the CLI usable as a pass/fail step in CI.