- Source code:
src/ - Tests: colocated
*.test.ts - Docs:
docs/ - Plugins/extensions:
extensions/* - Apps:
apps/(Android, iOS, macOS)
- Runtime: Node 22+
- Install deps:
pnpm install - Build:
pnpm build - Lint/format:
pnpm check - Tests:
pnpm test - Dev mode:
pnpm dev
- Language: TypeScript (ESM)
- Formatting/linting: Oxlint + Oxfmt
- Run
pnpm checkbefore commits
- Default: restart gateway after each modification — After any code change that affects the gateway (including
src/gateway/,ui/, config, etc.), automatically restart the gateway so the user can verify changes without manual steps.
After any change to ui/ (styles, components, app-render, etc.):
- Run
pnpm ui:buildto updatedist/control-ui - Stop processes on port 19001 (if gateway is running)
- Restart gateway:
$env:OPENSOUL_SKIP_CHANNELS="1"; $env:OPENSOUL_GATEWAY_TOKEN="dev-token"; node scripts/run-node.mjs --dev gateway(PowerShell)
| Service | Command | Port | Notes |
|---|---|---|---|
| Gateway (core) | OPENSOUL_SKIP_CHANNELS=1 OPENSOUL_GATEWAY_TOKEN=dev-token pnpm gateway:dev |
19001 | Serves HTTP + WS + Web Control UI |
- Gateway requires a token: set
OPENSOUL_GATEWAY_TOKENenv var or pass--token. Without it the process exits immediately with an auth error. OPENSOUL_SKIP_CHANNELS=1: use this when running the gateway locally to avoid loading channel extensions that require external API credentials.- Build before gateway:dev on first run:
pnpm gateway:dev(viascripts/run-node.mjs) auto-rebuilds ifdist/is stale, but the first UI build is triggered automatically. SetOPENSOUL_A2UI_SKIP_MISSING=1when building if A2UI canvas sources are absent (they usually are). .npmrcGITHUB_TOKEN warning: harmless; the token is only needed for publishing to GitHub Packages. Can be ignored during local dev.- Tests (
pnpm test): runs 3 vitest configs in parallel/serial viascripts/test-parallel.mjs(unit, extensions, gateway). Total ~850 test files, ~5 400 tests. Takes ~8 min in a Cloud VM. Thecanvas:a2ui:bundlestep is a prerequisite for tests (CI runs it inline). - Pre-existing lint/format issues:
pnpm lint(oxlint) reports ~13 errors inui/andpnpm format(oxfmt) reports ~50 format issues — all pre-existing in the repo. - No external DB: uses embedded SQLite (
sqlite-vec); no Postgres/Redis setup needed.