OpenCAD
A modular CAD system for parametric, programmable, and AI-assisted design

Install for Claude, Codex, OpenCode, OpenClaw, or NemoClaw
Install the OpenCAD skill for Claude, Codex, OpenCode, or OpenClaw with one
command:
npx skills add caid-technologies/OpenCAD
OpenClaw also discovers skills/create-cad-files directly when this repository
is its workspace. OpenCode can discover the checked-in adapters under both
.opencode/skills and .agents/skills.
For a running NemoClaw sandbox, install the canonical skill from a checkout of
this repository (replace my-assistant with the sandbox name):
nemoclaw my-assistant skill install ./skills/create-cad-files
Then ask the agent normally:
Create a 72 mm round spray bottle and give me STEP and STL files.
The agent writes the parametric source, builds real OCCT geometry, validates
the artifacts, and returns clickable file paths. No manual Python or CLI work
is required from the user. The repository also ships provider-native manifests
under .codex-plugin/ and .claude-plugin/.
Components
opencad.kernel — geometry kernel and typed operation registry
opencad.solver — 2D sketch constraint solving (SolveSpace + Python fallback)
opencad.tree — parametric feature-tree DAG (CRUD + rebuild + stale propagation)
opencad_agent — AI agent that plans and executes operations
opencad_server — FastAPI transport mounting all of the above
opencad-viewport — publishable React + Three.js component library (npm)
Layout
This is a uv workspace of three Python distributions and a pnpm workspace
holding one npm package, all independently installable. The core carries no
web framework: the dependency arrow runs core ← agent ← backend and never the
other way. Applications under apps/ are never published; they consume the
libraries under packages/.
packages/
├── opencad/ # dist: opencad — kernel, solver, tree, fluent API, CLI
│ ├── src/ # pydantic + numpy only. No FastAPI, no httpx.
│ └── tests/
├── opencad-agent/ # dist: opencad-agent — LLM modelling on the core
│ ├── src/ # depends on opencad; [llm] extra adds LiteLLM
│ └── tests/
└── opencad-viewport/ # npm: opencad-viewport — React component library
└── src/ # react/three are peer deps, never bundled
apps/
├── backend/ # dist: opencad-backend — the only FastAPI consumer
│ ├── src/ # opencad_server: routers, app factory, HTTP client
│ └── tests/
└── opencad_viewport/ # reference app hosting the components (not published)
scripts/ # Development and smoke-test scripts
Each package installs and tests on its own; CI runs a job per package with
only that package's dependencies present, so a core module that reaches for
the backend fails the build.
Quickstart
Prereqs: Python 3.11+ and Node.js 18+
1. Install
Published on PyPI. Pick the layer you need — each installs independently, and
each pulls the ones below it:
pip install opencad # core: kernel, solver, tree, fluent API, CLI
pip install "opencad[occt]" # + OCCT B-rep backend (real STEP/STL)
pip install "opencad-agent[llm]" # + natural-language modelling
pip install opencad-backend # + the FastAPI HTTP service
Installing opencad alone gets you a working kernel with no web framework in
the environment — no FastAPI, no httpx. That is the point of the split:
from opencad import Part, Sketch
plate = Part().extrude(Sketch().rect(80, 30), depth=4)
plate.fillet(edges="all", radius=1.0)
Cross-package versions move in lockstep and are pinned exactly, so
opencad-agent 0.2.3 can only resolve against opencad 0.2.3.
The React components ship separately on npm:
npm install opencad-viewport react react-dom three @react-three/fiber @react-three/drei