Skip to the content
2 layers41.6 × 43.6 mmNew and improved zefir btn, the printed circuit board in 3D

New and improved zefir btn

brunostjohn/flatmaxxing2

a tiny little CLI that helps you make all the files needed to manufacture PCBs at home

Size
41.6 × 43.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
56
Nets
50
Pads
203
Tracks, vias
420, 128
Pours
4
Routed
Yes
KiCad
KiCad \"9.0\ (file 20241229)
Created
20 Jun 2026
Updated
5 Jul 2026

Overview

New and improved zefir btn is an open-source printed circuit board by brunostjohn, from the brunostjohn/flatmaxxing repository on GitHub, published under the WTFPL licence. It is a 2-layer board of 41.6 × 43.6 mm with 56 parts on 50 nets, routed with 420 tracks and 128 vias.

It is built around the ESP32-C3, W25Q32JVZPIQ and BQ24074RGTR, with the USBLC6-2P6 among its other parts. Its parts include 19 capacitors, 14 resistors, 5 ICs, 2 connectors and 2 inductors. It belongs with the ESP32 and RISC-V boards of this library.

Main components

4

README

README.md

flatmaxx

Turn a KiCad PCB into a complete CNC, laser, and electroplating job set with one command.

Runtime: Bun Effect v4 TypeScript Native: Rust Platform: macOS Build: single binary

flatmaxx takes a finished KiCad board and drives your entire home-fab bench for you: it generates Gerbers and drill files, plans isolation milling and non-copper-clearing G-code with FlatCAM, sorts every hole into the bit you actually own, prints solder-mask negatives and cuts solder-paste stencils on the xTool machines, drills plated/non-plated holes and cuts the board outline on a Makera CNC, and even works out the electroplating bath recipe. All of it runs from a single command behind a live terminal UI.

[!NOTE] This tool is built around one specific bench: a Makera Carvera (Air) CNC, xTool M1 Ultra / F1 Ultra lasers, and a DIY copper electroplating setup. It's shared as-is. Nothing stops you using it, but you'll want to retune the config to your own hardware, tools, and chemistry before trusting the output to a machine.

Contents

⚠️ No support: use entirely at your own risk

[!CAUTION] This project is provided strictly AS IS, with NO SUPPORT of any kind.

  • No tech support. Issues opened to ask for help, setup assistance, or troubleshooting will not be answered and may be closed without comment.
  • No bug guarantees. Even legitimate bug reports may never get a response or a fix. Don't assume one is coming.
  • No warranty. Nothing here is promised to work, to keep working, or to be safe for your hardware, your materials, or you. You run it at your own risk.

This is a hobby project I share for free in my spare time. I have a full-time job and a life, and I'm not interested in spending my free time doing unpaid tech support; I don't want my hobby to become my job. If that's a problem for you, don't use this.

Pull requests with fixes are welcome, but I make no commitment to review, respond to, or merge them.

Installation

flatmaxx ships as a single, codesigned macOS arm64 (Apple Silicon) binary. Pick whichever install path you prefer.

Homebrew

sh
brew tap brunostjohn/flatmaxxing https://github.com/brunostjohn/flatmaxxing
brew trust flatmaxx
brew install flatmaxx

Upgrade later with brew upgrade flatmaxx.

Install script

Downloads the latest release into ~/.local/bin, checksum-verified, using only standard macOS tools:

sh
curl -fsSL https://raw.githubusercontent.com/brunostjohn/flatmaxxing/main/scripts/install.sh | sh

If ~/.local/bin isn't on your PATH, the script prints the exact line to add. Pin a version with FLATMAXX_VERSION=1.2.3, or change the target with FLATMAXX_INSTALL_DIR=.... Installed this way, flatmaxx update upgrades in place (see Updating).

From source

flatmaxx builds with Bun, the only thing you need.

sh
git clone https://github.com/brunostjohn/flatmaxxing flatmaxx
cd flatmaxx
bun install
bun run build:native   # compile the native macOS accessibility module

Run it straight from source:

sh
bun src/index.ts <kicad-project>

Or build the standalone, codesigned binary at dist/flatmaxx:

sh
bun run build
./dist/flatmaxx <kicad-project>

Updating

If you installed via the script (or any binary in a writable location), upgrade in place:

sh
flatmaxx update           # check for and install the latest release, with a progress bar
flatmaxx update --check   # only report whether a newer release exists

Homebrew installs are managed by brew; run brew upgrade flatmaxx instead.

