Paste a GitHub repo, or drop a project zip or bare .kicad_pcb. You get top,
bottom, and angled 3D PNGs with silkscreen. Everything renders in this tab.
USBMCU○
Drop a .zip or .kicad_pcb here
Zips are searched for the project's board. Files stay in your browser.
Parse. The .kicad_pcb S-expression file is read directly: outline, copper, mask openings, silkscreen, drills, footprints.
Composite. Each side becomes a texture: mask over copper, exposed pads in the board's finish, silkscreen on top, holes cut through.
Extrude. The outline is triangulated into a slab. Footprints get their real KiCad library model (WRL meshes, converted once at the edge and cached in R2), project models from the repo (WRL directly, STEP through OpenCascade in a worker), or a box sized from the fab outline.
Rasterize. A z-buffer renderer with supersampling draws each view to PNG. No WebGL, so the same code runs in the CLI.
Copy me for your agent
Hand this to Claude, Codex, or Cursor.
Paste the block into your coding agent. It downloads the right release binary for the
machine it is on and renders your KiCad project. Also served as plain text at
/agent.md.
# PCB23D for agents — render a KiCad board to 3D PNGs
You are rendering a KiCad PCB to PNG images (top, bottom, angled 3D). Use the `pcb23d`
single-binary CLI. It has no dependencies and runs offline.
## 1. Download the binary for this machine
Releases: https://github.com/TensorFleet/pcb23d/releases/latest
Asset names: pcb23d-linux-x64, pcb23d-linux-arm64, pcb23d-darwin-x64, pcb23d-darwin-arm64, pcb23d-windows-x64.exe
Linux/macOS:
os=$(uname -s | tr '[:upper:]' '[:lower:]') # linux | darwin
arch=$(uname -m); case "$arch" in x86_64) arch=x64;; aarch64|arm64) arch=arm64;; esac
curl -fsSL -o pcb23d "https://github.com/TensorFleet/pcb23d/releases/latest/download/pcb23d-${os}-${arch}"
chmod +x pcb23d
./pcb23d --version
Windows (PowerShell):
Invoke-WebRequest https://github.com/TensorFleet/pcb23d/releases/latest/download/pcb23d-windows-x64.exe -OutFile pcb23d.exe
.\pcb23d.exe --version
Alternative without a binary (needs Bun or Node 18+): `bunx pcb23d --help` or `npx pcb23d --help`
are not available; instead `bun add pcb23d` and call `renderPcb()` from TypeScript.
## 2. Pass in the KiCad project
Input is either a `.kicad_pcb` file or a `.zip` of the whole KiCad project. Zips are searched
for the board; the `.kicad_pro`'s sibling `.kicad_pcb` wins, backups are ignored.
./pcb23d path/to/project.zip --out renders --json
./pcb23d path/to/board.kicad_pcb --out renders --views top,bottom,angle
./pcb23d https://github.com/owner/repo --out renders --json # public GitHub repo, tree URL, or owner/repo
Outputs land in `--out` as `<input-stem>-<view>.png` (transparent background by default).
`--json` prints a summary to stdout: board size in mm, layer count, footprint/track/via counts,
and the path of every PNG written. Exit code 0 on success, 1 if any input failed, 2 for bad flags.
## 3. Useful options
--views top,bottom,angle,angle-bottom,front,side # or: all
--views hero=45/30 --views low=20/12/ortho # custom azimuth/elevation[/persp|ortho]
--width 1600 --height 1200 --supersample 2 # image size, anti-aliasing 1-4
--bg "#ffffff" # or transparent (default)
--mask black --finish silver --silk white # override board colours
--no-components # bare board, no bodies
--no-models # boxes instead of KiCad library 3D models (offline)
Components use the KiCad library's 3D models (pcbto3d.com's pre-seeded mesh cache, then GitHub
or GitLab, cached under ~/.cache/pcb23d) and EasyEDA models for footprints tagged with an LCSC
part number (--no-lcsc to skip). Project-local models (${KIPRJMOD}) are read from the project: .wrl/.wrz directly, .step via
OpenCascade WASM (downloaded once, 7 MB, to ~/.cache/pcb23d/occt; --no-step skips it).
Footprints with no usable model are drawn as boxes sized from their fab outline. Only the outer copper layers are visible. GitHub inputs use the anonymous
API (60 requests/hour) unless GITHUB_TOKEN is set.
Library & CLI
Same engine, three ways.
The renderer is the pcb23d npm package. The CLI is that package compiled by Bun
into one binary per platform.