Skip to content
DanteCppPublic

About

A circuit editor of a new kind.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

FidoCadAI

Draw circuits by talking to your agent.

FidoCadAI gives you and your AI agent a shared drawing canvas. Ask for a circuit, inspect the result, then answer on the canvas itself: select a component, move a label or adjust a wire. Your selections and edits are shared automatically, so the next request can refer to what you just touched.

The conversation stays in your terminal. The drawing stays open beside it, and you can edit it by hand at any point.

I've used FidoCadJ since high school, through university and in the years since. It has been a blank page for thinking: somewhere to sketch circuits, systems and ideas of all kinds. FidoCadAI brings an agent into that way of working.

You can use it to draw schematics and design simple PCB layouts, or as a companion for exploring an idea. The drawing gives the conversation something concrete to work with: a way to explore an arrangement, question it and develop it further.

An example session

Drawing a buck converter with Pi:

Pi drawing and editing a buck converter in FidoCadAI

Drawing and symbol library

Working with the drawing

I come from chip design, so I wanted the interface to feel a bit like Cadence Virtuoso, with controls such as pressing Space to fit the drawing in view. The interface also borrows ideas from Omarchy Linux and macOS for keyboard and trackpad interaction. FidoCadJ has been a major influence too, particularly its rulers and keybindings for drawing primitives.

The interface is deliberately simple. The drawing fills the window, with tools available from the keyboard when you need them. You can move between conversation and direct editing without leaving the drawing or interrupting the session. The aim is to keep your attention on the idea you are working through.

Working in the FidoCadAI drawing window

FidoCadAI ships with a skill: written instructions that teach an agent how to use the tools. It carries some of my own preferences in schematic drawing as a starting point. Memory and style learning are enabled by default: the agent learns from your feedback, remembers your preferences across sessions and applies them to later drawings. Over time, the drawings reflect more of your own style.

Why it is built this way

A FidoCad drawing is plain, human-readable text. Its simple commands make it possible for a language model to infer how to draw from examples, even before reading the specification. The essentials of the drawing language fit on a single page, so explaining it takes little of the agent's context and leaves room for the design itself. You can also read the files yourself, track changes in Git and share drawings that remain editable.

I chose C over Rust because of its long history and the large body of established code available for language models to learn from. I wanted the implementation to be straightforward for agents to read and extend, as well as fast to run. The core and command-line tool are lean C11 programs with no external dependencies beyond the C standard library. The drawing window uses Qt6.

The agent works through the command-line tool, fcai, while you see the result in fcai-gui. It shows the first symbols or wires as soon as they are available, then builds, checks and refines the circuit in the open window. You can follow and steer the drawing while it is still in progress.

The language model interprets your requests and makes the design decisions, so results depend on the model you use. The tools let it inspect the drawing's syntax, wire geometry and appearance; those checks do not establish that a circuit will work electrically.

Examples

These examples range from circuit details to a house energy system and a portrait. Each uses the same text-based drawing format. Editable sources live in playground/; click an image to open the full-resolution render.

The buck-boost pair shows a schematic and a PCB layout. The ADC drawings use repeated circuit elements and labels to describe more detailed structures.

Buck-Boost Schematic Buck-Boost PCB Layout
Inverting buck-boost schematic Two-layer buck-boost PCB layout
Power-stage topology and component labels. FidoCad source Copper tracks, pads, and silkscreen. FidoCad source
VCO-Based Sigma-Delta ADC Capacitive SAR ADC
VCO-based ADC Capacitive SAR ADC
Modulator and current-starved ring oscillator. FidoCad source Binary-weighted capacitor array and SAR register. FidoCad source

Solar + Storage House — Single-Line Drawing

This drawing brings electrical and thermal systems onto one canvas: rooftop solar, battery storage, a hybrid inverter, house circuits and heat-pump heating. Colours and line styles distinguish power, control signals and heat flow.

Dark-mode fcai-gui screenshot of a house with solar PV, battery storage, hybrid inverter, heat pump, thermal storage, and energy management

Editable drawing and symbol library · Blue: AC power · Gold: PV DC · Green: battery / PE · Violet dashes: logical controls · Orange: thermal flow

Enrico Fermi Portrait

The same lines used for circuits can also describe a face. This portrait is made of editable outlines and cross-hatching, with no embedded photograph.

Enrico Fermi portrait in dark-mode fcai-gui, drawn with editable outlines and cross-hatching

Editable artwork and reference photograph

Try it

FidoCadAI runs on Linux and macOS with a coding agent such as Pi, Codex or Claude Code. Give your agent this repository and ask it to install FidoCadAI, read the included skill and open a drawing. Building requires a C11 compiler, Make and Qt6 for the drawing window; the installer and agent instructions cover setup and use.

A first request can be as simple as “Draw an inverting buck-boost converter.” Once the drawing is open, select something you want to change and continue the conversation.

Tests

Run make test for the core, CLI, session, and GUI suites. With Qt6 Widgets and Qt6 Test installed, make test-gui runs the GUI suites alone, offscreen.

The UI end-to-end suite sends mouse and keyboard events through the application window, letting Qt route them to the canvas, symbol picker, properties fields, and shortcut sheet. It checks every drawing tool and documented shortcut, placement with snapping on/off and pan/zoom, handle dragging for every primitive type, component rotation/mirroring, selection, clipboard edits, undo/redo, rulers, and saved files. It runs at normal and double display scaling. Explicit double-click and release events also cover dropped final points and drags without a final move event. These tests exercise Qt input dispatch; they do not automate a desktop compositor or physical input device.

Credits and license

  • Core & GUI: Licensed under GPLv3.
  • Reference Projects: FidoCadJ (Java) by Davide Bucci and FidoCadJS (TypeScript).
  • Rasterizer & Fonts: Vendors stb (stb_truetype, stb_image_write), mimeTeX (GPLv3+) for native LaTeX math, and Liberation Fonts (SIL Open Font License 1.1).

About

A circuit editor of a new kind.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages