Building from Source¶
Set up a development environment for Dial Code.
Prerequisites¶
Node.js¶
Requires Node.js 20 or higher:
Install via nvm:
Git¶
Clone and Install¶
# Clone the repository
git clone https://github.com/neul-labs/dial-coder.git
cd dial-coder
# Install dependencies
npm install
Build¶
Full Build¶
Builds all packages:
packages/clipackages/corepackages/vscode-ide-companion
Build Specific Package¶
Run from Source¶
Development Mode¶
With Debug Output¶
Debug with Chrome DevTools¶
Then open chrome://inspect in Chrome.
Testing¶
Unit Tests¶
Watch Mode¶
Specific Package¶
Integration Tests¶
Requires API keys in environment.
Code Quality¶
Linting¶
Formatting¶
Type Checking¶
All Checks (Preflight)¶
Run this before submitting PRs.
Development Scripts¶
| Script | Description |
|---|---|
npm start |
Run from source |
npm run build |
Build all packages |
npm run test |
Run unit tests |
npm run test:e2e |
Run integration tests |
npm run lint |
Check linting |
npm run lint:fix |
Fix lint issues |
npm run format |
Format code |
npm run typecheck |
Check types |
npm run preflight |
Run all checks |
npm run debug |
Run with debugger |
Project Structure¶
dial-coder/
├── packages/
│ ├── cli/ # Terminal interface
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── core/ # Backend engine
│ │ ├── src/
│ │ ├── package.json
│ │ └── tsconfig.json
│ └── ...
├── package.json # Root package
├── tsconfig.json # Root TS config
└── eslint.config.js # ESLint config
Workspace Commands¶
This is a monorepo using npm workspaces.
Run in All Packages¶
Run in Specific Package¶
IDE Setup¶
VS Code¶
Recommended extensions:
- ESLint
- Prettier
- TypeScript
Settings:
WebStorm / IntelliJ¶
- Enable ESLint integration
- Enable Prettier integration
- Configure Node.js interpreter
Common Issues¶
"Module not found"¶
Run build first:
Type Errors¶
Ensure all packages are built:
Permission Errors¶
On Linux/macOS:
Environment Variables¶
For development:
export DEBUG=1 # Enable debug output
export DEV=true # Development mode
export VERBOSE=true # Verbose test output
Next Steps¶
- Architecture - System design
- Contributing - PR guidelines