Interactive TUI for hot-swapping between multiple Kiro IDE accounts
Project description
Kiro IDE Account Switcher
Interactive terminal UI for hot-swapping between multiple Kiro IDE accounts without re-login.
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
From PyPI (Recommended)
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
richlibrary (auto-installed)
Usage
First Time Setup
-
Run the tool:
kiro-switcher
-
Press
nto setup new account -
Name the account (e.g., "prod", "main", "personal")
-
Add label (optional, e.g., "Production AWS")
-
Login in Kiro IDE when it opens
Switching Accounts
- Press number key (1-9) for the account
- Restart Kiro IDE to apply changes
Other Actions
n- Setup new accountr- Rename account labeld- 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:
- Backs up current token (timestamped)
- Copies target account token to
kiro-auth-token.json - Updates active account tracking
Development
Project Structure
- config.py: Cross-platform path detection and IDE launch commands
- core.py:
TokenHandlerandAccountManagerclasses for business logic - ui.py:
TUIRendererclass for all Rich-based UI rendering - app.py:
KiroSwitchermain 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
nto setup your first account - Make sure you've logged into Kiro IDE at least once
"Token expired"
- Press
nto 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kiro_switcher-2.0.0.tar.gz.
File metadata
- Download URL: kiro_switcher-2.0.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aed9a87938637e8e31f0d36795da3140cb50ebd552a60c5ac43fb758b42ea8e
|
|
| MD5 |
192320ea3527f7d0b80320bb4414437f
|
|
| BLAKE2b-256 |
1c7f451ec45d7f9c2dc7526bee7332be37707515690018435f52c426a4bb4fe6
|
File details
Details for the file kiro_switcher-2.0.0-py3-none-any.whl.
File metadata
- Download URL: kiro_switcher-2.0.0-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e2d1694e69c17ec1b597fbf9cc2970cddf1813801c5ce2f16eee5af77b8dbb9
|
|
| MD5 |
b549b5cd8f37c5af54b14df2bf84e501
|
|
| BLAKE2b-256 |
803108c5bd98a3bec88679dbe85e98dd5368fd226175489fc0f793f57b48cd6e
|