Your friendly, blazing-fast, self-hostable AI gateway.
$ npx -y skills add mydisha/keirouter --agent claude-code
You use AI coding tools โ Claude Code, Codex, Cursor, Cline, or honestly anything that talks to OpenAI, Anthropic or Gemini. And you know the headaches: a drawer full of API keys, rate limits that hit at the worst time, and a token bill that keeps creeping up.
KeiRouter is the smart middleman that makes all of that someone else's problem. Point your tools at one local endpoint and let it handle the boring stuff โ routing each request to the right model, failing over the moment a provider taps out, caching repeat questions, and squeezing oversized prompts down before they ever cost you a token.
Oh, and it's written in Go. So it's light on memory, boots instantly, ships as one binary plus a static dashboard, and the dashboard is actually nice to look at. โจ
Heads up: KeiRouter is under active development. Check the CHANGELOG for what landed recently, and peek at Architecture to see how a request flows.
Routing & reliability
Cost control
Safety & governance
Operations & UX
| Chains โ build fallback routes and preview them live | Providers โ each provider asks for exactly the credentials it needs |
| Provider health โ uptime, fallbacks and p95 latency per upstream | Guardrails โ scoped policies with a dry-run tester |
| Audit log โ hash-chained sign-ins and config changes | Endpoints โ base URL, quick-start snippets and API reference |
| Token saving โ toggle each saver independently | CLI tools โ detects your coding tools and configures them in one click |
Three steps on any OS: install โ start โ open the dashboard. Prebuilt binaries mean no Go, no Node, and no config file.
| Your machine | Install with | Run in the background with |
|---|---|---|
| ๐ macOS | Homebrew | brew services start keirouter |
| ๐ช Windows 10/11 | PowerShell one-liner | keirouter tray |
| ๐ง Linux (Ubuntu, Debian, Fedora, โฆ) | Shell one-liner | --service (systemd) |
| ๐ณ Server / VPS | Docker Compose | Docker itself |
brew tap mydisha/keirouter https://github.com/mydisha/keirouter
brew install keirouter
keirouter start
Your browser opens the dashboard. Want it running all the time, even after a reboot?
brew services start keirouter # starts now and on every login
Prefer a menu-bar icon you can quit any time? Run keirouter tray instead.
curl -fsSL https://raw.githubusercontent.com/mydisha/keirouter/main/scripts/install.sh | bash
It downloads the right build for Apple Silicon or Intel, checks its checksum, and installs keirouter to /usr/local/bin (it may ask for your password once).
Open PowerShell and run:
irm https://raw.githubusercontent.com/mydisha/keirouter/main/scripts/install.ps1 | iex
Then open a new terminal (so the PATH change applies) and start it:
keirouter start
Want it in the background? keirouter tray puts an icon in the taskbar tray. To start it automatically when you log in, add a shortcut to your Startup folder:
$s = (New-Object -ComObject WScript.Shell).CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\KeiRouter.lnk"); $s.TargetPath = (Get-Command keirouter).Source; $s.Arguments = "tray --no-browser"; $s.WindowStyle = 7; $s.Save()
Pin a version or change the location with
$env:KEIROUTER_VERSION/$env:KEIROUTER_DIRbefore running the installer.
curl -fsSL https://raw.githubusercontent.com/mydisha/keirouter/main/scripts/install.sh | bash
keirouter start
Works on amd64 and arm64 (including 64-bit Raspberry Pi OS). All it needs is curl (or wget) and tar, which every Ubuntu already has.
To keep KeiRouter running in the background and start it on boot, install it as a systemd service instead:
curl -fsSL https://raw.githubusercontent.com/mydisha/keirouter/main/scripts/install.sh | bash -s -- --service
systemctl --user status keirouter # is it up?
journalctl --user -u keirouter -f # follow the logs
systemctl --user restart keirouter # restart after a config change
On a desktop with a system tray, keirouter tray works too.
The easiest way to run KeiRouter on a server:
curl -fsSL https://raw.githubusercontent.com/mydisha/keirouter/main/scripts/install.sh | bash -s -- --docker
Or by hand with Docker Compose:
git clone https://github.com/mydisha/keirouter.git
cd keirouter
cp .env.example .env # set KEIROUTER_MASTER_KEY (openssl rand -base64 32)
docker compose up -d --build
Want PostgreSQL instead of SQLite? Layer on compose.postgres.yaml. VPS, PostgreSQL, Coolify and reverse-proxy notes live in deploy/README.md.
keirouter is a Claude Code plugin with 8 hand-picked skills, indexed on Flowy in the Cloud & Infrastructure category. Install it with the command on its page. It includes keirouter-chat, keirouter-embeddings, keirouter-image. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it