Back to Browse

Eitri MCP Server

Developer ToolsUse Caution4.6MCP RegistryLocal
Free

Server data from the Official MCP Registry

Hardware design with checks on every build: CAD, harnesses, motion, pneumatics, firmware, circuits

About

Hardware design with checks on every build: CAD, harnesses, motion, pneumatics, firmware, circuits

Security Report

4.6
Use Caution4.6High Risk

eitri is a local CAD/hardware design tool whose README and code disclose its network behavior: the only automatic outbound traffic is two anonymous install and project-created counts, which can be disabled with one command, plus Anthropic API calls made with the user's own key. The main concerns are a curl-piped-to-shell installer and an os.system call that builds a shell command from file paths, which could break or be abused if a path contains quote characters. Permissions broadly match a local CAD tool, and the code shown contains no exfiltration, obfuscation, or hardcoded credentials, though the MCP server module itself was truncated and not reviewed. Supply chain analysis found 11 known vulnerabilities in dependencies (2 critical, 7 high severity). Package verification found 1 issue.

3 files analyzed · 17 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

process_spawn

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

env_vars

Check that this permission is expected for this type of plugin.

system_info

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "eitri-hardware": {
      "command": "uvx",
      "args": [
        "eitri-hardware==0.9.3"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

eitri

Use eitri inside Claude Code. One line installs it and registers the plugin:

curl -fsSL https://eitri.io/install | sh -s -- --plugin

Then run claude and ask for a machine ("design a desk robot arm with three MG996R servos and an Arduino Uno"). No account and no API key: eitri runs on your computer, and your agent runs on your own Claude Code subscription. The default combined workspace designs a whole machine and checks its CAD, mechanism, wiring, firmware and circuit against each other on every build; every check names its source.

  • macOS and Linux; Windows is untested. Codex and Cursor get the same servers, but they are untested.
  • The plugin sends two anonymous counts (install, project created) and nothing else; eitri telemetry off stops them.
  • Source-available under FSL-1.1-MIT: each release becomes MIT two years after it ships.

More about the plugin

Or the app: a local AI CAD agent on your own Anthropic API key. Describe a part in plain language; eitri models it as a parametric build123d (OpenCASCADE) model, builds it, measures it against your request, looks at it, fixes what fails, and hands you STEP / STL / 3MF / GLB files. Then keep going in a Fusion-style 3D editor in your browser, by hand or by chat: both edit the same model.

Plugin · Install the app · Limitations · License

A recorded eitri session, replayed in the editor: eitri plans the hook, writes the model, a check fails, eitri rebuilds, and all 10 checks pass

A real recorded session (the Wall racket holder demo, which anyone can replay without a key), played back in the editor: the plan, eitri writing the model, the failed builds, the fix, all 10 checks passing. 3 min 17 s of work in 18 s.

Every build comes back to the agent as a geometry report (bounding box, volume, every hole with diameter, depth and through-or-blind, thinnest wall and knife edges, interferences and clearances between parts, the model's own verify() checks) and a 4-view review image. The agent cannot "forget" to check its work: the checks are part of the build, and a failing check is fixed in the geometry, never deleted.

Quickstart

curl -fsSL https://eitri.io/install | sh
eitri

The installer (scripts/install-remote.sh; read it first if you like) installs uv if needed, then uv tool install --python 3.12 eitri-hardware: Python 3.12, the CAD kernel and Claude Code (the binary inside Anthropic's claude-agent-sdk package, downloaded from PyPI at install time; eitri does not ship it). It checks the install (eitri doctor) and tells you what to run. It downloads about 390 MB and uses about 1 GB of disk; that takes 1 to 5 minutes depending on your connection, and the first eitri doctor takes up to a minute more. No sudo: everything goes under your home folder. EITRI_NO_UV_INSTALL=1 stops it from installing uv, EITRI_NO_PATH_EDIT=1 leaves your shell profile alone. eitri opens http://127.0.0.1:8765 in your browser.

Other ways in: already have uv? uv tool install --python 3.12 eitri-hardware. From a clone: git clone https://github.com/SiddhuYen/eitri eitri && cd eitri && ./install.sh (the same installer, pointed at the checkout). The package is named eitri-hardware (the name eitri was taken on PyPI); the command and the Python import are both eitri. Installed eitri 0.5.6 or older? It was called eitri-cad: run the installer again, or uv tool uninstall eitri-cad && uv tool install --python 3.12 eitri-hardware (projects and settings are kept).

  • Update: eitri update upgrades through uv (eitri update --check only looks). eitri does not look for updates on its own; see the privacy notes below.
  • Firmware projects: eitri setup firmware installs arduino-cli and the Arduino AVR core (--esp32 adds the ESP32 core; --dry-run shows the commands first). It asks before installing arduino-cli itself.

Setting it up with an AI agent? Point it at AGENTS.md: exact commands and expected output for every step.

See it in action without a key. The home page opens with three demo projects (a 43-part V8 engine kit, a wall racket holder, a marble maze) and the real eitri sessions that made them. "Watch replay" plays a session back in the editor (the chat, every tool call, the model stepping through each revision, the checks going from red to green) with no API calls. Orbit them, edit them, export them: everything but chatting with Claude works without a key.

In your own agent: the eitri plugin

eitri also runs as one plugin inside the agent you already use (Claude Code; Codex and Cursor get the same servers, untested), on that agent's own subscription. In this mode eitri never calls Claude: your agent writes the model files and calls eitri's tools, so it needs no API key, no account and no token, and everything runs on your computer.

curl -fsSL https://eitri.io/install | sh -s -- --plugin      # install eitri and register the plugin; then run `claude`

That is the whole setup: when it prints Done. Now run claude, start Claude Code and ask for a machine ("design a desk robot arm with three MG996R servos and an Arduino Uno, powered from a 5 V supply"). If no agent app is installed yet, the installer says how to install Claude Code and to run eitri plugin install afterwards. With eitri already installed: eitri update && eitri plugin install. The plugin needs eitri 0.9.0 or newer (eitri --version; 0.9.0 adds the local combined workspace, eitri mcp --combined); its launcher says so on an older eitri.

The plugin brings two MCP servers, both on your computer, and a set of skills:

  • Combined workspace (the default): eitri-combined (eitri mcp --combined). A whole machine in one project: structure, mechanism, wiring, firmware, air and its circuit, built together with the cross-domain checks (servo torque against the arm with masses from the CAD bodies, supply current against the servos the firmware moves at once, wire gauge against that current, the board's holes against the CAD, the base against tipping over...). A project is a folder in ~/eitri-projects; the viewer shows a tab per model file. The cross-domain code is source-available (FSL) in this repository (eitri_suite/, same license).
  • Six local single domains: eitri (eitri mcp): CAD, wire harnesses, mechanisms, pneumatics, firmware and electronics, with the same checks as the app. The viewer opens in your browser at the first build and follows every rebuild.
  • Skills: design picks the workspace: combined by default, one local domain when the task clearly fits one (a bracket, an enclosure, one harness, one sketch...). It says which one it picked. combined runs the loop (reference → write files → build → fix until every check passes), plus one skill per local domain.

No hosted version. There is nothing to sign in to: eitri.io is only the install line above and a project page. An older eitri's eitri plugin login added eitri.io's hosted workspace as an eitri-io server; that service has closed, and eitri plugin install (or eitri update) removes the dead entry from every agent app.

What it does compared with the app:

eitri app (eitri)eitri plugin
Who driveseitri's own agent, on your Anthropic API keyYour agent (Claude Code; Codex and Cursor untested), on its subscription
Domainsthe six single domainsthe combined workspace and the six single domains, all on this computer
Editorthe full browser editor with chat, direct edits, demos and replaysthe same viewer and editor (a tab per file in a combined project), following your agent's builds; you chat in your agent
Reminders while checks failthe agent loop's nudgesevery tool result ends with what fails, what is unbuilt and what to do next
NetworkAnthropic's API onlynone for your designs; two anonymous counts (below)

eitri plugin status shows what is installed and eitri plugin uninstall removes the plugin from every agent app (your projects stay). Per agent: Claude Code gets a real plugin (eitri@eitri: skills /eitri:design, /eitri:combined, /eitri:cad ...); Codex gets both servers in ~/.codex/config.toml and the skills in ~/.agents/skills/eitri-*; Cursor gets both servers in ~/.cursor/mcp.json (--cursor-rules <project> also adds a project rule). In Claude Code the marketplace route (/plugin marketplace add SiddhuYen/eitri, /plugin install eitri@eitri) also works once eitri is installed (uv tool install eitri-hardware). Without eitri installed, the plugin's launcher falls back to uvx, whose first download (about 390 MB) outlasts Claude Code's 30 s server start-up limit, so the first session has no eitri tools: install eitri first.

Anonymous counts. The plugin sends two counts so we know how many people install it and how many projects they make: eitri plugin install sends {"event": "install", ...} once, and each new project sends {"event": "project_created", "kind": "combined" | "cad" | ...}, both with a random install id (a uuid in eitri's config folder, tied to no account), the eitri version, the OS and the agent app. Nothing else: no prompts, files, paths, names or errors. Turn them off with eitri telemetry off (or EITRI_TELEMETRY=off; EITRI_NO_PING=1 and DO_NOT_TRACK=1 work too). The installer and the first run say so in one line. eitri's own app (eitri, eitri web) sends neither.

Your API key, costs, privacy

eitri uses your own Anthropic API key; requests are billed to it by Anthropic. Paste it on the home page or run eitri key set (it is checked with one free API call and stored in your user config folder, readable only by you, never in a project). ANTHROPIC_API_KEY in the environment works too.

  • Cost, measured: about $0.24 per request on average across the 22-task benchmark (range $0.07 to $1.10 per task). Long design sessions cost more: the recorded V8 engine session in the demos cost $3.21.
  • API key only: eitri drives Claude Code with --bare and your key, so a Claude.ai subscription logged in on the same machine is never used. (The plugin is the other way round: there your own agent runs on its own subscription and eitri never calls Claude.)
  • Local only. The editor, the CAD kernel and your projects stay on this computer; the server answers only this machine. The only network calls the app makes on its own are to Anthropic's API, with your key (Claude Code runs with its telemetry, error reporting and update checks turned off). The plugin adds two anonymous counts, off with one command (eitri telemetry off; see the plugin section above). Fonts, icons and three.js are bundled; the pages fetch nothing from the internet.
  • Update checks only when you ask. eitri asks pypi.org for the newest version (one GET of https://pypi.org/pypi/eitri-hardware/json, nothing about you or your projects) only when you run eitri update or eitri doctor --online. If you want a reminder, eitri update --auto on lets eitri make that same request when it starts, at most once a day, and print one line when there is a newer version (eitri update --auto off turns it off again). eitri setup firmware downloads arduino-cli and board packages from Arduino and Espressif, and it only runs when you start it.

Export for 3D printing

Print in the editor's toolbar (or eitri print <project>) turns a design, assembly or not, into the files a slicer wants:

  • Decompose: every solid part is listed; bought parts (screws, nuts, washers, bearings, inserts, anything with a metal material) are listed but left out by default, with a toggle.
  • Orient: each part gets its best of six orientations, scored on its surface triangles (overhangs on curved faces count) with slender towers penalised; overhang risk is reported, and walls thinner than your threshold (default 0.8 mm, two perimeters of a 0.4 mm nozzle) are flagged with the measured value.
  • Plate: parts are packed onto as many plates as your bed (default 220 x 220 mm) needs.
  • Export: each part and each plate as STL and 3MF, plus one zip. Every mesh is checked before it is written (closed, manifold, consistently wound, the solid's volume) and every file is read back and checked again; a part that fails is not written, and the dialog says which and where.

The V8 engine kit: 43 printable parts on 2 plates

On the V8 demo: 43 printable parts, 2 plates of 220 x 220 mm, all 43 written and verified in about 3 s after a 3 s plan; 12 parts are flagged with walls under 0.8 mm (the model's own report flags them too).

Plate 1Plate 2
V8 plate 1V8 plate 2

Use

eitri (no arguments) opens the local website: your projects (in ~/eitri-projects, or eitri web <folder>), the demos, and a box to describe a part. Press Create with eitri and the project opens in its 3D editor while eitri models it; its steps, the review renders it checks and its replies stream into the chat beside the model. Keep talking to change it, click geometry first to point at something, paste or drop a photo or sketch to attach it, press Stop (or Esc) to halt a turn (eitri keeps the conversation) or New chat to start over; every direct-modeling tool works alongside. Start blank, Import a file… (STEP, IGES, STL, OBJ, 3MF, PLY or a model .py) and Open a folder… start projects without a prompt. Each project keeps its conversation, so it is still there after a restart.

Every page shares one layout: a top bar with where you are (eitri / wires / Quad power harness), a rail with the six tools (CAD, Wires, Motion, Pneumatics, Firmware, Electronics; each opens that tool's projects) and your project list at its foot, and a status bar with the tool, the core version, the project folder and the build's verdict. In a project the model (or a domain's diagram) fills the canvas; the inspector (checks, parameters, the selection, revisions) and the chat sit in panels docked on the right. The chat collapses to its header, the panels fold to a strip for more room, and the Export menu at the top of the inspector lists every file the project can be downloaded as. Dark by default, light when the system is.

The V8 engine kit demo: the prompt, eitri writing the model, the build, all 43 checks passing

The 43-part V8 demo: one prompt → eitri writes a 398-line model → all 43 checks pass (a recorded 23-minute session, replayed and compressed to 18 s).

You watch eitri work as it happens: its thinking (readable summaries; each finished thought stays as an expandable "Thought for N s"), its reply typing out, the model code streaming into a panel over the 3D view, each step with a spinner and a timer and, for a build, its stage (building → checking → rendering), and the new geometry the moment it exists, before the checks and the review render finish. The checks card at the top of the panel shows the verdict of every build and what changed since the last one ("fixed: thinnest wall", "1 warning resolved"). The CAD engine and the agent start loading when you open a project, so the first build and the first reply don't wait for them.

The terminal works too:

eitri chat ~/parts/knob                        # the REPL (also: eitri <folder>)
eitri chat -p "a 30 mm knob for a 6 mm D-shaft" # one shot, prints the file paths
eitri build knob.py --set diameter=35           # rebuild + report, no LLM
eitri view knob.py --section XZ:0               # extra renders, no LLM
eitri build vendor_part.step                    # report + review image of any existing STEP
eitri print ~/parts/knob --bed 250x210          # 3D-print export, no LLM
eitri bom ~/eitri-projects/quad                 # a wire-harness project's BOM and cut list, no LLM
eitri serve ~/parts/knob                        # just the viewer, no chat
eitri doctor                                    # check the install

In the REPL, talk to it like Claude Code. Follow-ups edit the same model ("make the holes M5", "add a lid"). Slash commands: /show (browser viewer), /set width=45 (change a parameter and rebuild, no LLM), /undo, /history, /params, /export stl 3mf, /view section XZ:10, /image sketch.png (attach a reference image to your next message), /model, /notes.

Wire harnesses

eitri also designs wire harnesses and cable assemblies, with the same loop: eitri writes a parametric Python model file, a deterministic kernel builds it, and every build returns a report of pass / warn / fail checks and a review image that eitri has to fix its work against. Mechanical CAD is untouched; a project is a harness project when its model file builds a Harness (it starts with from eitri.harness import *). Nothing extra to install: the kernel, the diagram layout and the rasteriser are our own code (no WireViz, no Graphviz), in plain Python with Pillow.

from eitri.harness import *

PARAMS = dict(arm_mm=180)

def build(p):
    h = Harness("Quad power")
    batt = h.add(Connector("BATT", "XT60", pins=["+", "-"]))
    esc = h.add(Connector("ESC1", "XT30", pins=["+", "-"]))
    h.net("VBAT", current_A=20, voltage_V=14.8)                      # what the checks grade the wires against
    h.connect(batt["+"], esc["+"], Wire(14, "RD", p.arm_mm), net="VBAT")
    h.connect(esc["-"], batt["-"], Wire(14, "BK", p.arm_mm))
    return h

Every build computes: connectivity (unconnected pins unless declared NC, several wires on one pin, duplicate wires, dangling splices, nets shorted at a splice), ampacity (each wire against a chassis-wiring AWG table, FAIL over the limit, WARN within 20%; each connector pin against its catalog rating), voltage drop (V = 2*K*I*L/CM, K = 12.9 for copper at 75 °C, per net against max_drop_pct, summed along the worst source-to-load path) and consistency (one gauge and one colour per net, shields terminated), overcurrent protection (DC up to 60 V: from every declared h.source(...), each branch that could carry more than its thinnest wire passes a Fuse / Breaker first; the device's rating is within that wire, the steady load within the maker's continuous-load derating, its DC voltage and interrupting ratings cover the system, and it sits within 175 mm of the source; a figure the source or part does not give is reported "not run", never passed; AC and anything above 60 V are refused), plus the model's own verify(). It writes a wire-harness diagram (SVG, and the PNG review image with the failing wires outlined red), a BOM (connectors with part numbers, crimp terminals inferred from connector type x populated pins, wire by gauge and colour with a 10% service loop, splices, labels), a cut list (cut length, strip lengths and terminations at both ends of every wire) and a WireViz-compatible YAML (interop only), all in out/.

In the browser a harness project opens a harness editor instead of the 3D view: click a wire to change its gauge, colour, length or net; click a connector to rename pins, change its type from the catalog, add or remove pins; drag connectors around; click a failing check and the wires it is about light up. Changes are direct edits (EDITS in the model file, the same path as CAD edits) and positions are LAYOUT hints, so eitri sees your changes and carries on from them. A demo to start from: eitri build eitri/demos/quad-power/quad_power.py (battery XT60 -> distribution splice -> 4 ESCs at 20 A + a flight controller; it declares no source, so its protection is "not run"), or eitri build eitri/demos/servo-arm/servo_arm_harness.py (a fused 5 V servo rail).

eitri build harness.py                  # the checks, the diagram, BOM and cut list (no LLM)
eitri bom ~/eitri-projects/quad         # the bill of materials; --cutlist adds the cut list, --csv prints CSV

The API, the connector catalog and three worked examples are in eitri/agent/harness_ref.md; the agent reads them as its reference when a project is a harness (and calls harness_reference() when a blank project turns out to be one).

Mechanisms, pneumatics and firmware

Three more domains work the same way as harnesses. eitri writes a parametric model file, a deterministic kernel checks every build, and the browser opens a domain editor instead of the 3D view. A project's domain comes from its model file's import (from eitri.mechanism import *, from eitri.pneumatics import *, from eitri.firmware import *). Each domain knows only its own model. The agent reads that domain's reference (eitri/agent/<domain>_ref.md) and rules, and gets a <domain>_reference() tool for a blank project that turns out to be one. Edits made in the editor are EDITS and positions are LAYOUT hints, as for CAD and harnesses.

Mechanisms are links, joints (revolute or prismatic, with limits), actuators (stall torque, speed, travel, mass), point masses and targets. Every build checks:

  • Reach. Each target is reachable within the joint limits (bounded inverse kinematics), to the target's tolerance.
  • Torque. The static gravity load on each joint at its worst sampled pose is graded against the actuator's rated torque. The rated torque is estimated as half the stall torque when the datasheet gives none.
  • Speed and limits. Required joint speeds are within the actuator's, and the joint limits fit inside its travel.
  • Mass. A mass rollup per link and in total.

It writes a joint/torque table, a mass table and a kinematic diagram (SVG and PNG). The editor has a parameter panel and the kinematic diagram, where you click a joint to edit its limits or actuator. The demo is a pan-tilt camera mount. Its heavy configuration fails the tilt torque check on purpose. The reference has a 3-DOF arm and the pan-tilt.

from eitri.mechanism import *

def build(p):
    m = Mechanism("Pan-tilt")
    m.link("base", fixed=True)
    m.link("yoke", length_mm=30, mass_g=12, direction=(0, 0, 1))
    m.link("cradle", length_mm=35, mass_g=10)
    servo = Actuator("SG90", stall_kgcm=1.8, speed_deg_s=500, travel_deg=180, mass_g=9)
    m.joint("pan", "base", "yoke", axis=(0, 0, 1), at=(0, 0, 0), limit_deg=(-90, 90), actuator=servo)
    m.joint("tilt", "yoke", "cradle", axis=(0, -1, 0), limit_deg=(-30, 60), actuator=servo)
    m.mass("camera", "cradle", 90, at=(35, 0, 0))
    m.target("ahead", (35, 0, 30))
    return m

Pneumatics are ISO 1219 circuits: supply, FRL, valves (3/2, 5/2, 5/3), flow controls, cylinders (single- or double-acting), tubes and silencers, connected port to port. Every build checks:

  • Force. Cylinder force at the pressure that reaches it, after a 10% friction allowance, against the load in both directions.
  • Speed and flow. ISO 6358 flow (C, b) through the whole supply and exhaust path of every stroke, against the required speed.
  • Air. Consumption per cycle and per minute, including dead volume in the tubes, against the supply.
  • Pressure drop. The drop across each tube and component on every stroke's path, at the flow that stroke needs.
  • Circuit validity. A supply exists, every cylinder chamber is fed from it through a valve and can exhaust in some valve position, every valve has its supply port 1 fed and its work ports (2, 4) connected, and no line is dead-headed.

A component or tube without datasheet C/b is graded with a conservative estimate and the check warns. It writes a BOM (Markdown and CSV), a cylinder table and an ISO 1219-style schematic (SVG and PNG). The editor shows the component list and the schematic: edit a cylinder, valve or tube, and drag components around. The demo is a double-acting clamp with meter-out speed control. It reports one warning on purpose, because its tubes carry no datasheet flow figures. The reference has a single-acting clamp and a double-acting cylinder with speed control.

Firmware is a board (Arduino Uno, Arduino Nano, ESP32), a pinout (each pin with a direction, a role and a name), peripherals (servo, PWM motor driver, limit switch, serial) and the source files eitri writes. Every build generates eitri_pins.h from the pinout, so the sketch uses PIN_<NAME> constants instead of numbers. Then it checks:

  • Compile. The sketch is compiled headless with arduino-cli for the board. A compile error is a failed check at its file and line.
  • Pinout. Every pin exists on the board and can do its role (PWM, ADC, interrupt, input-only, forbidden ESP32 flash pins, ADC2 with Wi-Fi). No pin is assigned twice, and the Serial pins stay free while Serial is in use.
  • Usage. The sources use each pin exactly as declared (pinMode, digitalWrite, analogRead, analogWrite, servo attach), and use no pin that is not declared.

It writes the pinout table (CSV and Markdown), a pinout diagram, the header, the sketch folder and the compile log. The editor has a pinout table you can edit (pin, direction, role, name, board), read-only code panes and the compile result. eitri never uploads to a board. You flash it yourself from the sketch folder in out/. The demo and the reference example are a servo sweep.

arduino-cli is a system dependency of the firmware domain only. Without it, every firmware build has a failed compiles (arduino-cli) check that says "compiler unavailable" and how to install it; the other checks still run. Install it once:

eitri setup firmware              # arduino-cli (asks first), arduino:avr and Servo, then a test compile
eitri setup firmware --esp32      # also the ESP32 board package and ESP32Servo
eitri setup firmware --dry-run    # only print the commands

In the plugin, your agent runs eitri setup firmware -y itself the first time a design has firmware, after one line saying what it installs (about 65 MB: arduino-cli and the AVR core); Claude Code asks you before the command runs.

It runs the same steps you would run by hand:

brew install arduino-cli          # or: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
arduino-cli core update-index
arduino-cli core install arduino:avr             # Uno and Nano
arduino-cli lib install Servo                    # if a sketch uses <Servo.h>
# ESP32 (optional):
arduino-cli config init                          # once, if there is no arduino-cli.yaml yet
arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
arduino-cli core update-index
arduino-cli core install esp32:esp32
arduino-cli lib install ESP32Servo               # if an ESP32 sketch drives a servo

eitri finds arduino-cli on PATH, at the path in EITRI_ARDUINO_CLI, or in ~/.local/bin, /opt/homebrew/bin or /usr/local/bin.

eitri build eitri/demos/pan-tilt/pan_tilt.py         # 12 pass, 0 warn, 0 FAIL
eitri build eitri/demos/air-clamp/air_clamp.py       # 26 pass, 2 warn, 0 FAIL
eitri build eitri/demos/servo-sweep/servo_sweep.py   # 12 pass, 0 warn, 0 FAIL with arduino-cli and arduino:avr installed
eitri bom ~/eitri-projects/clamp                     # pneumatics: the bill of materials (--csv)

Electronics (breadboard and module level)

The sixth domain: a circuit as code. A model file that starts from eitri.electronics import * builds a Circuit: a board (Arduino Uno, Nano, ESP32 DevKitC), supplies, regulators, breakout modules from a catalog (PCA9685, BME280, SSD1306, HC-SR04), resistors, LEDs, diodes, capacitors, switches, MOSFETs, transistors, relays, motors, solenoids and servos, and the nets that join them. It is breadboard and module level only: no PCB layout, no footprints, no KiCad export (the netlist CSV is the hand-off).

Every build classifies each net (a rail at a voltage, a ground, a pin a board drives, a transistor's switched low side), solves the currents through the two-terminal parts between them, and grades the result. Series strings (a pin, a resistor and an LED to ground; a rail, a relay coil and a MOSFET's drain) are solved in closed form; branched networks (two LEDs sharing a resistor, a divider feeding two loads) by nodal analysis, written for eitri, with an ideal-diode iteration. The two agree on every series string. Every sourced figure comes from a datasheet, standard or vendor page whose URL, words and fetch date are recorded in eitri/electronics/sources.py; each check names its source, and each build writes the ones it used to <name>.sources.md. Where sources disagree the conservative figure is used and both are quoted: the lower figure for a limit, the higher for a draw or load (an MG996R draws 2.5 A at stall, not 1.4 A); a figure no document gives is marked ASSUMPTION. The checks:

  • Current. Per GPIO (Uno / Nano 20 mA, ESP32 28 mA) and per chip (ATmega328P 200 mA); module outputs; every LED against its DC maximum (Kingbright 5 mm catalog parts by part=, a typical part by colour, or your LED's own figures; LEDs sharing a resistor are graded for current hogging); every resistor's I²R against its rating; nothing without a current limit (an LED with no resistor, a switch from a driven pin to ground).
  • Power. No rail tied to ground or fed by two supplies; every supply pin within its part's range (a BME280 on 5 V fails); the budget of every source (a board's 5V pin on USB or VIN, its 3V3 pin, a supply's rating, a regulator's rating), servos at stall; regulator dropout and junction temperature; VIN range; one common ground for everything that exchanges signals.
  • Logic levels. No input above its absolute maximum (a 5 V sensor's output into an ESP32 pin fails); the driver's guaranteed VOH against the receiver's VIH; no floating inputs.
  • I2C (NXP UM10204). Pull-ups present and between Rp(min) and Rp(max) for the clock and the bus capacitance; unique addresses. On an Uno or Nano, Wire's internal pull-ups to 5 V against any 3.3 V device on the bus (a warning, with the fixes).
  • Inductive loads. A flyback diode across every coil a transistor or pin switches, the right way round and rated for the coil current.
  • Switching. A MOSFET's gate drive against the VGS its RDS(on) is specified at (an IRF540N from a 5 V pin fails) and its heat; a transistor's base drive for saturation; relay contacts against their rating.

It writes a schematic (SVG and PNG: rails and grounds as flags, every other net routed), a BOM, a netlist (CSV and Markdown) and the sources file. The editor shows the schematic beside a parts table and a nets table: edit a value, move a pin to another net, add a resistor, LED, diode, capacitor or switch, drag parts. The demo eitri/demos/uno-arm-circuit is an Uno driving four MG996R servos through a PCA9685, a status LED, an end-stop and a relay-switched gripper solenoid. Its bad configuration powers the servos from the Uno's 5V pin and leaves out the relay's flyback diode, and fails exactly those two checks.

from eitri.electronics import *

def build(p):
    c = Circuit("Status LED")
    uno = c.board("UNO", "uno")
    c.net("GND", uno["GND"])
    r, led = c.resistor("R1", 330), c.led("LED1", part="WP7113SRD/D")   # (5 V - 1.85 V) / 330 = 9.5 mA
    c.net("LED_A", uno["D13"], r["1"])
    c.connect(r["2"], led["A"])
    c.connect(led["K"], "UNO.GND")
    return c
eitri build eitri/demos/uno-arm-circuit/uno_arm_circuit.py                 # 32 pass, 0 warn, 0 FAIL
eitri build eitri/demos/uno-arm-circuit/uno_arm_circuit.py --config bad    # 29 pass, 0 warn, 2 FAIL (on purpose)
eitri bom eitri/demos/uno-arm-circuit/uno_arm_circuit.py                   # the bill of materials (--csv)

The servos run from a 5 V 15 A supply: four MG996R at their 2.5 A stall and the relay coil draw 10.07 A, 67 % of it.

Direct modeling in the viewer (Fusion-style)

A new project starts as a blank design, like Fusion: eitri ~/parts/thing opens an empty grid. Press S and click the grid to sketch on the ground plane and extrude the first part, drop a primitive (B), or describe the part in the chat and let eitri write it - every later edit works the same on either.

A tour of the editor on the V8: combine, mirror, align and mate, form bodies, holes from fastener tables, export

Thirteen seconds of the editor on the V8 demo: combine, mirror, align and mate faces, form bodies, holes sized from fastener tables, export to STEP / STL / 3MF / drawings / G-code.

The viewer is a modeling tool, not just a display. Every face, edge and part is pickable (hover shows what it is: "flat face, normal (0,0,1), 2361 mm²", "hole/bore Ø5", "convex edge 90°"). The toolbar is laid out like Fusion's:

Create

  • Sketch (S) - click a flat face: the view turns to face it, a grid appears, and you draw with clicks that snap to the grid, to the face's corners/midpoints and to the sketch's own points. It is a real constrained sketcher: lines and polylines (L), rectangles (2-corner R, centre, 3-point), circles (centre C, 2-point, 3-point), arcs (3-point A, centre), ellipses (E), polygons (G, inscribed/circumscribed, any sides), slots (O), splines, points (P) and text (T), plus construction geometry (X). Joins and near-level lines get Fusion's automatic constraints (coincident, horizontal, vertical); the constraint row adds coincident, point-on, H/V, parallel, perpendicular, tangent, equal, concentric, collinear, midpoint, symmetric and fix; the Dimension (D) tool measures a line, arc/circle, two points, two lines (angle) or a point and a line and makes it driving - click a dimension label to change it. The panel shows the degrees of freedom left ("fully constrained"); a change the constraints cannot meet is refused with the conflicting constraint named. Drag any point or curve with the Select tool (V) and the solver keeps the rest consistent (a corner of a rectangle stays a corner; a dimensioned size does not change). Modify tools: trim, extend, split, sketch fillet/chamfer, offset, mirror, rectangular/circular pattern, project 3D edges/faces into the sketch, SVG import. Then extrude (drag or type; outward adds, inward cuts; extents: a distance, to the next face, to a face you click, or through all; symmetric, a taper angle, a thin wall thickness, flip), revolve about the sketch's u/v axis, a model axis or a straight edge you click, loft through scaled/rotated sections at offsets (add as many as you like), sweep along edges, or a rib: an open chain extended in-plane until it meets the part, a thickness across the plane (sketch it on an offset plane inside the part). "More…" adds a mirror and a pattern ("3x2 10x8" or "6 @ 360") of the profile, and a sketch-plane offset. Esc restores your view. A quick shape (rectangle, circle, …) that you do not edit is stored as that shape; anything you edit is stored as the full sketch (entities, constraints, dimensions), which the agent reads, edits (sketch_op) and folds into code.
  • Hole (H) - M2…M12 clearance (close/normal/loose) or tapped (tap drill), counterbore / countersink, depth, pattern and mirror; click a flat face to place it, or a round face for a radial hole. Hole labels can be clicked to change diameters.
  • Boss - a cylindrical boss or screw standoff (plain Ø + hole, heat-set insert, self-tapping, clearance; height, hole depth) standing where you click on a flat face.
  • Primitive (B) - box, cylinder, sphere, torus, cone, hexagon, wedge (ramp) and coil (spring), picked from a grid of shapes and drawn to size: press on the ground grid or on a flat face, drag the footprint (live ghost and dimensions), release, move to set the height, click or Enter; type a number at any point for an exact size ("30", "24x16"), Esc cancels. A plain click places it at the panel's size. A new part, or joined to / cut from the face it is drawn on.
  • Insert (W) - a screw (socket/button/countersunk/pan/hex head, any length), hex nut, washer or ball bearing from the fastener library, placed by clicking a hole: the screw's head sits on the surface with the shank down the hole, a nut or washer sits on the face, a bearing goes into the bore. They become parts (steel) the interference check watches.
  • In a sketch, sweep along edges: draw the profile on a face the path leaves at a right angle, choose sweep, click the edges of the path - pipes, rails, channels.

Modify

  • Push/Pull (P) - drag a face along its normal with a live ghost (0.5 mm snaps; Alt for free). Flat faces move (several selected faces move together); holes, bosses and spheres change radius.
  • Surfaces - from a sketch, make a surface body instead of a solid: planar, extruded (an open chain becomes a sheet, a closed outline a tube), revolved, swept along edges or lofted through sections. Surface parts get their own actions: offset, extend (all free edges, or the edges you select; natural or tangent), trim by a plane, a face of another part or a sketch profile, split, stitch several sheets into one, patch an opening (G0, or G1 tangent to the neighbours), thicken into a solid and to solid (a closed surface). The report lists a surface's free edges and the continuity (G0 crease / G1 / G2) of its internal edges.
  • Lip - a raised lip or a groove along the inner or outer edge of a wall's rim (click the rim face; width, height): enclosure lids that locate.
  • Fillet (F) / Chamfer (C) - click edges (shift adds), drag or type; an end radius makes a variable fillet, a second size or an angle an unequal chamfer; double-click an edge to select its whole tangent chain (a rounded pocket's outline in one go).
  • Shell (E) - click the faces to leave open, set the wall; or hollow a part.
  • Combine (J) - join / cut / intersect two parts (keep the tool or not).
  • Split (X) - by XY/XZ/YZ at an offset, or by a selected face's plane; keep one side or both (the other half becomes a new part).
  • Mirror (I) - about XY/XZ/YZ through the origin or the part's centre, or about a face's plane; joined or as a new part.
  • Pattern (N) - rectangular or circular copies of a part (joined or as parts name_2…). Holes and sketch features are patterned from their own timeline form.
  • Scale (K) - uniform or per-axis, about the part's centre.
  • Parts can be renamed, hidden, isolated, deleted (Delete key), made translucent (opacity slider - see inside a housing) and given a material from their panel. Assembly drawings carry a parts list with materials and masses.
  • Thread (T) - on a hole or a shaft: ISO size, length, cosmetic (reported) or modelled (a real helix from bd_warehouse).
  • Move (M) - drag the gizmo arrows (R rotate, T translate).

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!