9Router CLI

raw JSON →
0.4.6 verified Mon Apr 27 auth: no javascript

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.

error Error: Cannot find module '9router'
cause Local install without -g and not using npx
fix
Install globally with 'npm install -g 9router' or use 'npx 9router'.
error EACCES: permission denied, open '/usr/local/lib/node_modules/9router'
cause Global install fails due to insufficient permissions
fix
Use npx instead: 'npx 9router', or fix npm permissions: 'sudo npm install -g 9router'.
error 9router: command not found
cause Global install not on PATH (common on Windows or misconfigured npm)
fix
Use npx: 'npx 9router', or ensure npm global bin directory is in PATH.
error Error: listen EADDRINUSE: address already in use :::20128
cause Port 20128 already occupied by another process
fix
Kill the process using port 20128, or specify a different port: '9router --port 3000'.
breaking Requires Node.js >=18.0.0
fix Upgrade Node.js to version 18 or higher.
gotcha Default port 20128 may conflict with other services
fix Use --port flag to specify a different port, e.g., 9router --port 3000.
gotcha Dashboard only accessible when server is running and browser is opened
fix Ensure server is started with default settings or explicitly open http://localhost:20128/dashboard.
deprecated Auto-update check may be skipped with --skip-update; future versions may remove auto-update
fix Use --skip-update to suppress or update manually via npm.
npm install 9router
yarn add 9router
pnpm add 9router

Installs and runs the 9Router proxy server with optional port and browser flags.

# Install globally
npm install -g 9router
# Start server with default settings
9router
# Or run directly with npx
npx 9router --port 8080 --no-browser