Skip to content

Export & Manufacturing

The export tools generate manufacturing and documentation files from your KiCad projects using kicad-cli. All exports run in batch mode without requiring a running KiCad instance.

TaskExample prompt
Export GerbersExport Gerber files for my project at /path/to/project.kicad_pro
Export drill filesExport drill files for my project
Export PDFExport a PDF of my PCB layout
Generate SVGGenerate an SVG render of my PCB
Export schematic PDFExport a PDF of my schematic
Export Gerber files for my project at /path/to/project.kicad_pro

The export_gerbers tool runs kicad-cli pcb export gerbers and writes output into a gerbers/ subdirectory alongside the project. Returns the list of generated files and their paths.

Gerber files cover all standard layers: copper (front/back), solder mask, silkscreen, paste, and board outline.

Export drill files for my project at /path/to/project.kicad_pro

The export_drill tool runs kicad-cli pcb export drill and writes output to the gerbers/ subdirectory (following the common convention of co-locating drill files with Gerbers for fab submission).

Export a PDF of my PCB layout at /path/to/project.kicad_pro

The export_pdf tool supports both PCB and schematic exports:

  • PCB PDF: export_pdf with file_type="pcb" (default)
  • Schematic PDF: export_pdf with file_type="schematic"

Or use the dedicated schematic PDF export with additional options:

Export a black-and-white PDF of my schematic

The export_schematic_pdf tool provides options for black-and-white output and background exclusion.

Generate an SVG render of my PCB at /path/to/project.kicad_pro

The generate_pcb_svg tool uses kicad-cli pcb export svg to produce a multi-layer SVG of the board. The SVG content is returned as a string so the caller can display or save it.

The SVG export effectively serves as a PCB thumbnail. When viewing the output, you will typically see:

  • Board outline (Edge.Cuts layer)
  • Copper layers (F.Cu and B.Cu)
  • Silkscreen layers (F.SilkS and B.SilkS)
  • Mask layers (F.Mask and B.Mask)
  • Component outlines and reference designators
  1. Ensure KiCad is properly installed — the export tools rely on kicad-cli
  2. Use absolute paths to avoid path resolution issues
  3. Define a board outline (Edge.Cuts layer) for proper visualization
  4. Use the latest KiCad version for best compatibility

A typical flow for preparing manufacturing files:

  1. Run DRC to verify the design has no violations
  2. Export Gerber files
  3. Export drill files
  4. Generate a PDF for visual review
  5. Check the BOM for component availability
  6. Submit the gerbers/ directory to your PCB fabricator
  • Project browsing — generate SVGs for all projects to visually identify them
  • Documentation — include PCB renders in project docs
  • Design review — use PDFs and SVGs to discuss layouts without opening KiCad
  1. Verify kicad-cli is available in your PATH or set KICAD_CLI_PATH
  2. Check that the project file exists and contains a valid PCB or schematic
  3. Ensure write permissions in the output directory
  4. Check server logs for detailed error messages
  1. Check that the project contains a valid .kicad_pcb file
  2. Ensure the PCB has a defined board outline (Edge.Cuts layer)
  1. Ensure the PCB has a properly defined board outline
  2. Update to the latest KiCad version for improved CLI export quality