Features

  • One command, full pipeline: flatmaxx <project> runs every stage from board validation to machine-ready files.
  • Isolation + non-copper clearing: FlatCAM-driven V-bit isolation routing and pocket clearing, exported as Carvera G-code per side.
  • Drill categorization: parses the Excellon output, matches every hole to a bit you actually own, and warns on holes too small to machine.
  • Solder mask & paste stencil: automates xTool Studio over the Chrome DevTools Protocol to import geometry and set power, speed, and passes per device.
  • Drilling & edge cut: automates MakeraCAM via macOS Accessibility to drill plated/non-plated holes and cut the board outline with retaining tabs.
  • Electroplating report: computes bath dimensions, current density, timing, and chemistry from your board bounds and recipe.
  • Design rule checks: isolation feasibility (DRC) and drill machinability gates that can warn or hard-fail before any machine moves.
  • Inline board preview: renders the board image right in your terminal (kitty / iTerm2 / sixel).
  • Composable TOML config: project + user config with extends inheritance, deep merge, and per-run CLI overrides.

How it works

flatmaxx runs an ordered pipeline. Each stage feeds the next; you can disable the ones you don't need from config. If you don't have a Mac, or you want to know what each machine actually does to the board, HOW_THIS_WORKS.md walks the whole physical process with real parameters so you can replicate it with your own tools.

#StageConsumesProducesDriven via
1Preflightconfigsoftware & permission checkdoctor checks
2Validate board.kicad_pcbmanufacturability reportkicadts
3KiCad outputs.kicad_pcbGerbers, drills, SVG, PNG + inline previewkicad-cli
4Categorize drillsExcellonper-bit drill filesExcellon parser
5Isolation DRCGerbersclearance violationsFlatCAM (headless)
6CNC jobsGerbersisolation + NCC G-code (Carvera)FlatCAM (headless)
7Alignment drills.kicad_pcbregistration holesExcellon
8Edge-cut DXFs.kicad_pcb*-PTH_EdgeCuts.dxf, *-Final_EdgeCuts.dxfDXF generator
9Electroplating reportboard bounds + recipebath dimensions & timing—
10xTool projectsmask SVG + stencil DXFsolder mask + paste stencil jobsxTool Studio (CDP)
11Plated holesPTH DXF + drillsdrilling + plating outline G-codeMakeraCAM (AX)
12Final cutFinal DXF + drillsnon-plated drilling + edge contourMakeraCAM (AX)

Prerequisites

[!IMPORTANT] macOS only. The laser and CNC stages rely on native macOS Accessibility automation and AppleScript, so flatmaxx does not run on Linux or Windows.

External software (only the stages you enable need their tools):

ToolNeeded forDefault location
KiCad (with kicad-cli)always (board parsing & exports)/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli
FlatCAMisolation DRC + CNC G-codeflatcam (on PATH)
xTool Studiosolder mask + paste stencil/Applications/xTool Studio.app
MakeraCAMdrilling + edge cut/Applications/MakeraCAM.app

The xTool and MakeraCAM stages also require macOS Accessibility permission (System Settings → Privacy & Security → Accessibility) and a Chrome DevTools port open for xTool Studio (127.0.0.1:9333 by default).

[!TIP] Run flatmaxx doctor <project> before your first real build. It checks every required executable, app, and permission for your enabled stages and tells you exactly what's missing, without touching a machine.

Usage

Initialize a config in your KiCad project, then build:

sh
flatmaxx init                 # create flatmaxxing.toml for the current project
flatmaxx ~/projects/myboard   # run the full pipeline

Commands

CommandWhat it does
flatmaxx <project>Creates CNC files from a KiCad project (same as build).
flatmaxx build <project>Explicit form of the root command.
flatmaxx initCreates a flatmaxxing.toml config for the current project.
flatmaxx configOpens an interactive editor for project config overrides.
flatmaxx config --userEdits the shared ~/flatmaxxing.user.toml.
flatmaxx skills install [--global]Installs the flatmaxxing agent skill into the project (or for the current user with --global).
flatmaxx doctor <project>Checks required software and permissions; generates nothing.
flatmaxx validate <project> --fixRuns validation only, without launching FlatCAM, xTool Studio, or MakeraCAM.
flatmaxx clean <project> [--dry-run]Removes (or lists) generated output folders.
flatmaxx update [--check]Updates flatmaxx in place to the latest GitHub release (script / binary installs; use brew upgrade for Homebrew).

