EnvCAD is a Windows environmental CAD application for opening, editing, annotating, measuring, and exporting DXF/DWG drawings. Its AI Assistant can use either Claude Code or OpenAI Codex to perform the same strictly bounded CAD tool operations.
The desktop application works as a normal CAD editor when one or both AI providers are unavailable. Provider, model, and effort controls are populated from the installed runtimes; EnvCAD does not maintain a stale model allowlist in the renderer.
EnvCAD v0.2.3 targets Windows 11 x64. Install the generated Squirrel
EnvCAD-0.2.3 Setup.exe, then launch EnvCAD from the Desktop shortcut or
Start menu. The installer is currently unsigned, so Windows may show a
SmartScreen warning.
Version 0.2.3 lets either supported AI provider inspect the actual Sheet Preview through a bounded, in-memory image generated from the same final SVG shown in the UI. Inspect with AI uses the selected provider, model, and effort without switching providers or granting screen, browser, shell, or filesystem access. The renderer and sidecar independently recompute the image SHA-256 before a provider can receive it. Claude runs one non-persistent streaming SDK session per in-app conversation, so preview Base64 is not written to Claude project transcripts; the upgrade also removes only legacy EnvCAD-runtime transcript directories created by earlier development builds. The explicit document lifecycle, deterministic Fit Drawing, per-drawing sheet setup, and unit/clipping safeguards from 0.2.2 remain intact.
The AI Assistant requires whichever local provider you intend to use:
- Claude Code
2.1.220, authenticated with an existing Claude subscription login (claude auth login). - Codex CLI
0.145.0, authenticated with an existing ChatGPT login (codex login).
EnvCAD deliberately rejects ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN,
CLAUDE_CODE_OAUTH_TOKEN, OPENAI_API_KEY, CODEX_API_KEY, and
CODEX_ACCESS_TOKEN. It neither reads nor packages provider authentication
files.
After launch, open AI Assistant, select a provider, choose one of its live models, and optionally choose an advertised effort. Default delegates effort selection to that provider. A prompt is not sent until the sidecar acknowledges the exact provider/model/effort configuration. Switching configuration starts a new conversation; there is no provider-to-provider fallback.
- Open ASCII DXF and supported DWG files.
- Start a clean document with New Drawing, then render, pan, zoom, select, inspect layers, and use deterministic Fit Drawing.
- Draw and transform lines, polylines, rectangles, circles, arcs, text, hatches, dimensions, leaders, and environmental symbols.
- Measure area, length, overlap, containment, and clearance using drawing database geometry.
- Import CSV boundaries and GeoJSON geometry.
- Configure page size, scale, orientation, and title blocks.
- Save searchable DXF and export vector PDF.
- Autosave, undo/redo, single-instance desktop behavior, and clean install/uninstall lifecycle.
The packaged renderer runs on a random loopback origin with Electron context isolation and sandboxing enabled. A token- and origin-authenticated loopback WebSocket connects it to one Electron utility process.
The utility process contains a provider-neutral coordinator:
ClaudeProvideruses the installed Claude Agent SDK and Claude Code subscription login.CodexProviderusescodex app-server --stdiowith the existing ChatGPT login.- Both adapters are generated from one canonical 35-tool CAD catalog.
- Browser CAD tool calls are schema-validated, serialized, bounded by timeouts, and each mutating call remains one undo step.
- The providers receive no arbitrary renderer IPC.
Codex runs in an empty per-session directory under
%LOCALAPPDATA%\EnvCAD\ai-runtime, with a read-only sandbox, never approvals,
web/shell/apps/connectors/plugins/skills/subagents disabled, and every
user-configured MCP server explicitly disabled. A short-lived zero-turn
config/read probe discovers validated MCP names; a separate production process
then proves those servers are disabled and inert and that no unexpected
codex_apps surface exists before account/model access or conversation startup.
EnvCAD validates runtime settings and passive-notification schemas, requires
ChatGPT authentication to remain active, pins the official OpenAI provider and
ChatGPT backend, re-attests the account before discovery and every conversation,
and treats command, file, web, app, connector, MCP, or subagent events as
security failures.
User prompts have no fixed character-count limit. EnvCAD preserves prompt text
and formatting and applies the 2 MiB ceiling only to the complete serialized
WebSocket request, whose selection and sheet context also consume capacity.
ultra is never advertised as an effort, and a model whose provider default is
ultra is omitted because EnvCAD is intentionally single-agent.
Claude is configured with no built-in tools and may invoke only
mcp__cad__*. Its settings, skills, and plugins are excluded. Its SDK query is
streaming and non-persistent (persistSession: false) and never resumes a
disk-backed transcript.
See desktop architecture, agent protocol, and benchmark method.
Prerequisites:
- Windows 11
- Node.js 24 or a compatible current Node.js release
- npm
- Provider runtimes only when exercising live AI
git clone https://github.com/ljdstechva/EnvCAD.git
Set-Location EnvCAD
npm ci
npm run devFor the Electron application:
npm run desktop:devThe browser development server uses the deterministic fake sidecar for E2E tests. Normal automated tests never send real provider requests.
npm run test
npm run typecheck
npm run build
npm run test:e2e
npm run test:desktop
npm run desktop:make
npm audit --omit=dev
git diff --checkThe explicit live benchmark is opt-in:
npm run benchmark:ai -- --liveIt uses only a generated metre-unit drawing and the two deterministic benchmark
prompts. Raw transcripts, DXFs, screenshots, and machine-specific timings are
written under ignored output/desktop/ai-benchmark/. The command refuses to
make a model call without --live and enforces its own turn budget.
The installed visual acceptance is also opt-in and requires the M-01 drawing:
npm run acceptance:visual-installed -- --live --scope=full --drawing "C:\path\to\M-01.dxf"It sends bounded Sheet Preview images to both selected subscription providers and writes screenshots plus a machine-readable report outside the source tree. Release acceptance additionally drives both live providers through the actual installed Windows shortcut with OS-level UI automation, records the installed process path and screenshots, verifies normal close/runtime cleanup, and merges that evidence into the report.
See TESTING.md for suite boundaries and installed-app checks.
Ctrl+O— open a drawingCtrl+S— save DXFCtrl+Z/Ctrl+Y— undo / redoDelete— erase selected entities- Middle-button drag — pan
- Mouse wheel — zoom
- Theme toggle — light/dark canvas and UI
EnvCAD validates obvious invalid files before opening, keeps unrelated files untouched, and writes user-selected DXF/PDF outputs only. AI preferences contain provider/model/effort identifiers and optional benchmark recommendations—never credentials. Corrupt preferences recover to the existing-user default of Claude Code.