9rh is a lightweight, 9router-native local coding-agent harness. It routes model traffic through 9router, runs one-shot tasks, opens an interactive REPL, and provides sandbox-aware local repository tools.
- Local repo agent — run coding tasks against a selected working directory.
- 9router-native — uses OpenAI-compatible
/v1calls for completions and native/apicalls for diagnostics, provider config, combos, and keys. - Interactive REPL — slash commands for models, providers, router status, sandbox status, working directory, setup, and diagnostics.
- Sandbox-aware tools — file operations are path-checked, symlinks are blocked for file reads/writes, and shell commands use macOS
sandbox-execwhen available with visible/sandboxstatus. - Spec, replay, and repair systems — optional spec-driven task framing, live run visualization, replay logs, checkpoints, error taxonomy, and repair hooks.
- Programmatic API — import the core agent, tools, visualization, spec, replay, and sandbox primitives from the package.
git clone https://github.com/jergensturdley/9rh.git
cd 9rh
npm install
npm run buildInstall and start 9router in another terminal:
npm install -g 9router
9routerThen open the dashboard and connect at least one provider/API key:
http://localhost:20128/dashboard
Finally, verify and run a task:
node dist/index.js --doctor
node dist/index.js "summarize this repository"Start the interactive REPL:
node dist/index.js --replRun against a specific directory and model:
node dist/index.js --dir /path/to/project --model kr/claude-sonnet-4.5 "fix the failing tests"- Node.js 18+
- 9router, installed and running locally
- At least one provider configured in the 9router dashboard:
http://localhost:20128/dashboard
| Command | Description |
|---|---|
/models [filter] |
List available models |
/switch <model> |
Change the active model |
/router |
Show cached 9router configuration summary |
/refresh |
Reload cached router configuration |
/providers |
List provider connections |
/combos |
List fallback chains |
/keys |
List 9router API keys |
/sandbox |
Show command isolation backend status |
/doctor |
Diagnose connectivity and configuration |
/dir [path] |
Show or change working directory |
Full setup, CLI options, REPL commands, sandbox notes, replay, repair, and programmatic API documentation live in:
If GitHub Pages is enabled for this repository, publish docs/full-documentation.md as the main documentation page.
npm install
npm run build
npm testSee the repository license.