Skip to main content
kRouter

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.

Installbash
npm install -g @sifxprime/krouter
Run in backgroundbash
krouter -t
Upgrade laterbash
npm install -g @sifxprime/krouter@latest

Dashboard 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.

Runbash
docker run -d \
  -p 20128:20128 \
  -v "$HOME/.krouter:/app/data" \
  -e DATA_DIR=/app/data \
  --name krouter \
  sifxprime/krouter:latest
Or from GHCRbash
docker pull ghcr.io/sifxprime/krouter:latest
Manage containerbash
docker logs -f krouter      # tail logs
docker stop krouter         # stop
docker start krouter        # start again
docker rm -f krouter        # remove

For 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.

Clone & startbash
git clone https://github.com/sifxprime/krouter.git
cd krouter
npm install
npm run dev
Production buildbash
npm run build:deploy
npm run start

Cleanup

Uninstall

Three steps: stop the server, remove the package, then optionally remove the local data directory.

1. Stop the serverbash
# Right-click the tray icon → Quit
# or:
pkill -f krouter
2. Remove the packagebash
npm uninstall -g @sifxprime/krouter
3. Optional — remove local databash
rm -rf ~/.krouter

The ~/.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

ToolMinimumNotes
Node.js≥ 20 (22 recommended)node -v to check. Windows: nodejs.org. macOS: brew install node@22.
Sudo / adminOnly for MITM modePure 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.

  1. Dashboard → Providers → click any tile (free tier first: Kiro, OpenCode Free, Vertex).
  2. Dashboard → API Keys → create one local key (e.g. sk-krouter-XXXX).
  3. Point your IDE at http://localhost:20128/v1 with that key.