Free guide
Text-to-CAD with Claude Code
Generate functional 3D printing parts using plain English and AI.
What You Need
- Computer: Mac, Linux, or Windows with WSL.
- Node.js: Installed on your system (Free — check via
node -vin your terminal). - Claude Account: Requires a Claude Pro subscription or Anthropic API credits (Paid).
- OpenSCAD: Free, open-source 3D modeling software (Download here).
- Claude Code: Anthropic's official terminal tool (Free CLI tool, installed via npm).
Step-by-Step Guide
Step 1: Install OpenSCAD
Download and install OpenSCAD for your operating system. Leave it closed for now. Claude will handle the code.
Step 2: Install Claude Code
Open your terminal and run the following command to install Claude Code globally:
npm install -g @anthropic-ai/claude-codeStep 3: Launch and Authenticate
Navigate to a folder where you want to save your project, then start Claude Code:
claudeFollow the on-screen prompts to log in with your Claude account and approve permissions.
Step 4: Write Your Prompt
Tell Claude exactly what you want to build with precise dimensions in millimeters.
Copy and paste this example prompt:
"Create an OpenSCAD script for a small rectangular storage tray. Dimensions: 100mm long, 50mm wide, 30mm high. Wall thickness: 3mm. Add smooth rounded corners with a 5mm radius. Output only valid OpenSCAD code."
Step 5: Save the File
Claude will generate the OpenSCAD code in your terminal.
- Copy the code.
- Open OpenSCAD, paste the code into a new file, and save it as
part.scad. - Press F6 to render the model, then F7 to export it as an STL file.
Step 6: Print
Import your new STL file straight into your 3D printer slicer (PrusaSlicer, Cura, etc.) and print.
Common Mistakes & Fixes
- Mistake: Claude outputs conversational text mixed with code that OpenSCAD cannot read.
- Fix: Reply in the terminal: "Remove all conversational text. Output raw OpenSCAD code only."
- Mistake: Dimensions are way too big or too small.
- Fix: Always specify units (e.g., "in millimeters") in your prompt. OpenSCAD works in mm by default.
- Mistake: Command
claudenot found.- Fix: Ensure Node.js is installed correctly and restart your terminal.
Want more practical AI workflows for your daily work? Follow @letagentswork.
Made by Let Agents Work — follow @letagentswork
From the reel: Turn text prompts into 3D printable CAD files