Import from KiCAD

Existing designs aren't a dead end. typecad-pcb import reads a .kicad_pcb and prints the equivalent typeCAD code — and with --apply, it writes KiCAD-side layout edits back into your source files.

command

import

Converts a KiCAD board into typeCAD TypeScript. Without flags it prints the code for you to paste; variable names come from each footprint's Code property, falling back to the KiCAD reference.

Example first

terminal
typecad-pcb import ./existing-board.kicad_pcb

What gets imported

ContentHow it arrives
ComponentsFootprint placement — position, rotation, side (front/back)
Tracks & viasEmitted as TrackBuilder chains and via components
Zones & keepoutsIncluding grouped fills and rule areas
Board outlineRectangles, polygons, circles, cutouts
StackupLayer count and dielectric data
TextBoard text elements
command

import --apply

The round-trip: match the imported board against your project's source files and write KiCAD-side edits back. Selective — an interactive checklist shows every change before it's applied.

Example first

terminal
typecad-pcb import ./existing-board.kicad_pcb --apply --capture-layouts

The importer locates the project's source, matches each footprint to the line that created it, and offers the differences it found:

Change in KiCADWhat --apply writes
Position / side changesFootprints that moved in KiCAD update their pcb position in the source
Text call changesBoard text edits sync back as .text() calls
Layout changesreferenceLayout / valueLayout / fabLayout — with --capture-layouts

Tracks, vias, and zones are always shown for manual copy — --apply never rewrites those into your source unasked.

© 2026 typeCAD — code-defined electronics github