pcb, create a board repository, validate its Zener
source, and generate a KiCad layout.
Requirements
- macOS or Linux. Windows support is experimental; use WSL2 for the most stable Windows environment.
- Git, which
pcb new boarduses to initialize a repository. - KiCad 10.x for layout generation and editing.
pcb builddoes not require KiCad.
1. Install pcb
Run the installer for your platform:
$HOME/.local/bin on Unix and
%USERPROFILE%\.pcb\bin on Windows; override with PCB_INSTALL_DIR.
The installer adds pcb to your user PATH when necessary. Verify installation:
2. Create a board repository
Replace the example repository URL with the project repository URL:3. Build the board
Validate the board source and generate its netlist:4. Generate the layout
Generate the KiCad files without opening KiCad:layout/.
Toolchains
pcb manages the compiler, stdlib, and sidecars as one toolchain. Workspace
commands use pcb-version; pcb auth uses latest stable instead. An explicit
pcb +<version> <command> overrides either selection.
Service accounts and CI
Runpcb auth login --service-account interactively, or import JSON containing
client_id and client_secret:
DIODE_API_URL, DIODE_CLIENT_ID, and DIODE_CLIENT_SECRET
through the CI secret store. PCB renews access tokens automatically.
Troubleshooting
- If the shell cannot find
pcbafter installation, restart the shell or source the environment file printed by the installer. - If
pcb layoutcannot find KiCad, installkicad-cliandpcbnew. SetKICAD_CLIorKICAD_PCBNEWif either executable is outside its default platform path. - Installers register
diode://links for opening registry layouts in KiCad. If opening fails, check~/.pcb/pcb-launcher.log(Windows:%USERPROFILE%\.pcb\pcb-launcher.log)../install.sh --localregisters the local toolchain; release installation orpcb self updaterestoreslatest. - Run
pcb helporpcb help <command>for the complete CLI reference.