⚠️ Active Development — This project is under active development. Use at your own risk. Expect breaking changes.
Spawn and manage coding agents (Claude Code, Codex, etc.) across machines with a live browser terminal.
Prerequisites: Node.js 22+, pnpm 9+, Docker
pnpm installTroubleshooting: If
pnpm installfails withsh: node-gyp: not found, install it globally first:npm install -g node-gypThis is required to compile the
node-ptynative addon.
docker compose up -d
# Starts: Postgres 16 (port 5432), Redis 7 (port 6379), MinIO (ports 9000/9001)cp .env.example .envEdit .env and set:
SESSION_PASSWORD— any random 32+ character string (e.g.openssl rand -base64 32)DEFAULT_HOST_TOKEN— any random token (e.g.openssl rand -hex 32). Copy this value; you'll use it to start the daemon.ADMIN_USERNAME/ADMIN_PASSWORD— your admin login credentials
The migration and seed commands read env vars from .env automatically via Next.js/pnpm.
# Load the .env file into your shell first
set -a && source .env && set +a
# Create the database schema
pnpm --filter web exec prisma migrate dev --name init
# Seed admin user, Claude Code profile, and local-dev host
pnpm --filter web db:seed
# Generate the Prisma client (required before first run)
pnpm --filter web exec prisma generatepnpm dev
# Starts the Next.js server at http://localhost:3000
# Env vars are loaded automatically from .envFirst, build the shared protocol package if you haven't already:
pnpm --filter @orchestrator/protocol buildThen start the daemon:
set -a && source .env && set +a
pnpm --filter daemon devThe daemon reads SERVER_WS_URL, HOST_NAME, and HOST_TOKEN from the environment (sourced from .env above).
Use --cwd <path> (or -c <path>) to set the working directory for spawned sessions:
pnpm --filter daemon dev -- --cwd /path/to/projectsNavigate to http://localhost:3000 and log in with your ADMIN_USERNAME / ADMIN_PASSWORD from .env.
Once logged in, go to New Session — the local-dev host should appear in the dropdown (the daemon connects on startup). Click Spawn Agent Session to launch a live terminal.
- Log in as admin and navigate to Hosts (DNS icon in the sidebar).
- Click Register Host, enter a name (e.g.
production-1), and click Generate Token. - Copy the token — it's shown only once.
- On the host machine, set
HOST_TOKENto this token and restart the daemon.
- Navigate to Profiles (tune icon in the sidebar).
- Click New Profile and fill in the name, command, arguments, and environment variables.
- Profiles support any agent variant — native Claude Code, OpenRouter, custom base URL, etc.
- Create a Railway project with a Postgres plugin.
- Set all env vars from
.env.exampleon the web service. - Push — Railway builds from
apps/web/Dockerfile. - Add a Railway service for the daemon, pointing
SERVER_WS_URLat your Railwaywss://URL.
| Package | Purpose |
|---|---|
packages/protocol |
Shared Zod wire-protocol schemas |
packages/config |
Shared tsconfig + ESLint config |
apps/web |
Next.js 15 app (UI + API + WS hub + Prisma) |
apps/daemon |
Host PTY daemon |
pnpm build # build all packages
pnpm test # run all tests
pnpm lint # lint all packages
pnpm typecheck # typecheck all packagesSee .env.example for a full list. Required vars:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
REDIS_URL |
Redis connection string |
SESSION_PASSWORD |
iron-session encryption key (32+ chars) |
ADMIN_USERNAME |
Initial admin username (seed) |
ADMIN_PASSWORD |
Initial admin password (seed) |
DEFAULT_HOST_TOKEN |
Token for the local-dev daemon (seed) |
SERVER_WS_URL |
(daemon) WS URL of the web server |
HOST_NAME |
(daemon) Name of this host |
HOST_TOKEN |
(daemon) Token matching DEFAULT_HOST_TOKEN |