Strongly typed, auto-generated python bindings for KiCAD's command line interface.
pip install kicadcliwrapper
from kicadcliwrapper.generated.kicad_cli import kicad_cli
# Get version
kicad_cli(
kicad_cli.version(),
).exec()
# Export pdf for pcb
kicad_cli(
kicad_cli.pcb(
kicad_cli.pcb.export(
kicad_cli.pcb.export.pdf(
INPUT_FILE="input.kicad_pcb"
)
)
),
).exec()
For more examples you can check faebryk
git clone https://github.com/faebryk/kicadcliwrapper.git
poetry install
# Re-generate bindings (make sure kicad-cli is installed)
python src/kicadcliwrapper/main.py
See PARSER.md for an explanation of the internal parsing.