9Router CLI
raw JSON →9Router CLI (v0.4.6) is a command-line tool for running a local AI endpoint proxy server with a web dashboard. It consolidates access to 15+ AI providers (Claude, OpenAI, Gemini, GitHub Copilot, Qwen, iFlow, DeepSeek, etc.) behind a single OpenAI-compatible endpoint. It supports OAuth2 and API key authentication, automatic format translation between provider-specific schemas (OpenAI, Claude, Gemini, Codex), a combo system for model fallback, and intelligent account rotation on rate limits or errors. The CLI installs globally or runs via npx. It is designed for tools like Claude Code, Cline, RooCode, AmpCode, and Cursor IDE. The project is actively maintained with a focus on simplicity and multi-provider unification, differentiating from single-provider or heavier proxy solutions.
Common errors
error Error: Cannot find module '9router' ↓
error EACCES: permission denied, open '/usr/local/lib/node_modules/9router' ↓
error 9router: command not found ↓
error Error: listen EADDRINUSE: address already in use :::20128 ↓
Warnings
breaking Requires Node.js >=18.0.0 ↓
gotcha Default port 20128 may conflict with other services ↓
gotcha Dashboard only accessible when server is running and browser is opened ↓
deprecated Auto-update check may be skipped with --skip-update; future versions may remove auto-update ↓
Install
npm install 9router yarn add 9router pnpm add 9router Imports
- default wrong
npm start 9routercorrectnpx 9router - require('9router') wrong
const router = require('9router')correctimport is not supported; use CLI directly - global install wrong
npm install 9router (local install)correctnpm install -g 9router
Quickstart
# Install globally
npm install -g 9router
# Start server with default settings
9router
# Or run directly with npx
npx 9router --port 8080 --no-browser