EnraiEnrai

CLI

Running Enrai from the local bin or future published npx package.

Local usage

From the repository root:

node ./bin/enrai.cjs help
node ./bin/enrai.cjs start --port 4010 --workdir ./backend/projects/demo

Using npm script argument forwarding:

npm run cli -- start --port 4010 --verbose

Planned published usage

Once published to npm:

npx enrai@latest

Global flags

--config ./enrai.config.json
--port 3001
--workdir ./backend/projects
--next-dist-dir .next-portable
--backend-url http://localhost:3001
--serve-next-from-express
--verbose
--codex-home ~/.codex
--codex-config-path ~/.codex/config.toml
--openai-api-key sk-...

Task commands

enrai task enqueue "Refactor the auth middleware"
enrai task enqueue --rollout rollout-2026-03-18T20-28-17-019d03b5-2ac6-77a3-91d9-97c1c18d5f2d.jsonl "Continue the refactor"
enrai task enqueue --instructions "Run tests before finishing" --manifest '{"goal":"safe-change"}' "Add a new endpoint"
enrai task list
enrai task cancel task-1