Getting Started
Launch Enrai fast, pick the right runtime model, and know what to do next.
Fastest path
If you want the shortest route to a working Enrai instance, use the portable runtime first and add complexity later.
Use the CLI and run Enrai directly from npm.
npx enrai@latest startUse Docker if you want an isolated runtime with a mounted workspace.
docker run -p 3001:3001 ...Install dependencies and run the editor, backend, and docs separately.
npm installQuick start with npx
If you want the shortest path to a working Enrai instance:
npx enrai@latest startThis launches Enrai with the portable flow and serves the editor from the backend.
If you want to load a local config file:
npx enrai@latest start --config ./enrai.config.jsonOnce it is running, open the editor, point it at a real workspace, and verify three things immediately:
- the file explorer opens the directory you expect
- the terminal starts inside that workspace
- the preview or runtime tab can reach your local app when needed
Quick start with Docker
If you want the portable runtime without installing the repository locally:
Pull the image:
docker pull agentrouter/enroi:latestRun Enrai with your current folder mounted as the workspace:
docker run --rm -it \
-p 3001:3001 \
-e EDITOR_WORKDIR=/workspace \
-e OPENAI_API_KEY=your_key_here \
-v "$(pwd):/workspace" \
agentrouter/enroi:latestOpen:
http://localhost:3001/editorIf you want a different host port, keep Enrai on 3001 inside the container and publish another host port:
docker run --rm -it \
-p 3009:3001 \
-e EDITOR_WORKDIR=/workspace \
-e ENRAI_PUBLIC_URL=http://localhost:3009 \
-e OPENAI_API_KEY=your_key_here \
-v "$(pwd):/workspace" \
agentrouter/enroi:latestOpen:
http://localhost:3009/editorNotes:
- The Docker image already includes the portable frontend, backend,
zsh,fish,oh-my-zsh, andcodex. -p HOST:CONTAINERmust point to the actual internal Enrai port.- Mount a real folder if you want persistent files inside the editor workspace.
For the fuller deployment model and image notes, see Deployment.
Requirements
- Node.js 22 or newer is required for the full Enrai toolchain.
- npm is used throughout this repository.
- macOS, Linux, or WSL is recommended for PTY support.
Develop from source
If you are modifying Enrai itself rather than only using it, install dependencies from the repository root.
Install dependencies
From the repository root:
npm install
cd backend && npm install
cd ../documentation && npm installRun the main workspace
Frontend:
npm run devBackend:
cd backend
npm run devDefault local URLs:
- Frontend:
http://localhost:3000/editor - Backend:
http://localhost:3001
This is the right mode when you want:
- fast iteration on the UI and backend independently
- easier debugging of editor versus server behavior
- separate deploy pipelines later
Run the documentation site
cd documentation
npm run devDefault local URL:
- Docs:
http://localhost:3000/docs
If your main editor app is already using port 3000, Next will pick the next available port automatically.
Portable mode
You can also serve the frontend from the backend:
npm run build:portable
npm run start:portablePortable URL:
http://localhost:3001/editor
Use portable mode when you want the fewest moving pieces in a trusted environment.
Choose your operating model
Best for internal machines, demos, and the shortest setup path.
Best when the UI and the backend need different hosts, proxies, or deploy cadences.
Best when you want reproducibility with a mounted project directory.
Screenshot checklist
Use this as the first product screenshot. It should explain the editor in one glance.
Replace documentation/public/images/editor-main-workspace.png and the docs will update without changing this page.
- Left activity bar visible
- File explorer open with folders collapsed cleanly
- 2 or 3 file tabs open
- A real code file visible in Monaco
- Terminal open at the bottom with useful output
What to read next
- Deployment if you need to choose between portable and split hosting
- Security if the workspace will run anywhere beyond a trusted internal network
- Architecture if you want to understand the editor/backend split and task flow