Skip to main content

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

NameDescription
-i, --input <text>Provide the input script directly as a string instead of a file path
-u, --update-sourceUpdate 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, --watchWatch the input file for changes and re-render on save
-n, --dump-netsDump out net information
-d, --dump-dataDump data during parsing
-s, --statsShow stats during generation
-x, --skip-outputSkip output generation
-e, --ercEnable 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-refdesDisable simplification of single-instance indexed refdes (for example R1_1R1)
--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.