{"id":20889,"library":"9router","title":"9Router CLI","description":"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.","status":"active","version":"0.4.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","9router","cli","proxy","ai","api"],"install":[{"cmd":"npm install 9router","lang":"bash","label":"npm"},{"cmd":"yarn add 9router","lang":"bash","label":"yarn"},{"cmd":"pnpm add 9router","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Node.js >=18.0.0 for runtime","package":"node","optional":false}],"imports":[{"note":"This is a CLI tool, not a library. Use npx or global install to run the server.","wrong":"npm start 9router","symbol":"default","correct":"npx 9router"},{"note":"9router is a CLI only, not a programmatic API. Do not attempt to import or require it in code.","wrong":"const router = require('9router')","symbol":"require('9router')","correct":"import is not supported; use CLI directly"},{"note":"Local install works but CLI won't be on PATH. Use -g or npx for direct CLI access.","wrong":"npm install 9router (local install)","symbol":"global install","correct":"npm install -g 9router"}],"quickstart":{"code":"# Install globally\nnpm install -g 9router\n# Start server with default settings\n9router\n# Or run directly with npx\nnpx 9router --port 8080 --no-browser","lang":"javascript","description":"Installs and runs the 9Router proxy server with optional port and browser flags."},"warnings":[{"fix":"Upgrade Node.js to version 18 or higher.","message":"Requires Node.js >=18.0.0","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use --port flag to specify a different port, e.g., 9router --port 3000.","message":"Default port 20128 may conflict with other services","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure server is started with default settings or explicitly open http://localhost:20128/dashboard.","message":"Dashboard only accessible when server is running and browser is opened","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use --skip-update to suppress or update manually via npm.","message":"Auto-update check may be skipped with --skip-update; future versions may remove auto-update","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install globally with 'npm install -g 9router' or use 'npx 9router'.","cause":"Local install without -g and not using npx","error":"Error: Cannot find module '9router'"},{"fix":"Use npx instead: 'npx 9router', or fix npm permissions: 'sudo npm install -g 9router'.","cause":"Global install fails due to insufficient permissions","error":"EACCES: permission denied, open '/usr/local/lib/node_modules/9router'"},{"fix":"Use npx: 'npx 9router', or ensure npm global bin directory is in PATH.","cause":"Global install not on PATH (common on Windows or misconfigured npm)","error":"9router: command not found"},{"fix":"Kill the process using port 20128, or specify a different port: '9router --port 3000'.","cause":"Port 20128 already occupied by another process","error":"Error: listen EADDRINUSE: address already in use :::20128"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}