Skip to content

jergensturdley/9rh

Repository files navigation

9rh

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.

Highlights

  • Local repo agent — run coding tasks against a selected working directory.
  • 9router-native — uses OpenAI-compatible /v1 calls for completions and native /api calls 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-exec when available with visible /sandbox status.
  • 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.

Quick start

git clone https://github.com/jergensturdley/9rh.git
cd 9rh
npm install
npm run build

Install and start 9router in another terminal:

npm install -g 9router
9router

Then 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 --repl

Run against a specific directory and model:

node dist/index.js --dir /path/to/project --model kr/claude-sonnet-4.5 "fix the failing tests"

Requirements

  • Node.js 18+
  • 9router, installed and running locally
  • At least one provider configured in the 9router dashboard: http://localhost:20128/dashboard

Common slash commands

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

Documentation

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.

Development

npm install
npm run build
npm test

License

See the repository license.