Your first board
The smallest complete pcb project: two resistors, three named nets, and one build that produces a KiCAD board — the whole flow end to end.
Click through the files — it's the whole project
The whole flow
1 — Create the project
npx @typecad/pcb createAnswer the prompts — no firmware project or extra packages are needed for this board — then open
the generated .code-workspace file in VSCode.
2 — Write the board
Open hw/src/index.ts and replace the starter with the board from the editor
above. That's the entire design: two resistors sized with size, three named
nets wired with net(), a board outline, and placements. The build turns it
into a KiCAD project.
3 — Build
cd my-project/hw
npx @typecad/pcb buildThe build runs the entry file and writes the KiCAD outputs into ./build/. You
can also click the build script in VSCode's NPM Scripts sidebar.
4 — Open it in KiCAD
Everything the board needs is in build/ — open the PCB file in KiCAD for the
final visual layout pass:
build/
first_board.kicad_pcb
first_board.kicad_sch
first_board.net
first_board.csv ← the BOMThe schematic, netlist, and BOM all agree with the code, because they all come from it.
Change a value — '10kohm' to '4.7kohm' — rebuild, and every
output updates.
Where to go next
- Passives — resistors, capacitors, LEDs, and more, packaged by size
- Connections — everything
net()can do, including named nets and power rails - Placement — position parts relative to each other and the board edges instead of hard-coded mm
- Getting started — installing the requirements, if you haven't yet