text-to-cad
Lets AI coding agents design parts in Python CAD and export robots to MuJoCo
License
MIT
Code and skills: MIT, read from the LICENSE file of earthtojake/text-to-cad and the LICENSE file in each skill folder (copyright Thompson Labs LLC). Agent apps: text-to-cad needs a separate AI agent app, which has its own terms. Services: SendCutSend and Bambu Lab are third-party services under their own terms; the skills check and prepare files and place no orders. Telemetry: usage counts and crash reports go to api.texttocad.dev unless turned off; models, prompts and file paths are not sent. Card image: a crop of the project's own social preview picture, not covered by the code licence. Checked 2026-11-13 against the LICENSE files, the README and the privacy policy.
Overview
text-to-cad is an open-source plugin that lets AI coding agents such as Claude Code, Codex, Cursor and Gemini CLI design physical parts and assemblies. The agent writes each model as a Python script with the build123d library on the OpenCASCADE kernel, runs it, and shows the result in a local CAD viewer. Models export as STEP, STL, 3MF, GLB or DXF files. Further skills check whether a part can be machined, cut and bent, molded or 3D printed, run stress checks with CalculiX, draw dimensioned PDF drawings, render images with Blender, lay out KiCad circuit boards, slice prints with OrcaSlicer and check files against SendCutSend's ordering guide. For robotics it writes URDF, SRDF and MJCF robot descriptions from a model's joints and materials, and since release 0.11.8 of November 2026 it supports MuJoCo 4: masses and inertias come from the CAD, a check compiles the model in MuJoCo, and robots and scenes are composed in Python. The project is by earthtojake, under the MIT licence, and everything runs on the user's own computer.
text-to-cad is a set of agent skills plus a local CAD server that a coding agent calls over MCP. Its install script sets it up in every agent app it finds: Claude Code, Claude Desktop, Codex, Cursor, Grok Build and Gemini CLI get the plugin, and about fifteen other agents, among them GitHub Copilot, Windsurf, Cline and Zed, get the skills alone. The tool itself is the Python package cad, run through uv. The project site is texttocad.dev.
A model is a Python script written with build123d on the OpenCASCADE kernel; the CAD skill has the agent run it, show it in the CAD viewer, and export STEP, STL, 3MF or GLB, or DXF profiles and flat patterns for laser and waterjet cutting. Assemblies can carry joints and animations. The other skills cover manufacturing checks for machining, sheet metal, molding and 3D printing, linear static stress checks (finite element method with CalculiX), engineering drawings as PDF, renders with Blender, KiCad circuit boards, slicing with OrcaSlicer and sending prints to Bambu Lab printers, and a preflight check for SendCutSend orders.
The robot simulation skill turns a model's joints, materials and named frames into a URDF for ROS 2, an SRDF for MoveIt and an MJCF for MuJoCo. Release 0.11.8, on 11 November 2026, added MuJoCo 4.0.0 support:
- Each link's mass, centre of mass and inertia come from the parts' materials through the CAD kernel, and one command exports the robot as MJCF or URDF. - A plain Python function makes the simulation choices on MuJoCo's own spec: collision shapes fitted as primitives or cut into convex hulls with CoACD (convex decomposition), joint damping, actuators and sensors. - The cad mujoco check command compiles the file with MuJoCo and reports parts that intersect at rest, wrong scales, joints outside their range and what collides with what. - Scenes are composed in Python, for example a gripper designed in CAD attached to an arm from another source with a block to pick up, and open in MuJoCo Studio in the browser. - A ranges command finds each joint's stops by sweeping it until its parts touch.
The MuJoCo sample projects take the maker's STEP files of the SO-101 arm and the Trossen WidowX AI through this process and compare the result with the hand-made models in MuJoCo Menagerie: total mass is within 1.3% and 2.7% of them. The project calls them samples, not a benchmark.
Why it matters
Most robots start as parts in CAD, and getting from those parts to a simulation model usually means a commercial CAD program and a separate converter such as onshape-to-robot. text-to-cad keeps the whole chain as code that an AI agent writes and a person can read: the part, the assembly, the joints, the masses and the MuJoCo model all come from the same Python scripts, so a design change is one edit and one rerun. Its MuJoCo work is checked against real robots, the SO-101 and the WidowX AI, rather than toy examples. Like SolidCraft, it is general CAD first: the robotics part is one skill among eight, useful to people who already work with a coding agent.
Problem it solves
Designing a robot part and simulating the robot it belongs to usually takes a CAD program, hand work to get masses and inertias right, and a converter to URDF or MJCF that has to be run again after each change. text-to-cad lets an AI agent write the parts as Python scripts, check them for manufacturing, and generate the robot descriptions and MuJoCo scenes from the same scripts, with the physical properties taken from the CAD.
Key takeaways
- Plugin and skills that let AI coding agents write parts and assemblies as Python build123d scripts
- Exports STEP, STL, 3MF, GLB and DXF, with checks for machining, sheet metal, molding and 3D printing
- Writes URDF, SRDF and MJCF from a model's joints and materials, with masses and inertias from the CAD
- MuJoCo 4 support since release 0.11.8: a MuJoCo function, a model check and scenes composed in Python
- Also does stress checks with CalculiX, PDF drawings, Blender renders and KiCad boards
- MIT licence; runs locally with no account, and sends usage statistics unless turned off
Who it is for
- Robot builders who already use an AI coding agent and want it to design printed or machined parts
- Researchers who need a MuJoCo or URDF model of a robot whose CAD they have
- Makers who want parts checked for 3D printing or sheet metal before ordering
- Developers who keep hardware designs as code in version control
Limitations
- It needs an AI agent app such as Claude Code, Codex or Cursor; these are separate products with their own terms and costs
- General CAD first: the robotics features are one skill among eight, and MuJoCo support only arrived in November 2026
- The plain MJCF export holds no actuators, joint dynamics or chosen collision shapes; those are written by hand in a MuJoCo function
- The MuJoCo samples are not a benchmark: their actuator gains are chosen so the robot holds a pose, not measured
- MuJoCo Studio, used to view a scene, listens on every network interface with no authentication
- CoACD convex decomposition is not available on Intel Macs, Windows on ARM or musl Linux
- Stress checks cover linear static loads only
- Installation runs a script piped to the shell and downloads a CAD kernel of about 240 MB
- Usage statistics and crash reports are sent by default; they can be turned off
- Mostly the work of one maintainer, with releases every few days