Skip to content

Cirkitly/picoplace

Repository files navigation

picoplace: CLI for PCB Layout Synthesis

picoplace is a command-line utility for building and synthesizing PCB layouts.

Warning

picoplace is under active development. Expect breaking changes and rapid iteration.


Table of Contents


Installation

From Source

# Clone the repository
git clone https://github.com/Cirkitly/picoplace.git
cd picoplace

# Install using the provided script
./install.sh

Note

Package manager installation coming soon.

Requirements

  • KiCad 9.x for layout generation and visualization.

Quick Start

1. Create a Design File

Write a file called blinky.zen:

load("@stdlib/properties.zen", "Layout")

Resistor = Module("@stdlib/generics/Resistor.zen")
Led = Module("@stdlib/generics/Led.zen")

vcc = Net("VCC")
gnd = Net("GND")
led = Net("LED")

Resistor("R1", value="1kohm", package="0402", P1=vcc, P2=led)
Led("D1", color="red", package="0402", A=led, K=gnd)

Layout("layout", "layout/")

2. Build Your Design

picoplace build blinky.zen

3. Generate Layout

picoplace layout blinky.zen

4. Open in KiCad

picoplace open blinky.zen

Core Concepts

Same as original: Components, Nets, Interfaces, Modules, config(), and io().

(Refer to original pcb README for full code examples.)


Command Reference

picoplace build

Build and validate .zen designs.

picoplace layout

Generate layout files from .zen files.

picoplace open

Open generated .kicad_pcb files in KiCad.

picoplace fmt

Format .zen files with buildifier.

picoplace lsp

Start the Language Server for editor integration.


Project Structure

my-board/
├── main.zen
├── components/
│   └── resistor.zen
├── modules/
│   └── power_supply.zen
├── eda/
│   ├── symbols/
│   └── footprints/
├── layout/
│   └── main.kicad_pcb

Architecture

picoplace is a modular Rust workspace:

  • picoplace-lang – Core language support (Zener, Starlark runtime, diagnostics)
  • picoplace-cli – CLI for build, layout, fmt, etc.
  • picoplace-starlark-lsp – LSP server for Zener files
  • picoplace-ui – Terminal UI components (spinner, progress)
  • picoplace-wasm – WebAssembly bindings
  • picoplace-netlist – Netlist and schematic representation
  • picoplace-kicad-exporter – KiCad-compatible layout and symbol exporters
  • picoplace-buildifier – KiCad file parsing, formatters
  • picoplace-sexpr – S-expression support for KiCad file formats
  • picoplace-core – Shared types and utilities

Examples

For full examples, see the /examples directory in the repo.

  • ✅ LED blink circuit
  • ⚙️ Voltage regulator module
  • 🧠 Complex system with MCU, sensor, and flash

Third-Party


About

picoplace: CLI for PCB Layout Synthesis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published