Local development
Run native, Web and Worker clients with isolated data.
Environment and directories
Use Git, Node.js 24 and pnpm 10.34.5. Go versions are specified by the root and native-module go.mod files. NSGo needs platform toolchains: run doctor first and install only your target platforms' tools.
| Path | Responsibility |
|---|---|
apps/site | Website, Fumadocs and Web routes |
packages/web-client | Browser session UI |
packages/client-sdk | Pairing, encrypted RPC, direct connections and IndexedDB |
packages/protocol | TypeScript connection and entitlement interfaces |
packages/worker-core | Self-hosted Worker, D1 and DO |
clients/nsgo | Native UI, host capabilities and platform builds |
internal | Go providers, networking and local storage |
cmd/reignhub-probe | Optional public TCP/UDP probe |
Web and local Worker
pnpm install --frozen-lockfile
pnpm check
pnpm test
pnpm build:web
pnpm exec wrangler d1 migrations apply DB --local
pnpm exec wrangler dev --port 8787Open http://localhost:8787/chat. For website/docs only, use pnpm dev; full connection testing and browser language selection need the Worker environment above. English pages have no language prefix; Chinese pages use /zh-CN. Set SITE_URL at build time to test absolute SEO metadata.
Native UI
cd clients/nsgo
go tool nsgo doctor
AGENTHUB_NSGO_DEMO=1 go tool nsgo devDemo mode uses isolated data without real agents. Native builds use ./scripts/build.sh.
Checks and tests
go vet ./...
go test ./...
cd clients/nsgo
go vet ./...
go test ./...
# Requires a runnable target environment
go tool nsgo test -target macos ./hubuiJavaScript uses pnpm check and pnpm test. Check both Go modules separately. Linux UI tests need GTK 4 and a graphical testing environment.
CI covers native multi-platform builds, React/Worker tests, isolated host integration, probes and release manifests. Main artifacts are not formal Releases. Maintainers manage version tags and signing.