npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lightharu/krouter

v1.8.11

Published

Krouter - Web dashboard and CLI router for Kiro accounts, quota balancing, and API proxy

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.

Version License OpenClaw Runtime

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 krouter provider.
  • 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 logs

The 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 /v1 endpoint.
  • 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

  • krouter opens the clean terminal dashboard.
  • krouter setup performs first-run admin setup.
  • krouter status checks backend/dashboard/proxy state.
  • krouter update updates the global npm install without requiring the dashboard password.
  • krouter tunnel start exposes the dashboard when remote access is needed.
  • krouter openclaw import writes 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/krouter

Run Krouter:

krouter

The 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 update

To only check for an available update:

krouter update check

Source/development mode:

npm install
npm run build:fullstack
npm run start:backend

Open the dashboard URL printed by the backend.

For first-run setup from terminal:

npm run cli -- setup

After installing globally or linking the package, use:

krouter
krouter status
krouter tunnel start
krouter openclaw import

OpenClaw And Client Tools

Create a client API key in the dashboard:

Dashboard -> API Proxy Service -> Configure Clients / API Keys

Then import Krouter into OpenClaw:

krouter openclaw import

OpenClaw will use provider:

krouter

Typical client settings:

Base URL: http://localhost:5580/v1
API Key:  sk-...
Model:    claude-sonnet-4.5 or another model shown by Krouter

When /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.web

Set at least:

SESSION_SECRET=replace-with-a-long-random-secret

Then run:

npm run build:fullstack
npm run start:backend

Krouter 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:e2e

Repository

GitHub: LightHaru/Krouter


License

AGPL-3.0.