Examples

sh
# Use an explicit config file
flatmaxx build . --config flatmaxxing.toml

# Override any config value for a single run
flatmaxx build . --set cnc.isolation.feedRate=150

# Point at a custom kicad-cli executable
flatmaxx ~/projects/myboard -k /opt/kicad/kicad-cli

# Check the board and config without launching any apps
flatmaxx validate . --fix

# See what clean would delete, without deleting it
flatmaxx clean . --dry-run

Configuration

flatmaxx reads a flatmaxxing.toml in the project, layered over a shared ~/flatmaxxing.user.toml. Configs can pull in others via extends, are deep-merged (later wins), and any value can be overridden per run with --set path=value / --unset path.

Rather than hand-writing the whole file, run flatmaxx init to scaffold one, then flatmaxx config for an interactive editor. Every option, with its default value and allowed values, is documented in flatmaxxing.example.toml. A representative slice covering your real tooling and isolation parameters:

toml
extends = ["~/flatmaxxing.user.toml"]

[board]
file = "myboard.kicad_pcb"   # auto-detected if omitted

[cnc]
availableDrills = [
  { diameter = 0.4 }, { diameter = 0.5 }, { diameter = 0.7 },
  { diameter = 0.8 }, { diameter = 1.0 }, { diameter = 1.2 },
]
availableMills = [
  { diameter = 0.7 }, { diameter = 1.0 }, { diameter = 1.5 },
]

[cnc.isolation]
feedRate = 120
spindleSpeed = 15000
zCutDepth = 0.05
tool = { type = "vbit", diameter = 0.14, angle = 60 }
passes = 3
overlap = 60
Top-level config sections

dependencies (tool paths) · paths (output folders) · board · alignmentDrills · electroplating (container + recipe) · solderMask · stencil · drills · place · cnc (isolation, nonCopperClearing, clearance, backside, drilling, availableDrills, availableMills) · xtool · makeracam · validation (ranges + feasibility gates).

Output layout

A full run writes machine-ready files into your project (folders are configurable under [paths]):

text
myboard/
├── gerbers/    # KiCad Gerber + edge-cut DXF exports
├── drills/     # categorized Excellon drill files (one per bit)
├── gcodes/     # isolation + non-copper-clearing G-code (Carvera)
├── dxf/        # board outline DXFs
├── png/        # rendered board & mask images
├── svg/        # vector solder-mask art
├── xtool/      # xTool Studio projects (solder mask + stencil)
└── cnc/        # MakeraCAM projects + exported drilling/contour G-code

The electroplating bath report (dimensions, current density, timing, chemistry) is generated alongside.

Terminal experience

flatmaxx runs on an Ink UI: a live, hierarchical task list shows every stage and substep with spinners, progress bars, and inline error detail. When your terminal supports it (kitty, iTerm2, or sixel), the rendered board image is drawn directly in the scrollback so you can eyeball the layout before any machine moves.

Development

sh
bun run dev         # build native + run against the bundled testdir/ project
bun test            # run the test suite
bun run typecheck   # type-check with tsgo
bun run format      # format with Biome

The codebase is built on Effect v4 and follows the conventions in CLAUDE.md; the native macOS accessibility bindings live in the Rust workspace under native/.

Parts

