Skip to content

Develop Nerve

Requirements: Node.js 24+, pnpm 11.20.0, and rustup. The repository’s rust-toolchain.toml installs the pinned Rust toolchain (currently 1.97.1).

Terminal window
git clone https://github.com/ThilinaTLM/nerve.git
cd nerve
pnpm install
pnpm desktop
Terminal window
pnpm desktop # Electron app from source
pnpm dev # daemon + Vite workbench
pnpm dev:ui # UI against an existing daemon
pnpm build # TypeScript packages and staged Workbench assets
pnpm build:native # host Rust addon in packages/native/prebuilds/local
pnpm fix # Rust, TypeScript, Svelte, and ESLint fixes
pnpm check # formatting, lint, boundaries, package and Rust checks
pnpm run test:affected # test changed packages and their dependents
pnpm run test:full # run the complete package and Rust test suite

pnpm dev and pnpm desktop build the host native addon automatically. Release prebuilds are separate architecture-specific files and are produced by GitHub Actions.

Enable trusted-LAN and mobile HTTPS access from Settings → System → Network, then restart the owned daemon when prompted.

For UI-only development against a running daemon:

Terminal window
NERVE_API_TARGET=http://127.0.0.1:3747 pnpm dev:ui

For the public site:

Terminal window
pnpm --filter @nervekit/website dev
pnpm --filter @nervekit/website check
pnpm --filter @nervekit/website build

Use explicit NERVE_HOME, ports, and Electron profile overrides for tests that can migrate or mutate state. The normal profile intentionally sits outside NERVE_HOME; changing only one does not fully isolate a desktop test.

Before completing package-scoped code changes, repository policy requires pnpm fix && pnpm check && pnpm run test:affected. Use pnpm run test:full for root, workspace, or test-infrastructure changes and for broad validation. Rerun the same chain after fixes.