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

Your first board — Visual Studio Code
Select a file from the explorer
KiCAD 10 · ./build/ passives · nets · placement · routing

The whole flow

1 — Create the project

terminal
npx @typecad/pcb create

Answer 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

terminal
cd my-project/hw
npx @typecad/pcb build

The 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:

output
build/
  first_board.kicad_pcb
  first_board.kicad_sch
  first_board.net
  first_board.csv   ← the BOM

The 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
© 2026 typeCAD — code-defined electronics github