← all repositories
ghbalf/freecad-ai

FreeCAD’s Chatbot Intern Writes Python and Occasionally Crashes Things

An alpha workbench that turns natural language into executed Python inside FreeCAD, with a safety switch because LLM-generated code sometimes breaks your model—and the app.

freecad-ai
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

FreeCAD AI embeds a chat panel directly into FreeCAD 1.0+ and wires it to an LLM of your choice. You describe a part in plain English; the workbench generates Python code and can execute it inside your active document to build the geometry. It supports 21 providers, from local Ollama to cloud APIs like Anthropic and OpenAI, and automatically includes your current document state in the prompt so the model knows what is already on screen.

The interesting bit

The workbench does not merely suggest code—it runs it, which is why the README warns of occasional FreeCAD crashes. To mitigate the chaos, it offers a Plan mode that forces human review before execution and an Act mode that restricts the LLM to 50 structured FreeCAD tools rather than raw Python. It also ships with reusable “skills” and a /optimize-skill loop that iteratively tests and refines modeling instructions without you rewriting prompts by hand.

Key highlights

  • Natural-language chat with streaming responses, docked inside FreeCAD alongside your other panels
  • Plan / Act modes: review generated Python before it runs, or let the LLM call 50 structured modeling tools directly
  • Tool reranking and context compacting to limit prompt bloat when many tools or MCP servers are registered
  • Reusable skills—such as gears, enclosures, and sketch-from-image—with an automatic optimizer that improves them via test-evaluate-modify loops
  • Vision routing that detects whether your chosen model supports images, falling back to an MCP server for non-vision models
  • Zero external dependencies: the workbench uses only the Python standard library, which is almost unheard of for an AI integration

Caveats

  • Explicitly alpha software: the README warns of rough edges, breaking changes, and occasional FreeCAD crashes caused by LLM-generated code
  • Secure API key storage examples for macOS and Windows are documented but unverified by the maintainer; Linux is the primary test platform
  • Requires FreeCAD 1.0 or newer, and the workbench configuration path changed in v0.13.0-alpha to align with FreeCAD 1.1’s version-scoped user directories

Verdict

A compelling experiment for FreeCAD regulars who want to prototype geometry via conversation and can tolerate the odd crash. If you need production-grade stability or are allergic to AI-generated code executing in your CAD session, steer clear until the beta.

Frequently asked

What is ghbalf/freecad-ai?
An alpha workbench that turns natural language into executed Python inside FreeCAD, with a safety switch because LLM-generated code sometimes breaks your model—and the app.
Is freecad-ai open source?
Yes — ghbalf/freecad-ai is open source, released under the LGPL-2.1 license.
What language is freecad-ai written in?
ghbalf/freecad-ai is primarily written in Python.
How popular is freecad-ai?
ghbalf/freecad-ai has 503 stars on GitHub.
Where can I find freecad-ai?
ghbalf/freecad-ai is on GitHub at https://github.com/ghbalf/freecad-ai.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.