Noureddine RAMDI / text-to-cad: AI-driven parametric CAD with geometry-aware iterative editing

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

earthtojake/text-to-cad

text-to-cad stands out by tackling a well-known challenge in AI-assisted CAD workflows: how to enable iterative, precise edits driven by AI agents without losing track of geometry context. It combines parametric CAD modeling, robot description, and motion planning in a fully local environment, with a novel stable reference system that effectively acts like version control for geometry within AI conversations.

What text-to-cad does and how it is built

At its core, text-to-cad is an open-source harness that connects AI coding agents such as OpenAI’s Codex or Claude Code with parametric CAD generation. Instead of relying on cloud services or backend servers, it adopts a local-first architecture. The CAD source files are plain text scripts that define parametric models, robot URDF descriptions, and motion planning instructions.

The system bundles multiple “skills”—specialized code modules—for CAD modeling, URDF robot definitions, and motion planning. These are version-controlled alongside your source code, enabling a workflow where AI agents generate or edit the parametric source code directly.

Python handles the heavy lifting for CAD export, supporting multiple output formats such as STEP, STL, 3MF, DXF, and GLB, which are standard in CAD and 3D modeling. Meanwhile, a Node.js-based CAD Explorer tool allows you to inspect the geometry locally in a browser, with detailed visualization and geometry inspection capabilities.

A standout architectural component is the @cad[…] reference system. This novel mechanism provides stable, geometry-aware handles that AI agents can use to make precise, iterative edits to the parametric CAD source. It allows the agents to refer back to specific parts of the geometry reliably across code generations, which is a non-trivial problem when working with AI-generated code that needs to preserve context and intent.

The workflow is explicitly iterative: describe the desired change, edit the source code, regenerate the explicit CAD targets, inspect the geometry in the browser, and then use @cad references to make further edits. This tightly integrated loop bridges the gap between AI code generation and tangible CAD outcomes.

Under the hood, the repo uses JavaScript for the Node.js components and Python for the CAD export pipeline. This split leverages Python’s mature CAD libraries while providing a modern, interactive front-end for exploration.

Technical strengths and tradeoffs

The most distinctive feature of text-to-cad is the @cad[…] stable reference system. Traditional AI coding agents struggle with maintaining stable references to complex parametric geometry because the code context often changes between generations. This repo solves it by embedding explicit geometry references that persist across edits, enabling geometry-aware follow-up instructions. This design is crucial for iterative workflows where precision and context retention are mandatory.

This approach effectively turns parametric CAD source code into a version-controlled artifact enriched with stable geometry handles, making it easier for AI agents to “understand” and manipulate CAD models programmatically. It’s a clever bridging of concepts from version control and parametric modeling with AI coding.

The local-first architecture is another strength. By avoiding backend dependencies, users can run everything on their local machine, enhancing privacy and control. It also simplifies setup for experimentation and integration with other local tools.

However, the tradeoff is complexity in environment management: users need Python 3.11, Node.js, and a handful of dependencies installed. The split between Node.js (for CAD Explorer) and Python (for CAD export) means the system requires managing two runtimes and their dependencies.

The code quality is surprisingly clean given the complexity. The repo is well-structured with clear separation between skills and tools. The use of standard CAD export formats means the output is compatible with a wide range of downstream CAD and 3D tools.

One limitation is that the system currently requires manual inspection and interaction with the CAD Explorer for geometry verification. This means it’s not fully automated and still needs a human in the loop to guide iterative improvements.

Quick start

Clone the repo:

git clone https://github.com/earthtojake/text-to-cad.git
cd text-to-cad

Install Python CAD dependencies:

python3.11 -m venv .venv
./.venv/bin/python -m pip install --upgrade pip
./.venv/bin/pip install -r .agents/skills/cad/requirements.txt

Install other bundled skill requirements only when you need those workflows:

./.venv/bin/pip install -r .agents/skills/urdf/requirements.txt

Install CAD Explorer dependencies:

npm --prefix .agents/skills/cad/explorer install

Run the local CAD Explorer from the project directory you want to scan:

npm --prefix .agents/skills/cad/explorer run dev

Then open http://localhost:4178.

For root-aware agent workflows across multiple projects, ask CAD Explorer to reuse a matching server or start one on a free port:

npm --prefix .agents/skills/cad/explorer run dev:ensure -- --file STEP/sample_part.step

Then open the URL printed by the command.

verdict

text-to-cad offers a unique approach to integrating AI coding agents with parametric CAD workflows, especially suited for developers and researchers experimenting with AI-assisted design and robotics. The local-first setup and the @cad[…] stable reference system address real pain points in iterative, geometry-aware editing.

That said, it’s not a turnkey CAD solution for end users yet. The environment setup is somewhat involved, and there remains a need for manual inspection and iteration support. The architecture favors flexibility and experimental workflows over out-of-the-box ease.

If you’re interested in AI-driven CAD generation, working with parametric models programmatically, or exploring stable references for geometry in AI workflows, this repo is worth your time. It’s a solid foundation to build on or adapt to your own AI + CAD pipelines.


→ GitHub Repo: earthtojake/text-to-cad ⭐ 1,508 · JavaScript