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.