npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-cad

v1.0.3

Published

Open-source AI-driven parametric CAD platform with NLP input and STEP export

Readme

AI-CAD

Open-source, AI-driven parametric CAD platform. Describe designs in plain English, generate 3D models, and export to manufacturing formats.

Features

  • NLP-to-CAD — Chat with an LLM to generate parametric 3D models from natural language
  • Feature-Based Parametric Modeling — Add/remove/toggle features that drive Replicad code generation: extrude, revolve, fillet, chamfer, boolean, mirror, pattern
  • Real-time 3D Viewport — Three.js/React Three Fiber with orbit controls, wireframe, edge highlighting
  • Code Editor — Monaco editor for Replicad TypeScript with live execution
  • Engine Console — Real-time logging of WASM engine events, execution timing, and mesh statistics
  • Runtime LLM Configuration — Switch between OpenAI / Anthropic / Ollama providers and models from the Settings page
  • Format Conversion — STEP, IGES, STL, OBJ, FBX, GLTF, USD, 3MF, DXF, BREP (18+ formats)
  • Assembly Management — Mate definitions: coincident, concentric, distance, angle, tangent, gear
  • Universal Parts Consciousness — Intelligent parts library tracking part relationships, failure modes, and usage patterns (UPC)
  • MCP Server — Expose CAD operations as Model Context Protocol tools for AI agents
  • Export Targets — Unity, Unreal Engine, Web, 3D Print presets

Tech Stack

| Layer | Technology | |-------|-----------| | Framework | React 19, TypeScript, Vite 6 | | 3D Engine | Three.js, @react-three/fiber 9, @react-three/drei 10 | | CAD Kernel | Replicad (OpenCASCADE WASM) | | State | Zustand (with persist middleware for settings) | | Routing | TanStack Router (file-based) | | Data | TanStack React Query | | Editor | Monaco Editor | | LLM | OpenAI / Anthropic Claude / Ollama (runtime-configurable) | | Auth | Azure AD (MSAL) — optional, install separately | | Styling | Tailwind CSS |

Quick Start

# Clone
git clone https://github.com/vespo92/AI-CAD.git
cd AI-CAD

# Install dependencies (Node 22+ required)
npm install

# Copy environment config
cp .env.example .env

# Start dev server
npm run dev

Open http://localhost:5176

The app runs in offline mode by default — you can write Replicad code in the editor and see 3D models without any backend services. To enable AI chat features, either:

  • Set VITE_LLM_API_KEY in .env, or
  • Configure your LLM provider at runtime via Settings (gear icon in toolbar)

Architecture

src/
  components/
    viewport/       # 3D rendering (Three.js canvas)
    chat/           # LLM chat interface
    editor/         # Monaco code editor
    feature-tree/   # Parametric feature tree (drives code generation)
    parts/          # Parts library browser
    assembly/       # Assembly management
    convert/        # Format conversion
    sketch/         # 2D sketch editor
  lib/
    cad-engine/     # Web Worker CAD execution + feature codegen
    api/            # HTTP clients (LLM, CAD service, UPC)
    mcp/            # Model Context Protocol server
    store/          # Zustand state management (cad, console, llm)
    auth/           # Azure AD (optional stub)
  routes/           # TanStack file-based routes
  types/            # TypeScript type definitions

CAD Engine

The CAD kernel runs in a Web Worker using Replicad (a TypeScript wrapper around OpenCASCADE compiled to WASM). This keeps the UI responsive during expensive geometry operations.

// Example: Create a box with a fillet
const shape = drawRoundedRectangle(40, 30, 5)
  .sketchOnPlane("XY")
  .extrude(15)
  .fillet(2, (e) => e.inDirection("Z"));

return shape;

Feature-Based Modeling

Click the + button in the Feature Tree panel to add parametric features. Each feature maps to generated Replicad code. Toggling visibility or deleting features automatically regenerates and re-executes the model.

Supported features: Sketch, Extrude, Revolve, Fillet, Chamfer, Shell, Boolean Cut/Fuse, Mirror, Pattern.

MCP Server

AI-CAD exposes its capabilities as an MCP server, allowing any AI agent to create and manipulate CAD models:

# Run standalone MCP server
npm run mcp:server

Available tools: execute_code, create_primitive, modify_shape, export_model, import_model, describe_model, send_to_external

Docker

# Build
docker build -t ai-cad .

# Run
docker run -p 8080:80 ai-cad

For production with backend services, pass build args:

docker build \
  --build-arg VITE_LLM_GATEWAY_URL=https://your-llm-gateway.example.com \
  --build-arg VITE_CAD_SERVICE_URL=https://your-cad-service.example.com \
  -t ai-cad .

Backend Services (Optional)

AI-CAD's core modeling works standalone. For the full pipeline, you can run these companion services:

| Service | Purpose | Default Port | |---------|---------|-------------| | LLM Gateway | Proxies LLM requests (OpenAI/Anthropic/Ollama) | 8092 | | CAD Service | Format conversion engine (FreeCAD/OpenSCAD) | 8090 | | File Proxy | File upload/download storage | 8091 | | UPC | Universal Parts Consciousness database | 8093 |

License

MIT