@lightharu/krouter
v1.8.11
Published
Krouter - Web dashboard and CLI router for Kiro accounts, quota balancing, and API proxy
Maintainers
Readme
Krouter - Kiro Account Router & API Proxy
One local web dashboard to manage Kiro accounts, balance quota, expose a compatible API proxy, and connect OpenClaw or other dev tools through one endpoint.
Run the dashboard on localhost, publish it through a tunnel when needed, and let the backend/CLI keep the proxy service alive.
Quick Start - API Proxy Guide - How It Works - Features - OpenClaw - Deploy - Changelog
Why Krouter?
Krouter is built for a Kiro-heavy workflow where many accounts, quota states, API keys, model choices, and client configs need to stay organized.
Common pain points:
- Kiro accounts are hard to compare when quota, subscription, profile ARN, and liveness are scattered.
- A web dashboard is convenient, but the API proxy should run as a backend/CLI service instead of depending on a browser tab.
- OpenClaw and other clients need one stable OpenAI-compatible endpoint.
- Premium models can fail when an account is suspended, out of quota, rate-limited, or missing a usable streaming profile.
- Manual account switching wastes time and makes failures harder to diagnose.
Krouter solves this with:
- A local-first web dashboard for account operations.
- A backend API proxy that can stay running independently.
- Multi-account routing with round-robin/sticky strategies.
- API key generation for client tools.
- OpenClaw import using the
krouterprovider. - Diagnostics for quota, credentials, model liveness, request logs, and tunnel status.
How It Works
Developer tools
OpenClaw / Aira / Codex / Claude-compatible clients
|
| http://localhost:5580/v1
v
Krouter API Proxy
- validates client API keys
- maps requested models
- rotates healthy Kiro accounts
- retries or skips accounts with bad quota/liveness
- streams responses back to the client
|
v
Kiro accounts
- Builder ID / social login credentials
- quota and plan tracking
- profile ARN hydration
- account health and request logsThe dashboard is the control surface. The backend and krouter CLI are the runtime layer.
Key Features
Dashboard
- Account list, import/export, groups, tags, privacy mode, and quick status cards.
- Registration workflows and diagnostics for email service, Kiro API, proxy, quota, and model liveness.
- API proxy page for service start/stop, model refresh, key management, request logs, and client config import.
- Tunnel controls for localhost-first usage with optional public access.
- Responsive layout for desktop and mobile dashboards.
API Proxy
- OpenAI-compatible
/v1endpoint. - Multi-account mode with round-robin and sticky routing.
- Per-account health checks, quota checks, and request logging.
- Model catalog refresh and model mapping for client tools.
- API keys in
sk-*format or custom token formats.
CLI
krouteropens the clean terminal dashboard.krouter setupperforms first-run admin setup.krouter statuschecks backend/dashboard/proxy state.krouter updateupdates the global npm install without requiring the dashboard password.krouter tunnel startexposes the dashboard when remote access is needed.krouter openclaw importwrites the Krouter provider into OpenClaw config.
First-Run Setup
On a fresh install, Krouter does not create a default admin/admin login.
You choose one of two setup modes:
- Krouter generated password: Krouter creates a strong password and shows it once.
- Custom password: you set your own admin password.
Quick Start
Install or update with one command:
npm install -g @lightharu/krouterRun Krouter:
krouterThe CLI starts the local backend, opens the dashboard, and stores runtime data in ~/.krouter.
Dashboard passwords are only for browser login. SSH/local terminal commands use a private CLI token generated in ~/.krouter/.env, so krouter, krouter status, krouter tunnel ..., and krouter update do not ask for the dashboard password.
To update later:
krouter updateTo only check for an available update:
krouter update checkSource/development mode:
npm install
npm run build:fullstack
npm run start:backendOpen the dashboard URL printed by the backend.
For first-run setup from terminal:
npm run cli -- setupAfter installing globally or linking the package, use:
krouter
krouter status
krouter tunnel start
krouter openclaw importOpenClaw And Client Tools
Create a client API key in the dashboard:
Dashboard -> API Proxy Service -> Configure Clients / API KeysThen import Krouter into OpenClaw:
krouter openclaw importOpenClaw will use provider:
krouterTypical client settings:
Base URL: http://localhost:5580/v1
API Key: sk-...
Model: claude-sonnet-4.5 or another model shown by KrouterWhen /models is called, Krouter exposes the model list currently available through the proxy catalog.
Server Deployment
Copy the example environment file:
cp .env.web.example .env.webSet at least:
SESSION_SECRET=replace-with-a-long-random-secretThen run:
npm run build:fullstack
npm run start:backendKrouter can run as:
- localhost-only dashboard plus Cloudflare tunnel.
- VPS service behind Nginx.
- Docker service using
docker-compose.web.yml.
For detailed server notes, see docs/web-port.md.
Development
npm run dev:web
npm run dev:api
npm run build:fullstack
npm run test:e2eRepository
GitHub: LightHaru/Krouter
License
AGPL-3.0.
