pcb CLI

Diode's CLI for circuit boards written in Zener: builds a schematic from code, manages dependencies and generates KiCad layout files, with five skills

  • 473 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The installer runs through `curl | bash` and the launcher later downloads toolchains
  • The `pcb build`, `pcb layout` and `pcb sim` commands create files and run external programs, KiCad and ngspice
All reasons and checks

diodeinc/pcb

Install

Manual install

curl -fsSL https://raw.githubusercontent.com/diodeinc/pcb/main/install.sh | bash

For macOS, Linux and WSL2. On native Windows run `install.ps1` through PowerShell.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The installer runs through `curl | bash` and the launcher later downloads toolchains
  • The `pcb build`, `pcb layout` and `pcb sim` commands create files and run external programs, KiCad and ngspice

This is third-party code. Review the repository files before installing.

What it does

`pcb` is a command line for boards written in Zener. It is a Starlark-based language in which you define the schematic, typed electrical connections, physical parts and sourcing. `pcb build blinky.zen` builds the project and checks the schematic, `pcb layout blinky.zen` generates KiCad layout files, and the package manager pulls modules and components from the registry. The repository holds a `skills/` folder with five agent skills. `zener-language` teaches reading and editing Zener and finding package sources through `pcb list -m -json`. `registry-search` looks for ready modules and components before new ones are written, and `librarian` creates and repairs packages in the registry. `spice-sim` adds an ngspice testbench and runs it with `pcb sim`, and `importing-kicad-projects` brings an existing KiCad project into the repository. The installer sets up the `pcb` launcher, which downloads the toolchain a project selects. KiCad 10.x is required for layouts and not for building schematics. The README example is a blinking LED: a 1 kΩ resistor in a 0402 package and a red LED across power and ground.

Who it is for. Electronics engineers who want to keep circuit boards as code in git and hand schematic edits and component search to agents.

Good fit when

  • A board is easier to describe as text so changes read well in a pull request and build in CI
  • An agent has to pick a ready module or component from the registry instead of drawing a block from scratch
  • An existing KiCad project has to move into a repository and continue as code
  • A power or protection stage deserves a check in ngspice before it goes to manufacturing
  • A new component is packaged with a symbol, footprint and sourcing data

Not a fit when

  • The board is designed by hand in the KiCad graphical editor and a move to a text language is not planned
  • You want full layout work in this tool: `pcb layout` produces files for KiCad and routing happens there
  • The team works on native Windows with no fallback: support there is experimental and WSL2 is recommended
  • The calculation needs a simulation longer than five seconds: `pcb sim` stops ngspice on a timer

Example request

Find a ready buck converter module in the registry and wire it into blinky.zen

Limitations

The README does not describe installing the skills into an agent: you take the `skills/` folder from the repository by hand. Layouts need KiCad 10.x. Native Windows support is experimental and the author advises WSL2. The `spice-sim` skill runs `ngspice` in batch mode and stops it after 5 seconds, so a testbench must stay focused. The full language and package reference lives at `docs.pcb.new`; the README gives only a short example.

How to disable. Remove the `pcb` launcher and the skill folders you copied. Your project files (`.zen` and the `layout/` directory) stay with you and are deleted separately.

FAQ

Do I need KiCad to build a schematic?

`pcb build` does not need KiCad. It is required for `pcb layout`, which generates layout files, and it must be version 10.x.

How do I install pcb on Windows?

On native Windows run `powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/diodeinc/pcb/main/install.ps1 | iex"` in PowerShell. Support is experimental; if you hit problems, use WSL2 and the regular Linux script.

How does a project pick the tool version?

The launcher downloads the toolchain according to the project's settings. In the README example a `[workspace]` block with `pcb-version = "0.4"` sits in a comment at the top of the `.zen` file.

How do I run a circuit simulation?

Create a testbench such as `testbench/test_startup.zen` and run `pcb sim -v` on that file. The `spice-sim` skill advises one testbench per behavior: startup, enable, a protection threshold or a current limit.

How do I bring a project over from KiCad?

The `importing-kicad-projects` skill imports a KiCad project and schematics into the current repository. It preserves the original source and puts the result at the repository root, so the original stays for comparison.

Discussion

No questions or reviews yet.

CLI tools

The kct CLI and a Python library for agents: parse and edit KiCad schematics and PCBs with JSON output, run DRC and ERC without a running KiCad

CLIExtended access73Repository stars

Skills for coding agents that analyze KiCad schematics and boards, catch design mistakes and prepare boards for fabrication

PluginExtended access1.6KRepository stars

Seeed Studio's MCP server reads KiCad schematics and boards, traces pin-level connections and runs ERC and DRC through kicad-cli.

MCP serverExtended access179Repository stars

MCP server for PCB design in KiCAD 10: schematic, routing, checks and manufacturing prep through an agent

MCP serverExtended access1.5KRepository stars

A skill that walks an agent from a hardware idea to a PCB, verifies routing and stops before the order is paid.

SkillBroad access179Repository stars

An MCP server for PCB design in KiCAD: the agent places components, routes connections, runs DRC and prepares manufacturing files

MCP serverExtended access3.2KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
pcb (this card)no473
KiCAD MCP Servernonot required3,185an MCP server through which an agent places components and routes connections inside KiCad, while `pcb` describes the board as Zener code
kicad-toolsno73a CLI and library for parsing and editing finished KiCad schematics and boards, while `pcb` builds the schematic from code

README in short

The description briefly introduces `pcb` and Zener and links to the documentation. Install steps for macOS, Linux, WSL2 and Windows follow, then the blinking LED example, building from source in Rust, licensing and credits to KiCad and starlark-rust.

README badge

Report a problem

Foxx AIpcb
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.