KiCad 8 How To Use Command-Line


Introduction

KiCad is an open source electronic design automation (EDA) software for designing electronic circuits and printed circuit boards (PCBs). KiCad provides a command line interface (CLI) that can be used to automate certain tasks, such as project setup, component library management, and generation of manufacturing files (Gerber), opening new projects, etc.

Install KiCad

Download KiCad and install it.

Verify kicad-cli

After the installation is complete, open a command line window and enter the following command to confirm whether the KiCad CLI tool is available.
kicad-cli -v
8.0.3
If you are using macOS, you can go to /Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli to execute the function.

Generate Netlist Using kicad-cli

kicad-cli sch export netlist -o /path/to/your_project/your_project.net /path/to/your_project/your_project.kicad_sch

Generate PDF Using kicad-cli

kicad-cli sch export pdf -o my_schematic.pdf path/to/my_project.kicad_sch

Generate Gerber Using kicad-cli

kicad-cli pcb export gerbers -o ./gerbers path/to/my_project.kicad_pcb

Conclusion

KiCad command-line tools provide a powerful and flexible way to automate and accelerate electronic design workflows. Through these commands, we can manage design projects more effectively, allowing more time to focus on creative design work.