Reference manual
Copyright
This document is Copyright © 2023-2024 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.
All trademarks within this guide belong to their legitimate owners.
Contributors
Graham Keeth
Feedback
The KiCad project welcomes feedback, bug reports, and suggestions related to the software or its documentation. For more information on how to submit feedback or report an issue, please see the instructions at https://www.kicad.org/help/report-an-issue/
Introduction to the KiCad Command-Line Interface
KiCad provides a command-line interface, which is available by running the
kicad-cli
binary. With the command-line interface, you can perform a number of
actions on schematics, PCBs, symbols, and footprints in an automated fashion,
such as plotting Gerber files from a PCB design or upgrading a symbol library
from a legacy file format to a modern format.
On macOS, the kicad-cli executable is located at
/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli .
|
The kicad-cli
command has 5 subcommands: fp
, pcb
, sch
, sym
, and
version
. Each subcommand may have its own subcommands and arguments. For
example, to export Gerber files from a PCB you could run
kicad-cli pcb export gerbers example.kicad_pcb
.
You can add the --help
or -h
flag to see information about each
subcommand. For example, running kicad-cli pcb -h
prints usage information
about the pcb
subcommand, and kicad-cli pcb export gerbers -h
prints usage
information specifically for the pcb export gerbers
subcommand.
Footprint commands
The fp
subcommand exports footprints to another format or upgrades the
footprint libraries to the current version of the KiCad footprint file format.
Footprint export
The fp export svg
command exports one or more footprints from the specified
library into SVG files.
Usage: kicad-cli fp export svg [--help] [--output OUTPUT_FILE] [--layers LAYER_LIST]
[--define-var KEY=VALUE] [--theme VAR] [--footprint FOOTPRINT_NAME] [--black-and-white]
INPUT_DIR
Positional arguments:
|
Footprint library directory to export ( |
Optional arguments:
|
Show help for the footprint SVG export command. |
|
The output directory for the exported files. When this argument is not used, the files are exported to the current directory. |
|
A comma-separated list of layer names to export from the footprint, such
as |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the footprint editor’s currently selected theme is used. |
|
The name of the specific footprint to export from the library. When this argument is not used, all footprints in the library are exported. |
|
Export footprints in black and white. |
Footprint upgrade
The fp upgrade
command upgrades the the specified footprint library from a
legacy footprint format to the native format for the current version of KiCad.
If the input library is already in the current file format, no action is taken.
Usage: kicad-cli fp upgrade [-h] [--output OUTPUT_DIR] [--force] INPUT_DIR
Positional arguments:
|
Footprint library directory to upgrade ( |
Optional arguments:
|
Show help for the footprint upgrade command. |
|
The output directory for the upgraded footprints. When this argument is not used, the upgraded footprints are saved over the original footprints. |
|
Re-save the input library even if it is already in the current file format. |
PCB commands
The pcb
command runs a design rule check or exports a board to various other
file formats, including fabrication and 3D files.
PCB DRC
The pcb drc
command runs a design rule check on a board and generates a report.
Usage: kicad-cli pcb drc [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE]
[--format FORMAT] [--all-track-errors] [--schematic-parity] [--units UNITS]
[--severity-all] [--severity-error] [--severity-warning] [--severity-exclusions]
[--exit-code-violations] INPUT_FILE
Positional arguments:
|
Board file to run DRC on. |
|
Show help for the DRC command. |
|
Output filename for the generated DRC report. When this argument is not
used, the output filename will be the same as the input file, with the
|
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Report file format. Options are |
|
Report all errors for each track. |
|
Test for parity between PCB and schematic. |
|
Units to use in the report. Options are |
|
Report all DRC violations. This is equivalent to using all of the other DRC severity options. |
|
Report all error-level DRC violations. This can be combined with the other DRC severity options. |
|
Report all warning-level DRC violations. This can be combined with the other DRC severity options. |
|
Report all excluded DRC violations. This can be combined with the other DRC severity options. |
|
Return an exit code depending on whether or not DRC violations exist. The exit code is 0 if no violations are found, and 5 if any violations are found. |
PCB drill file export
The pcb export drill
command exports a drill file from a board.
Usage: kicad-cli pcb export drill [--help] [--output OUTPUT_DIR]
[--format FORMAT] [--drill-origin DRILL_ORIGIN]
[--excellon-zeros-format ZEROS_FORMAT] [--excellon-oval-format OVAL_FORMAT]
[--excellon-units UNITS] [--excellon-mirror-y] [--excellon-min-header]
[--excellon-separate-th] [--generate-map] [--map-format MAP_FORMAT]
[--gerber-precision VAR] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the drill file export command. |
|
The output directory for the drill file. When this argument is not used, the drill file is saved in the current directory. |
|
The drill file format. Options are |
|
The coordinate origin for the drill file. Options are |
|
The zeros format for the drill file. Options are |
|
Control the oval holes drill mode. Options are |
|
The units for the drill file. Options are |
|
Mirror the drill file in the Y direction. Only applies to Excellon format drill files. |
|
Use a minimal header in the drill file. Only applies to Excellon format drill files. |
|
Generate separate drill files for plated and non-plated through holes. Only applies to Excellon format drill files. |
|
Generate a map file in addition to the drill file. |
|
The map file format. Options are |
|
The precision (number of digits) for the drill file. Valid options are |
PCB DXF export
The pcb export dxf
command exports a board design to a DXF file.
Usage: kicad-cli pcb export dxf [--help] [--output OUTPUT_FILE]
[--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]
[--exclude-refdes] [--exclude-value] [--use-contours] [--include-border-title]
[--output-units UNITS] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the DXF export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
A comma-separated list of layer names to export from the footprint, such
as |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Plot graphic items using their contours. |
|
Include sheet border and title block in plot. |
|
Output units. Options are |
PCB Gerber export: one layer per file
The pcb export gerbers
command exports a board design to Gerber files, with
one layer per file.
Be aware that there are two distinct Gerber export commands, gerber and
gerbers . The gerber command plots multiple PCB layers to a single
Gerber file, while the gerbers command plots multiple Gerber files, with
one PCB layer per file. The gerbers command is typically the correct
command to use for having a PCB fabricated.
|
Usage: kicad-cli pcb export gerbers [--help] [--output OUTPUT_FILE]
[--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]
[--exclude-refdes] [--exclude-value] [--include-border-title] [--no-x2]
[--no-netlist] [--subtract-soldermask] [--disable-aperture-macros]
[--use-drill-file-origin] [--precision PRECISION] [--no-protel-ext]
[--common-layers COMMON_LAYER_LIST] [--board-plot-params] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the Gerber export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
A comma-separated list of layer names to plot from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Do not use the extended X2 format. |
|
Do not include netlist attributes. |
|
Remove silkscreen from areas without soldermask. |
|
Disable aperture macros. |
|
Use drill/place file origin instead of absolute origin. |
|
The precision (number of digits) for the Gerber files. Valid options are
|
|
Use |
|
A comma-separated list of layer names to plot on all layers, such as
|
|
Use the Gerber plot settings already configured in the board file. |
PCB Gerber export: multiple layers per file
The pcb export gerber
command exports one or more board layers to a single
Gerber file.
Be aware that there are two distinct Gerber export commands, gerber and
gerbers . The gerber command plots multiple PCB layers to a single
Gerber file, while the gerbers command plots multiple Gerber files, with
one PCB layer per file. The gerbers command is typically the correct
command to use for having a PCB fabricated.
|
Usage: kicad-cli pcb export gerber [--help] [--output OUTPUT_FILE]
[--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]
[--exclude-refdes] [--exclude-value] [--include-border-title] [--no-x2]
[--no-netlist] [--subtract-soldermask] [--disable-aperture-macros]
[--use-drill-file-origin] [--precision PRECISION] [--no-protel-ext] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the Gerber export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
A comma-separated list of layer names to plot from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Do not use the extended X2 format. |
|
Do not include netlist attributes. |
|
Remove silkscreen from areas without soldermask. |
|
Disable aperture macros. |
|
Use drill/place file origin instead of absolute origin. |
|
The precision (number of digits) for the Gerber files. Valid options are
|
|
Use |
PCB GLB export
The pcb export glb
command exports a board design to a GLB (binary GLTF) 3D
file.
Usage: kicad-cli pcb export glb [--help] [--output OUTPUT_FILE]
[--define-var KEY=VALUE] [--force] [--grid-origin] [--drill-origin]
[--no-unspecified] [--no-dnp] [--subst-models] [--board-only] [--include-tracks]
[--include-zones] [--min-distance MIN_DIST] [--user-origin VAR] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the GLB export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Exclude 3D models of components with 'unspecified' footprint type. |
|
Exclude 3D models of components with 'Do not populate' attribute. |
|
Replace VRML models in footprints with STEP models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Include tracks in export (time consuming). |
|
Include zones in export (time consuming). |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB IPC-2581 export
The pcb export ipc2581
command exports a board design in IPC-2581 format.
Usage: kicad-cli pcb export ipc2581 [--help] [--output OUTPUT_FILE]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--precision PRECISION]
[--compress] [--version VAR] [--units VAR] [--bom-col-int-id FIELD_NAME]
[--bom-col-mfg-pn FIELD_NAME] [--bom-col-mfg FIELD_NAME]
[--bom-col-dist-pn FIELD_NAME] [--bom-col-dist FIELD_NAME] INPUT_FILE
|
Board file to export. |
Optional arguments:
|
Show help for the IPC-2581 export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The precision (number of digits after the decimal separator) for the
exported file. The default is |
|
Compress output file as a ZIP file. |
|
IPC-2581 standard version to use. Options are |
|
Units to use in export. Options are |
|
Name of the part field to use for the Bill of Materials Internal ID column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Manufacturer Part Number column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Manufacturer column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Distributor Part Number column. This can be any footprint field, or blank to omit this column. |
|
Name of the part field to use for the Bill of Materials Distributor column. This can be any footprint field, or blank to omit this column. |
PCB PDF export
The pcb export pdf
command exports a board design to a PDF file.
Usage: kicad-cli pcb export pdf [--help] [--output OUTPUT_FILE]
[--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]
[--mirror] [--exclude-refdes] [--exclude-value] [--include-border-title]
[--negative] [--black-and-white] [--theme THEME_NAME] [--drill-shape-opt VAR]
INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the PDF export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
A comma-separated list of layer names to export from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Mirror the board. This can be useful for showing bottom layers. |
|
Exclude footprint reference designators from plot. |
|
Exclude footprint values from plot. |
|
Include the sheet border and title block. |
|
Plot in negative. |
|
Plot in black and white. |
|
The name of the theme to use for export. If no theme is given, the board editor’s currently selected theme is used. |
|
The shape of drill marks in the plot. Options are |
PCB position file export
The pcb export pos
command exports a position file from a board design.
Usage: kicad-cli pcb export pos [--help] [--output OUTPUT_FILE] [--side VAR]
[--format FORMAT] [--units UNITS] [--bottom-negate-x] [--use-drill-file-origin]
[--smd-only] [--exclude-fp-th] [--exclude-dnp] [--gerber-board-edge] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the position file export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
The side of the board to export. Options are |
|
The position file format. Options are |
|
Units for position file. Options are |
|
Use negative X coordinates for footprints on the bottom layer. This option has no effect for Gerber format. |
|
Use drill/place file origin instead of absolute origin. This option has no effect for Gerber format. |
|
Include only surface-mount components. This option has no effect for Gerber format. |
|
Exclude all footprints with through-hole pads. This option has no effect for Gerber format. |
|
Exclude all footprints with "Do not populate" attribute. |
|
Include board edge layer in export (Gerber format only). |
PCB STEP export
The pcb export step
command exports a board design to a STEP file.
Usage: kicad-cli pcb export step [--help] [--output OUTPUT_FILE]
[--define-var KEY=VALUE] [--force] [--grid-origin] [--drill-origin]
[--no-unspecified] [--no-dnp] [--subst-models] [--board-only] [--include-tracks]
[--include-zones] [--min-distance MIN_DIST] [--no-optimize-step]
[--user-origin VAR] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the STEP file export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Use grid origin as origin of output file. |
|
Use drill origin as origin of output file. |
|
Exclude 3D models of components with 'unspecified' footprint type. |
|
Exclude 3D models of components with 'Do not populate' attribute. |
|
Replace VRML models in footprints with STEP models of the same name, if they exist. |
|
Only include the board itself in the generated model; exclude all component models. |
|
Include tracks in export (time consuming). |
|
Include zones in export (time consuming). |
|
Tolerance for considering two points to be in the same location. Default:
|
|
Do not optimize STEP file. This enables writing parametric curves, which reduces file sizes and write/read times, but may reduce compatibility with other software. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
PCB SVG export
The pcb export svg
command exports a board design to an SVG file.
Usage: kicad-cli pcb export svg [--help] [--output OUTPUT_FILE]
[--layers LAYER_LIST] [--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE]
[--mirror] [--theme THEME_NAME] [--negative] [--black-and-white]
[--page-size-mode MODE] [--exclude-drawing-sheet]
[--drill-shape-opt SHAPE_OPTION] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the SVG file export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
A comma-separated list of layer names to export from the board, such as
|
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the board file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Mirror the board. This can be useful for showing bottom layers. |
|
The name of the theme to use for export. If no theme is given, the board editor’s currently selected theme is used. |
|
Plot in negative. |
|
Plot in black and white. |
|
Set page sizing mode. Options are |
|
Plot SVG without a drawing sheet. |
|
The shape of drill marks in the plot. Options are |
PCB VRML export
The pcb export vrml
command exports a board design to a VRML 3D file.
Usage: kicad-cli pcb export vrml [--help] [--output OUTPUT_FILE]
[--define-var KEY=VALUE] [--force] [--user-origin VAR] [--units VAR]
[--models-dir VAR] [--models-relative] INPUT_FILE
Positional arguments:
|
Board file to export. |
Optional arguments:
|
Show help for the VRML export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with the |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Overwrite output file. |
|
Specify a custom origin for the output file, with X and Y coordinates. For
example, |
|
Units to use in the output file. Options are |
|
Name of output directory to copy component models into. If not used, component models are embedded into the output file. |
|
With |
Schematic commands
The sch
command runs an electrical rule check, exports a schematic to
various other file formats, or exports a bill of materials or netlist. Each
subcommand has its own options.
Schematic ERC
The sch erc
command runs an electrical rule check on a schematic and generates
a report.
Usage: kicad-cli sch erc [--help] [--output OUTPUT_FILE]
[--define-var KEY=VALUE] [--format VAR] [--units VAR] [--severity-all]
[--severity-error] [--severity-warning] [--severity-exclusions]
[--exit-code-violations] INPUT_FILE
Positional arguments:
|
Schematic file to run ERC on. |
|
Show help for the ERC command. |
|
Output filename for the generated ERC report. When this argument is not
used, the output filename will be the same as the input file, with the
|
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Report file format. Options are |
|
Units to use in the report. Options are |
|
Report all ERC violations. This is equivalent to using all of the other ERC severity options. |
|
Report all error-level ERC violations. This can be combined with the other ERC severity options. |
|
Report all warning-level ERC violations. This can be combined with the other ERC severity options. |
|
Report all excluded ERC violations. This can be combined with the other ERC severity options. |
|
Return an exit code depending on whether or not ERC violations exist. The exit code is 0 if no violations are found, and 5 if any violations are found. |
Schematic bill of materials export
The sch export bom
command exports a BOM from a schematic.
The BOM export has a number of options for controlling the format and included
fields. This export method is equivalent to
exporting a BOM
from the symbol fields table.
To export a BOM using the legacy XML and Python BOM script workflow, use
the sch export python-bom command.
|
Usage: kicad-cli sch export bom [--help] [--output OUTPUT_FILE]
[--preset PRESET] [--format-preset FMT_PRESET] [--fields FIELDS]
[--labels LABELS] [--group-by GROUP_BY] [--sort-field SORT_BY] [--sort-asc]
[--filter FILTER] [--exclude-dnp] [--field-delimiter FIELD_DELIM]
[--string-delimiter STR_DELIM] [--ref-delimiter REF_DELIM]
[--ref-range-delimiter REF_RANGE_DELIM] [--keep-tabs] [--keep-line-breaks]
INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Shows help message and exits |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with a |
|
Use a named BOM preset setting from the schematic, e.g. |
|
Use a named BOM format preset setting from the schematic, e.g. |
|
An ordered list of fields to export. |
|
An ordered list of labels to apply the exported fields (default: "Refs,Value,Footprint,Qty,DNP"). |
|
Fields to group references by when field values match. |
|
Field name to sort by (default: "Reference"). |
|
If given, sort in ascending order. If not given, sort in descending order. |
|
Filter string to remove output lines. |
|
Exclude symbols with the "Do not populate" attribute. |
|
Separator between output fields/columns (default: ","). |
|
Character to surround fields with (none by default). |
|
Character to place between individual references (default: ","). |
|
Character to place in ranges of references (default: "-"). Leave blank for no ranges. |
|
Keep tab characters from input fields. Stripped by default. |
|
Keep line break characters from input fields. Stripped by default. |
Schematic DXF export
The sch export dxf
command exports a schematic to a DXF file. Each
sheet in the design is exported to its own file.
Usage: kicad-cli sch export dxf [--help] [--output OUTPUT_DIR]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME]
[--black-and-white] [--exclude-drawing-sheet] [--pages PAGE_LIST] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the DXF file export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot DXF without a drawing sheet. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
Schematic HPGL export
The sch export hpgl
command exports a schematic to an HPGL file for a pen
plotter. Each sheet in the design is exported to its own file.
Usage: kicad-cli sch export hpgl [--help] [--output OUTPUT_DIR]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--exclude-drawing-sheet]
[--pages PAGE_LIST] [--pen-size PEN_SIZE] [--origin ORIGIN] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the HPGL file export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
Plot HPGL without a drawing sheet. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
|
Set the pen width. The default pen size is 0.5 mm. |
|
Set plotter origin and scale. Options are |
Schematic netlist export
The sch export netlist
command exports a netlist in
various formats from
a schematic.
Usage: kicad-cli sch export netlist [--help] [--output OUTPUT_FILE]
[--format FORMAT] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the netlist export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with a |
|
The netlist output format. Options are |
Schematic PDF export
The sch export pdf
command exports a schematic to a PDF file. Each sheet in
the design is exported to its own page in the PDF file.
Usage: kicad-cli sch export pdf [--help] [--output OUTPUT_FILE]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME]
[--black-and-white] [--exclude-drawing-sheet] [--exclude-pdf-property-popups]
[--no-background-color] [--pages PAGE_LIST] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the PDF file export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with a |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot PDF without a drawing sheet. |
|
Do not generate property popups in PDF. |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
Schematic PostScript export
The sch export ps
command exports a schematic to a PostScript file. Each
sheet in the design is exported to its own file.
Usage: kicad-cli sch export ps [--help] [--output OUTPUT_DIR]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME]
[--black-and-white] [--exclude-drawing-sheet] [--no-background-color]
[--pages PAGE_LIST] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the PS file export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot PS without a drawing sheet. |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
Schematic bill of materials export (legacy BOM scripts)
The sch export python-bom
command exports an XML BOM file from a schematic.
The XML BOM file can then be processed into your desired BOM format using a
custom script or one of the scripts described in the
schematic BOM
export documentation.
Usage: kicad-cli sch export python-bom [--help] [--output OUTPUT_FILE] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the BOM export command. |
|
The output filename. When this argument is not used, the output filename
will be the same as the input file, with a |
Schematic SVG export
The sch export svg
command export a schematic to an SVG file. Each sheet in
the design is exported to its own file.
Usage: kicad-cli sch export svg [--help] [--output OUTPUT_DIR]
[--drawing-sheet SHEET_PATH] [--define-var KEY=VALUE] [--theme THEME_NAME]
[--black-and-white] [--exclude-drawing-sheet] [--no-background-color]
[--pages PAGE_LIST] INPUT_FILE
Positional arguments:
|
Schematic file to export. |
Optional arguments:
|
Show help for the SVG file export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
Path to drawing sheet to use in plot, overriding the drawing sheet specified in the schematic file. |
|
Add or override project variable definitions. Can be used multiple times to define multiple variables. |
|
The name of the theme to use for export. If no theme is given, the schematic editor’s currently selected theme is used. |
|
Export schematic in black and white. |
|
Plot SVG without a drawing sheet. |
|
Export schematic without a background color, regardless of theme. |
|
Comma-separated list of pages to export. Blank or unspecified means all
pages. To plot specific pages, give the root sheet as |
Symbol commands
The sym
subcommand exports symbols to another format or upgrades symbol
libraries to the current version of the KiCad symbol file format.
Symbol export
The sym export svg
command exports one or more symbols from the specified
library into SVG files.
Usage: kicad-cli sym export svg [--help] [--output OUTPUT_DIR]
[--theme THEME_NAME] [--symbol SYMBOL] [--black-and-white]
[--include-hidden-pins] [--include-hidden-fields] INPUT_FILE
Positional arguments:
|
Symbol library file to use for export. |
Optional arguments:
|
Show help for the symbol SVG export command. |
|
The output folder for the exported files. When this argument is not used, the files are exported to the current directory. |
|
The name of the theme to use for export. If no theme is given, the symbol editor’s currently selected theme is used. |
|
The specific symbol to export from the library. When this argument is not used, all symbols in the library are exported. |
|
Export symbols in black and white. |
|
Export hidden pins in the exported SVG. |
|
Export hidden symbol fields in the exported SVG. |
Symbol upgrade
The sym upgrade
command upgrades the the specified symbol library from a
legacy symbol format to the native format for the current version of KiCad. If
the input library is already in the current file format, no action is taken.
Usage: kicad-cli sym upgrade [--help] [--output OUTPUT_FILE] [--force] INPUT_FILE
Positional arguments:
|
Symbol library to upgrade. |
Optional arguments:
|
Show help for the symbol upgrade command. |
|
The output filename for the upgraded symbol library. When this argument is not used, the upgraded symbol library is saved over the original library. |
|
Re-save the input library even if it is already in the current file format. |
Version commands
The version
subcommand prints the KiCad version. Without any arguments, it
simply prints the version number, for example 7.0.7
. You can print the version
in several other formats using the --format
argument.
Use kicad-cli version --format about for version information to include
when submitting bug reports or feature requests on Gitlab.
|
Usage: kicad-cli version [--help] [--format VAR]
Optional arguments:
|
Format of the version number. Options are |