Install
Three ways to install kRouter.
Pick NPM if you just want it to work. Pick Docker if you self-host. Pick Git if you want to hack on the code. All three are MIT-licensed, free, and self-hosted.
Recommended
Install via NPM
Requires Node.js 20+. Global install runs the tray app and dashboard locally.
npm install -g @sifxprime/krouterkrouter -tnpm install -g @sifxprime/krouter@latestDashboard opens at http://localhost:20128/dashboard
Self-host
Install via Docker
Multi-platform linux/amd64 + linux/arm64. Published to Docker Hub and GitHub Container Registry.
docker run -d \
-p 20128:20128 \
-v "$HOME/.krouter:/app/data" \
-e DATA_DIR=/app/data \
--name krouter \
sifxprime/krouter:latestdocker pull ghcr.io/sifxprime/krouter:latestdocker logs -f krouter # tail logs
docker stop krouter # stop
docker start krouter # start again
docker rm -f krouter # removeFor development
Install via Git
Clone the repo if you want to modify the code or run the hot-reloading dev server. Requires Node.js 20+ and Git.
git clone https://github.com/sifxprime/krouter.git
cd krouter
npm install
npm run devnpm run build:deploy
npm run startCleanup
Uninstall
Three steps: stop the server, remove the package, then optionally remove the local data directory.
# Right-click the tray icon → Quit
# or:
pkill -f krouternpm uninstall -g @sifxprime/krouterrm -rf ~/.krouterThe ~/.krouter directory holds your OAuth refresh tokens, provider settings, request history, and the MITM root CA. Step 3 is irreversible — back it up first if you might reinstall.
Prerequisites
| Tool | Minimum | Notes |
|---|---|---|
| Node.js | ≥ 20 (22 recommended) | node -v to check. Windows: nodejs.org. macOS: brew install node@22. |
| Sudo / admin | Only for MITM mode | Pure router mode (chat completions only) needs no privileges. MITM intercept for Kiro / Antigravity / Cursor binds :443 and edits /etc/hosts. |
What happens next
On first run, kRouter creates ~/.krouter/ (SQLite DB, machine-id, MITM CA). It is per-user and fully reset by deleting that folder.
- Dashboard → Providers → click any tile (free tier first: Kiro, OpenCode Free, Vertex).
- Dashboard → API Keys → create one local key (e.g. sk-krouter-XXXX).
- Point your IDE at http://localhost:20128/v1 with that key.
FAQ
Install questions
Which IDEs and tools work with kRouter?
Any OpenAI-compatible client: Claude Code, Cursor, Cline, Aider, Continue, Roo, Windsurf, Kiro, OpenCode, Kimi, Gemini CLI, and more. kRouter also intercepts IDE traffic via MITM mode for clients that hardcode their endpoint, and translates between OpenAI, Claude, Gemini, Vertex, and Ollama request formats automatically.
Can I run kRouter on a server for my whole team?
Yes. Deploy kRouter on a $5/month VPS behind nginx or Tailscale and point every teammate's IDE at the shared endpoint so quota pools across the team. Headless providers like Kiro now support API-key (ksk_) auth, so you can connect them without a browser login on a server.
How do I install kRouter?
Run "npm install -g @sifxprime/krouter && krouter -t", then open the dashboard at http://localhost:20128/dashboard, connect a provider, and point your IDE at http://localhost:20128. Docker and source-build installs are also supported. It takes about 30 seconds.