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

> Discover essential text-to-CAD dependencies. Explore Node.js and Python package requirements including three, gifenc, cadpy, and playwright for seamless CAD generation.

- Repository: [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad)
- Tags: how-to-guide
- Published: 2026-08-02

---

**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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/requirements.txt) file specifies:

```text
--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:

- **URDF skill**: [`skills/urdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/requirements.txt)
- **SRDF skill**: [`skills/srdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/requirements.txt)
- **SDF skill**: [`skills/sdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/requirements.txt)
- **DXF skill**: [`skills/dxf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/requirements.txt)

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`](https://github.com/earthtojake/text-to-cad/blob/main/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:

```bash

# 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:

```bash

# 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:

```bash
cd viewer
npm install
pip install -r requirements.txt

```

## Key Configuration Files

The dependency graph is distributed across these critical manifest files:

- **[`packages/cadjs/package.json`](https://github.com/earthtojake/text-to-cad/blob/main/packages/cadjs/package.json)** — Core Three.js and GIF encoding libraries
- **[`packages/implicitjs/package.json`](https://github.com/earthtojake/text-to-cad/blob/main/packages/implicitjs/package.json)** — Implicit CAD runtime with Playwright testing
- **[`skills/cad/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/requirements.txt)** — Editable `cadpy` installation and Playwright
- **[`skills/urdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/requirements.txt)**, **[`skills/srdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/requirements.txt)**, **[`skills/sdf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/requirements.txt)**, **[`skills/dxf/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/requirements.txt)** — Format-specific Python packages
- **[`viewer/package.json`](https://github.com/earthtojake/text-to-cad/blob/main/viewer/package.json)** — Top-level viewer JavaScript dependencies
- **[`viewer/requirements.txt`](https://github.com/earthtojake/text-to-cad/blob/main/viewer/requirements.txt)** — Viewer server-side Python dependencies

## 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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/packages/cadjs/package.json) and [`packages/implicitjs/package.json`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/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`](https://github.com/earthtojake/text-to-cad/blob/main/viewer/requirements.txt). The editable `cadpy` source is located in `scripts/packages/cadpy/`.