Skip to main content
Use this guide to install 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 board uses to initialize a repository.
  • KiCad 10.x for layout generation and editing. pcb build does not require KiCad.

1. Install pcb

Run the installer for your platform:
Default install directories are $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:
For source builds, see the repository README.

2. Create a board repository

Replace the example repository URL with the project repository URL:
The generated design is empty but valid. See Packages for repository structure.

3. Build the board

Validate the board source and generate its netlist:

4. Generate the layout

Generate the KiCad files without opening KiCad:
This command writes the generated board under eda/, the path configured by the generated Board() call.

Toolchains

pcb manages the compiler, stdlib, and sidecars as one toolchain. Workspace commands use the pcb-version lane in pcb.toml, such as "0.4"; pcb auth uses latest stable instead. Lanes update to the newest matching release. To select an exact release or nightly for one invocation, use an override:
Exact releases and nightly are overrides, not valid pcb-version manifest values. Use pcb toolchain --help for installation, repair, and pruning, and pcb self update to update the launcher and managed channels.

Service accounts and CI

Run pcb auth login --service-account interactively, or import JSON containing client_id and client_secret:
For CI, supply 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 pcb after installation, restart the shell or source the environment file printed by the installer.
  • If pcb layout cannot find KiCad, install kicad-cli and pcbnew. Set KICAD_CLI or KICAD_PCBNEW if either executable is outside its default platform path.
  • Installers register diode:// links for opening Resin designs in KiCad. A .kicad_pro opens the project manager: edit the board and schematic sheets there and keep the manager open while editing. pcb syncs changes to KiCad sources, library tables, design rules and STEP/VRML models under the project directory back to the sandbox, including additions and deletions. Files referenced outside that directory are not downloaded. Closing the manager completes the final sync and releases the sandbox lock. Standalone board and sheet targets still open their respective editors. If you resume after an interruption and both copies of a file changed, pcb stops and prints the local backup path. Close KiCad, open the sandbox version, and reconcile your edits from the backup. If opening fails, check ~/.pcb/pcb-launcher.log (Windows: %USERPROFILE%\.pcb\pcb-launcher.log). ./install.sh --local registers the local toolchain; release installation or pcb self update restores latest.
  • Run pcb help or pcb help <command> for the complete CLI reference.