56
QtyValueFootprintReferences
510kResistor_SMD:R_0805_2012MetricR11, R12, R13, R14, R15
51uFCapacitor_SMD:C_0805_2012MetricC1, C12, C13, C16, C17
4100nFCapacitor_SMD:C_0805_2012MetricC8, C9, C10, C11
410uFCapacitor_SMD:C_0805_2012MetricC4, C5, C6, C7
3100kResistor_SMD:R_0805_2012MetricR5, R6, R7
3FiducialFiducial:Fiducial_1mm_Mask2mmFID1, FID2, FID3
222RResistor_SMD:R_0805_2012MetricR9, R10
24.7uFCapacitor_SMD:C_0805_2012MetricC2, C3
25.1kResistor_SMD:R_0805_2012MetricR1, R2
2C_SmallCapacitor_SMD:C_0805_2012MetricC14, C15
11.8nHInductor_SMD:L_0805_2012MetricL2
124nHInductor_SMD:L_0805_2012MetricL1
13.1kResistor_SMD:R_0805_2012MetricR3
13.9pFCapacitor_SMD:C_0805_2012MetricC19
13v3TestPoint:TestPoint_Pad_1.0x1.0mmTP3
140MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
15.3pFCapacitor_SMD:C_0603_1608MetricC18
15.9kResistor_SMD:R_0805_2012MetricR4
1500mAFuse:Fuse_1206_3216MetricF1
1Antenna_ShieldESP_Antenna:ESPRESSIF_ESP32_MIFA_2.4GHz_RightAE1
1BQ24074RGTPackage_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mmU1
1BootTestPoint:TestPoint_Pad_1.0x1.0mmTP1
1Conn_01x03_SocketConnector_JST:JST_PH_B3B-PH-K_1x03_P2.00mm_VerticalJ2
1ESP32-C3Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mmU2
1GNDTestPoint:TestPoint_Pad_1.0x1.0mmTP2
1LEDLED_SMD:LED_1206_3216MetricD1
1ResetTestPoint:TestPoint_Pad_1.0x1.0mmTP6
1SW_Push_DualTS04-66-95-BK-100-SMT:SW_TS04-66-95-BK-100-SMTSW1
1USBLC6-2P6Package_TO_SOT_SMD:SOT-666U4
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_G-Switch_GT-USB-7010ASVJ1
1VBattTestPoint:TestPoint_Pad_1.0x1.0mmTP5
1VSysTestPoint:TestPoint_Pad_1.0x1.0mmTP4
1W25Q32JVZPPackage_SON:WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4.3mmU3
1XC6206PxxxMRPackage_TO_SOT_SMD:SOT-23-3U6

More from brunostjohn/flatmaxxing

1
  • 2 layers42.5 × 25 mmBad origin, the printed circuit board in 3D

    Bad origin

    brunostjohn/flatmaxxing

    a tiny little CLI that helps you make all the files needed to manufacture PCBs at home

    19 parts2WTFPL

Similar boards

  • 2 layers126 × 39.5 mmPot sensor, the printed circuit board in 3D

    Pot sensor

    Manolets/potsensor_schematics

    This repo contains the KiCad project files for a battery powered plant sensor.

    55 parts
  • 4 layers59.2 × 29.2 mmESP32-Eink, the printed circuit board in 3D

    ESP32-Eink

    Outdatedcandy92/ESP32-Eink

    A tiny E-Ink display driver board featuring an ESP32-C3 and an onboard battery charging IC. It wirelessly drives a 2.13-inch E-Ink display and is designed for portable, ultra-low-power projects such as status displays…

    83 partsCERN-OHL-W-2.0
  • 4 layers21 × 51 mmPico2350-W ProLite R2, the printed circuit board in 3D

    Pico2350-W ProLite R2

    zeankundev/boards

    A collection and an archive of KiCad projects I made. Contains projects from 2023 - 2024.

    83 parts1
  • 2 layers69.9 × 50.8 mmMusicControllerV3, the printed circuit board in 3D

    MusicControllerV3

    Lc9real/MusicControllerV3

    Music Controller V3

    48 parts
  • 4 layers59.4 × 29.8 mmESP32-C3-Low Power IoT Plant Node, the printed circuit board in 3D

    ESP32-C3-Low Power IoT Plant Node

    mohamed-sebbar/ESP32-C3-Low-Power-IoT-Plant-Node

    Hardware redesign of a smart irrigation system featuring a custom 4-layer ESP32-C3 PCB with RF-aware layout, battery management, environmental sensing, and automated irrigation control.

    67 partsCERN-OHL-W-2.0
  • 4 layers35.3 × 46.2 mmProjectKicad, the printed circuit board in 3D

    ProjectKicad

    SatriyoJati/fishfeeder-schematics

    Schematic and PCB design of FishFeeder

    85 parts
  • 4 layers40.8 × 20 mmEsp, the printed circuit board in 3D

    Esp

    souptik-samanta/esp32c3

    A compact, custom-designed ESP32-C3 development board with USB-C connectivity, onboard antenna, and a clean PCB layout.

    48 parts

Questions

How big is the New and improved zefir btn PCB?

It measures 41.6 × 43.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the New and improved zefir btn use?

56 parts, built around the ESP32-C3, W25Q32JVZPIQ, BQ24074RGTR and USBLC6-2P6. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the New and improved zefir btn KiCad files?

From the brunostjohn/flatmaxxing repository on GitHub, at the commit this page was made from: the board is testdir/new-and-improved-zefir-btn.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the New and improved zefir btn design in my own project?

Its repository publishes it under the WTFPL licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).