kiro-swap
v0.2.0
Published
Switch between multiple Kiro accounts (kiro-cli + Kiro Crew) without repeatedly handling teammates' raw credentials.
Downloads
1,025
Readme
kswap
Switch between multiple Kiro accounts — kiro-cli and the Kiro Crew
gateway — without repeatedly handling teammates' raw credentials.
Register each teammate's Kiro API key once, then switch which account
is active with a single command. kswap list shows every account's
real, live credit usage so you know at a glance who's about to run out.
Published on npm as
kiro-swap— the unscoped namekswapwas rejected by npm's anti-typosquat policy as too similar to existing packages likeasap/gsap/soap. The CLI command itself is stillkswap, unaffected by the package name.
Requirements
Install
npm install -g kiro-swap
kswap installkswap install locates your real kiro-cli.exe, writes a small shim
in front of it, and adds that shim's directory to your user PATH.
Open a new terminal afterwards — Windows only picks up PATH
changes in new processes.
Step-by-step guide
1. Register each teammate's key
Ask each teammate for their Kiro API key once, then register it under
a name you'll remember. kswap add validates the key against Kiro
before saving it — a typo'd key is rejected immediately, not silently
stored.
kswap add <name> <api-key>2. See who's registered and how much credit they have left
kswap listEach row's credit percentage is fetched live from Kiro for that account — not cached, not estimated. Green under 70% used, yellow 70–90%, red 90%+, so a teammate about to hit their limit stands out immediately.
3. Switch the active account
kswap switch <name>This updates kiro-cli immediately (every new terminal picks it up
right away) and rewrites the Kiro Crew gateway's stored key. Crew
loads its key once at boot, so it needs a manual restart to notice —
kswap switch tells you that every time, it doesn't try to restart
Crew for you.
Not sure who to use? Let kswap pick the account with the most credit
left (compared by credits remaining, so plans with different limits are
handled correctly):
kswap switch --best4. Check which account is active
kswap currentRunning kswap list again afterwards shows the switch took effect —
note the ● moves to bob, and his credit usage (89.2%, now shown in
red) is the one to watch:
5. Remove an account you no longer need
kswap remove <name>kswap refuses to remove the currently active account, so you can't
accidentally strand kiro-cli/Crew with no key configured.
Command reference
kswap install # locate kiro-cli, install the PATH shim
kswap add <name> <api-key> # register a teammate's Kiro API key once
kswap list # show every registered account + live credit usage
kswap switch <name> # make that account active everywhere
kswap switch --best # switch to the account with the most credit left
kswap current # show which account is active
kswap remove <name> # forget an account (must not be active)Scope
v1 covers kiro-cli (terminal) and the Kiro Crew gateway, on Windows
only. It does not cover Kiro IDE (which authenticates via AWS Identity
Center SSO, not an API key — a different mechanism entirely),
auto-switching on rate limits, or macOS/Linux.
License
MIT
