Installation
Prerequisites
Section titled “Prerequisites”Before installing Wire-DSL, ensure you have:
- Node.js 20+ (LTS version recommended)
- pnpm 8+ (fast, space-efficient package manager)
Verify your versions:
node --version # Should be 20 or higherpnpm --version # Should be 8 or higherQuick Setup
Section titled “Quick Setup”1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/Wire-DSL/wire-dsl.gitcd wire-dsl2. Install Dependencies
Section titled “2. Install Dependencies”pnpm installThis command installs all dependencies for the entire monorepo including the parser, CLI, web editor, and all supporting packages.
3. Verify Installation
Section titled “3. Verify Installation”Run the build and tests to confirm everything is working:
pnpm buildpnpm type-checkpnpm testAll commands should complete without errors.
Start the Web Editor
Section titled “Start the Web Editor”The easiest way to start building wireframes is with the interactive web editor:
cd apps/webpnpm devThen open your browser to http://localhost:3000 and you’ll see the Wire-DSL editor with live preview.
Alternative: Use the CLI
Section titled “Alternative: Use the CLI”If you prefer working with command-line tools:
cd packages/clipnpm buildnode dist/index.js --helpThis shows all available CLI commands for rendering and validating .wire files.
Project Structure
Section titled “Project Structure”The monorepo is organized into several packages:
- @wire-dsl/engine – Parser, IR generator, layout engine, and SVG renderer
- @wire-dsl/exporters – Export to SVG, PNG, and PDF
- @wire-dsl/cli – Command-line interface
- @wire-dsl/web – Live web editor (React + Monaco)
Common Development Commands
Section titled “Common Development Commands”From the root directory:
pnpm dev # Start all dev serverspnpm build # Build all packagespnpm test # Run all testspnpm lint # Check code stylepnpm lint:fix # Fix linting issuespnpm format # Format all codepnpm type-check # Validate TypeScriptpnpm clean # Remove all build artifactsTroubleshooting
Section titled “Troubleshooting”pnpm: command not found
Section titled “pnpm: command not found”Install pnpm globally:
npm install -g pnpmBuild fails with TypeScript errors
Section titled “Build fails with TypeScript errors”Ensure you’re running Node.js 20+ and pnpm 8+:
node --versionpnpm --versionPort 3000 already in use
Section titled “Port 3000 already in use”If port 3000 is already in use, the web editor will automatically try the next available port. Check the terminal output for the actual URL.