Text-to-CAD Dependencies: Complete Guide to JavaScript and Python Requirements

Text-to-CAD requires Node.js packages (three, gifenc) for CAD rendering and Python packages (cadpy, playwright) for skill automation, with each CAD format skill (URDF, SRDF, SDF, DXF) maintaining its own dependency manifest.

The earthtojake/text-to-cad repository is a mixed-language project that bundles JavaScript runtimes for browser-based visualization with Python backends for CAD generation. Understanding the dependency structure is essential for setting up the development environment, running the viewer, or extending the skill suite.

JavaScript Runtime Dependencies

The frontend and browser-native components rely on specific Three.js versions for 3D rendering and gifenc for animation encoding.

Core CAD Rendering (cadjs)

The cadjs package provides the fundamental CAD viewer capabilities. According to packages/cadjs/package.json, the runtime requires:

  • three@0.160.0 — Core 3D library for WebGL rendering
  • gifenc@^1.0.3 — GIF encoding library for exporting animations

These dependencies power the real-time model visualization in the browser.

Implicit CAD Runtime (implicitjs)

The implicitjs package extends the core functionality with browser-native implicit CAD support. Located in packages/implicitjs/package.json, it declares:

  • three@0.160.0
  • gifenc@^1.0.3
  • playwright@^1.52.0 (test-only dependency)

Playwright enables headless browser testing for the implicit geometry engine.

Viewer and Tooling

The top-level viewer application defined in viewer/package.json pulls in the shared JavaScript runtimes. No additional runtime dependencies are required beyond those specified in the underlying cadjs and implicitjs packages.

Python Dependencies and Skills

The Python backend uses an editable local package architecture, where each CAD skill isolates its requirements in dedicated manifest files.

Core CAD Skill (cadpy)

The CAD skill relies on a local helper library installed in editable mode. The skills/cad/requirements.txt file specifies:

--editable ./scripts/packages/cadpy
playwright

This configuration installs the cadpy source code as an editable package while pulling in Playwright for headless browser automation during testing.

Additional CAD Formats (URDF, SRDF, SDF, DXF)

Each specialized CAD format maintains independent dependency management:

These files define format-specific Python libraries required for parsing and generating their respective file types.

Viewer Server Components

The viewer's backend components declare Python requirements in viewer/requirements.txt. These dependencies support the server-side functionality that bridges the JavaScript frontend with Python CAD processing pipelines.

Installation Commands

Install the JavaScript dependencies using npm:


# Core CAD runtime

npm install three@0.160.0 gifenc@^1.0.3

# Implicit CAD with testing support

npm install three@0.160.0 gifenc@^1.0.3 playwright@^1.52.0

Install the Python components using pip:


# Install editable cadpy library

pip install --editable ./scripts/packages/cadpy

# Install Playwright for browser automation

pip install playwright

# Install specific skill dependencies (e.g., CAD skill)

pip install -r skills/cad/requirements.txt

To set up the complete viewer environment:

cd viewer
npm install
pip install -r requirements.txt

Key Configuration Files

The dependency graph is distributed across these critical manifest files:

Summary

  • Text-to-CAD combines JavaScript (Node) and Python ecosystems in a monorepo structure.
  • JavaScript dependencies center on Three.js 0.160.0 and gifenc, with Playwright reserved for testing.
  • Python uses an editable cadpy package pattern located in scripts/packages/cadpy.
  • Each CAD skill (URDF, SRDF, SDF, DXF) isolates dependencies in dedicated requirements.txt files within skills/<format>/.
  • Playwright serves dual roles: testing the implicitjs JavaScript runtime and automating browser interactions in Python skills.

Frequently Asked Questions

What JavaScript libraries does text-to-CAD use for 3D rendering?

The project uses Three.js version 0.160.0 as its core 3D rendering engine across both the cadjs and implicitjs packages. It pairs this with gifenc (version ^1.0.3) for GIF animation export functionality. These dependencies are locked in packages/cadjs/package.json and packages/implicitjs/package.json to ensure consistent WebGL behavior across the viewer and implicit CAD runtime.

How do I install the Python CAD helper library?

Install the cadpy package in editable mode by running pip install --editable ./scripts/packages/cadpy from the repository root. This approach, referenced in skills/cad/requirements.txt, allows real-time modifications to the library source without reinstallation. The editable install is required for the CAD skill to function correctly during development.

Does text-to-CAD require Playwright for production use?

No, Playwright is strictly a development and testing dependency. The packages/implicitjs/package.json marks it as a test-only requirement for headless browser validation of the implicit CAD engine. Similarly, Python skills use Playwright for automated testing workflows, but the core CAD generation does not require browser automation to operate.

Where are the dependency files located in the repository?

JavaScript dependencies reside in package.json files under packages/cadjs/, packages/implicitjs/, and viewer/. Python dependencies are distributed across skills/<format>/requirements.txt files (CAD, URDF, SRDF, SDF, DXF) and viewer/requirements.txt. The editable cadpy source is located in scripts/packages/cadpy/.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →