Skip to main content

Kiro IDE Account Switcher

Interactive terminal UI for hot-swapping between multiple Kiro IDE accounts without re-login.

Version Python License

Features

  • ✅ Visual Dashboard: See all accounts at a glance with color-coded status
  • ✅ One-Key Switching: Press number to switch instantly
  • ✅ Token Expiry Warnings: Know which accounts need re-login
  • ✅ Custom Labels: Friendly names like "Production AWS" instead of "prod"
  • ✅ Progress Spinners: Visual feedback during token wait
  • ✅ Cross-Platform: Works on macOS, Linux, Windows
  • ✅ Safe Operations: Automatic backups on every switch
  • ✅ Modular Architecture: Clean, maintainable codebase

Quick Start

# Install
pip3 install kiro-switcher

# Run
kiro-switcher

Installation

pip3 install kiro-switcher

From Source

git clone https://github.com/yerisrifan/kiro-account-switcher.git
cd kiro-account-switcher
pip3 install -e .

Requirements

  • Python 3.6+
  • Kiro IDE installed
  • rich library (auto-installed)

Usage

First Time Setup

  1. Run the tool:

    kiro-switcher
    
  2. Press n to setup new account

  3. Name the account (e.g., "prod", "main", "personal")

  4. Add label (optional, e.g., "Production AWS")

  5. Login in Kiro IDE when it opens

Switching Accounts

  1. Press number key (1-9) for the account
  2. Restart Kiro IDE to apply changes

Other Actions

  • n - Setup new account
  • r - Rename account label
  • d - Delete account (with confirmation)
  • q - Quit

Screenshot

╔══════════════════════════════════════════════════════════════════════════════╗
║                        KIRO IDE ACCOUNT SWITCHER                             ║
╚══════════════════════════════════════════════════════════════════════════════╝

╭─────────────────────────────────── Status ───────────────────────────────────╮
│ Active:  Production AWS  (3 accounts)                                        │
╰──────────────────────────────────────────────────────────────────────────────╯

                          Kiro IDE Accounts                          
╭──────┬──────────────────┬──────────┬──────────────────┬──────────╮
│ #    │ Account          │ Provider │ Expires          │  Status  │
├──────┼──────────────────┼──────────┼──────────────────┼──────────┤
│ 1    │ Production AWS   │ Github   │ 2026-05-12 19:52 │ ✓ ACTIVE │
│ 2    │ Development      │ Google   │ 2026-05-12 19:36 │          │
│ 3    │ Staging          │ Github   │ 2026-05-11 10:00 │ ⚠ EXPIRED│
╰──────┴──────────────────┴──────────┴──────────────────┴──────────╯

Actions:
  1-9     Switch to account
  n       Setup new account
  r       Rename account label
  d       Delete account
  q       Quit

Choice (q): 

How It Works

Architecture

kiro_switcher/
├── __init__.py       # Package metadata
├── config.py         # Configuration and paths
├── core.py           # Account and token management
├── ui.py             # Terminal UI rendering
└── app.py            # Main application logic

File Structure

~/.aws/sso/cache/
├── kiro-auth-token.json              # Active token (regular file)
├── prod-kiro-auth-token.json         # Production account
├── dev-kiro-auth-token.json          # Development account
└── staging-kiro-auth-token.json      # Staging account

~/.local/share/kiro-ide-switcher/
├── accounts.json                     # Account metadata (labels, dates)
└── active                            # Currently active account name

Security Note

Why file copy instead of symlinks?

Kiro IDE security policy rejects symbolic links:

Error: symbolic link detected at token storage path

This tool uses file copy strategy to comply with security requirements. Each switch:

  1. Backs up current token (timestamped)
  2. Copies target account token to kiro-auth-token.json
  3. Updates active account tracking

Development

Project Structure

  • config.py: Cross-platform path detection and IDE launch commands
  • core.py: TokenHandler and AccountManager classes for business logic
  • ui.py: TUIRenderer class for all Rich-based UI rendering
  • app.py: KiroSwitcher main application orchestration

Running from Source

# Install in development mode
pip3 install -e .

# Run
kiro-switcher

# Or run directly
./kiro-switcher

Testing

# Install dev dependencies
pip3 install pytest

# Run tests (coming soon)
pytest

Troubleshooting

"No accounts found"

  • Press n to setup your first account
  • Make sure you've logged into Kiro IDE at least once

"Token expired"

  • Press n to re-login with expired account
  • Or switch to an account with valid token

Kiro IDE shows loading/error after switch

  • Restart Kiro IDE (required after every switch)
  • Check token expiry in the accounts table
  • Verify token file: ls ~/.aws/sso/cache/kiro-auth-token.json

"rich library not installed"

pip3 install rich

Keyboard Shortcuts

Key Action
1-9 Switch to account
n Setup new account
r Rename account label
d Delete account
q Quit

Contributing

Issues and PRs welcome at GitHub.

License

MIT

Changelog

v2.0.0 (2026-05-12)

  • Complete refactor to modular architecture
  • Cross-platform support (macOS, Linux, Windows)
  • Progress spinners for better UX
  • Class-based design for maintainability
  • PyPI package support

v1.0.0 (2026-05-12)

  • Initial release with standalone TUI
  • Basic account switching functionality

Metadata

Release files for kiro-switcher 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiro-switcher 2.0.1
File Size Uploaded Provenance Actions
kiro_switcher-2.0.1.tar.gz 23.6 kB Without provenance Details for kiro_switcher-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kiro-switcher 2.0.1
File Interpreter ABI Platform Actions
kiro_switcher-2.0.1-py3-none-any.whl Python 3 none any Details for kiro_switcher-2.0.1-py3-none-any.whl

Total release size: 46.0 kB

Release files / kiro_switcher-2.0.1.tar.gz

Download URL kiro_switcher-2.0.1.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
42aae7e344fff431bc6b09d85d3c9f4e04b27f3c0cba6e920a6963175cc9910a
BLAKE2b-256 checksum
How to use checksums
4fa436eaa47d2ff12d71ab309b9167cdb97a3cbbfa3dacb23a96fdf71217f4f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / kiro_switcher-2.0.1-py3-none-any.whl

Download URL kiro_switcher-2.0.1-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
627100dec175b869657a1db300d1b2df9daed3fa826c7f533fe9e8eacb4f78a0
BLAKE2b-256 checksum
How to use checksums
c86369d450c009106329a80888d6779c1f677882c0af8adb804330c4c0863732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for kiro-switcher 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page