Commands
npm Scripts
Section titled “npm Scripts”All commands are run from the monorepo root.
Development
Section titled “Development”| Command | Description |
|---|---|
npm run dev:core | Start Core daemon with hot-reload (port 9100) |
npm run dev:maestro | Start Maestro service with hot-reload (port 9200) |
npm run dev:web | Start Web Client dev server (port 5173) |
npm run dev:cli | Start CLI client in development mode |
| Command | Description |
|---|---|
npm run build | Build all packages (respects dependency graph) |
npx nx run @condrix/core:build | Build a specific package |
npx nx run-many -t build | Build all packages (explicit NX form) |
npx nx affected -t build | Build only packages affected by recent changes |
Test & Quality
Section titled “Test & Quality”| Command | Description |
|---|---|
npm test | Run all tests with Vitest |
npm run lint | Lint all packages with ESLint |
npm run typecheck | Type-check all packages with tsc --noEmit |
npx nx affected -t test | Test only affected packages |
npx nx affected -t lint | Lint only affected packages |
Utilities
Section titled “Utilities”| Command | Description |
|---|---|
npm install | Install all dependencies (npm workspaces) |
npx nx graph | Open interactive dependency graph in browser |
npx nx reset | Clear NX cache |
NX Task Runner
Section titled “NX Task Runner”Condrix uses NX for build orchestration. NX automatically:
- Respects dependency order —
@condrix/protocolbuilds before packages that depend on it - Caches results — Unchanged packages skip rebuilding
- Parallelizes — Independent packages build concurrently
Running Tasks on Specific Packages
Section titled “Running Tasks on Specific Packages”# Build just the protocol librarynpx nx run @condrix/protocol:build
# Test just the corenpx nx run @condrix/core:test
# Lint the web clientnpx nx run @condrix/client-web:lintRunning Tasks on Affected Packages
Section titled “Running Tasks on Affected Packages”After making changes, run tasks only on packages that could be affected:
# Test affected packages since last commitnpx nx affected -t test
# Build affected packages against main branchnpx nx affected -t build --base=mainCore CLI Options
Section titled “Core CLI Options”The Core daemon accepts command-line options that override environment variables:
# Specify portnpm run dev:core -- --port 9101
# Specify bind addressnpm run dev:core -- --host 0.0.0.0
# Set log levelnpm run dev:core -- --log-level debug
# Specify data directorynpm run dev:core -- --data-dir /path/to/data
# Combine optionsnpm run dev:core -- --port 9101 --host 0.0.0.0 --log-level debugOption Reference
Section titled “Option Reference”| Option | Short | Default | Description |
|---|---|---|---|
--port | -p | 9100 | WebSocket listen port |
--host | -h | 127.0.0.1 | Bind address |
--log-level | -l | info | Log verbosity |
--data-dir | -d | ~/.condrix | Data directory |
--maestro-url | -m | — | Maestro WebSocket URL |
Maestro CLI Options
Section titled “Maestro CLI Options”# Specify portnpm run dev:maestro -- --port 9201
# Set log levelnpm run dev:maestro -- --log-level debugDevelopment Workflow
Section titled “Development Workflow”A typical development session:
# 1. Install dependencies (first time or after pulling)npm install
# 2. Start Core in one terminalnpm run dev:core
# 3. Start Web Client in another terminalnpm run dev:web
# 4. Open http://localhost:5173 in your browser
# 5. Make changes — hot-reload handles the rest
# 6. Run tests before committingnpm test
# 7. Type-check before pushingnpm run typecheck