On This Page (11)
altium-monkey & altium-cruncher
altium-monkey is a Python library for reading, authoring, compiling, and rendering Altium Designer files directly from automation. altium-cruncher (acr) is the companion command-line application built on altium-monkey and distributed from the same repository as a separate PyPI wheel.
Build the Monkey-themed static HTML site locally at any time with uv run python tools/build_docs.py (or --serve).
1. Getting Started & Core Patterns
- Installation & Packages — installing
altium-monkey(library) andaltium-cruncher(acrCLI) withuvorpipacross Python 3.12–3.14 - Core API Patterns — three abstraction tiers (turnkey CLI vs. high-level workflows vs. low-level document access and mutation),
ObjectCollectionownership rules, and units - Asset & Library Extraction — high-level
asset_inventory(...), single-asset extraction, focused embedded PCB assets, and library split/merge workflows - Text & Font Rendering — PCB Stroke/TrueType/Barcode flattening plus Schematic Paint IR Skia/HarfBuzz/GDI+ text and bundled fallback fonts
- Known Limitations & Release Boundaries — format support matrix, API/variant/OutJob boundaries, headless Linux notes, and Python/platform coverage
2. Domain Guides
PCB Domain
- PcbDoc — board authoring, mutation, custom pads, unions, embedded board arrays, and serialization boundaries
- PCB Layers & Layer Stacks — Altium's four layer ID schemes,
PcbLayervs.PcbLayerRef,PcbLayerContext, V8/V9 Board6 stack precedence,.stackup,.stackupx, and V7 authoring gates - PcbLib — PCB footprint libraries, pads, vias, 3D models, and footprint SVG rendering
- Fab & FabView — unified PCB fabrication layer for Gerber X2/X1, NC drill, IPC-2581B, PCB SVG, Pick & Place, PCB BOM, panels, custom
FabViewqueries, and planned ODB++ support - Virtual Fab Layers — board-derived cutouts, Pin 1 markers, diode polarity glyphs, passive symbols (capacitors, inductors, resistors), 3D assembly outlines, fitted designators, pad designator labels, orthogonal visibility &
VirtualLayerOptions, and mechanical-layer baking
Schematic Domain
- SchDoc — schematic documents,
ObjectCollectionqueries, mil authoring, templates, embedded images, and symbol extraction - SchLib — schematic symbol libraries, merging, splitting, and SVG
- Schematic Rendering & Paint IR — Paint IR A0 display lists, SVG/PNG rendering, editor views, automatic junctions, and legacy GOTIR migration
Projects, Design & Multi-Board
- PrjPcb — project containers, parameters, variants, document reachability, and OutJobs
- AltiumDesign & Compiled Design — project compilation (
design.b0vs. C0AltiumCompilation/AltiumCompiledView), compiled schematic graphs, netlists, BOM, and PnP - Multi-Board Systems — experimental read-only
.PrjMbd,.MbsDoc, cross-board system netlists, andAltiumSystemC0 compilation & scoped schematic graphics - IntLib — integrated library extraction and transactional authoring
Draftsman & Desktop Automation
- Draftsman — experimental
.PCBDwfdocument workflows - Launcher & OutJobs — Windows
X2.EXEautomation,.OutJobauthoring,AltiumOutJobRunner, and operational limitations
3. CLI (altium-cruncher / acr)
- CLI Quick Start & Configuration —
acr,altium-cruncher,ad,fab.jsonc,vdoc.jsonc,pcb.svg.config,toon.config,pcb-layer-step.jsonc, andbom.config - Fabrication & Outputs —
acr fab,gerbz,ipc2581,vdoc,bom,pnp,jlc, andpcb-layer-step - Rendering & Design Review —
acr pcb-svg,toon,sch-svg,sch-ir,svg, anddesign(dr) - Monkey Change Orders (MCO) — declarative JSONC CAD automation across 38 typed operations (
acr mco run,init,list) - Full Command Reference — complete catalog of every
altium-crunchercommand across compilation, libraries, authoring, change orders, and desktop automation
4. Examples & Python API Reference
- Examples Showcase — runnable Python recipes indexed from
examples/manifest.tomlwith filterable cards and inline SVG previews in the HTML site - Python API Reference — exact class signatures, methods, properties, enums, and docstrings auto-generated from the declared Python package surface (
tools/build_docs.py->api/index.html)
5. Output & Wire Contracts
- Format Contracts — stable output and wire guarantees for Gerber, SVG, and Schematic JSON Interop
- JSON Schemas & TypeSpec — unified TypeSpec rationale, wire vs. adapter boundary, revision scheme (
a0/b0/c0), and all 28 Draft 2020-12 JSON Schemas
6. Altium Output Differences (AOD)
- Altium Output Differences — standalone
AOD-nnnregister of every known difference betweenaltium-monkey's fabrication outputs and Altium Designer, plus options to reproduce Altium's form
7. Releases & Style
- Release Notes (and latest summary in RELEASE_NOTES.md) — per-version changelog archive
- Style Foundation — Monkey Kit CSS theme, Altium Stroke webfonts, and HTML site build guide