A powerful, user-friendly terminal interface for AWS Profile and SSO management.
Built with Textual for a modern, responsive TUI experience.
β‘ Fast β’ π Secure β’ π€ AI-Powered β’ π Bilingual
- β‘ Lightning Fast: Search and switch between dozens of AWS profiles in milliseconds
- π SSO Made Easy: Automatic re-authentication when credentials expire - no manual login headaches
- π€ AI-Powered: Integrated Amazon Q Developer CLI for intelligent AWS assistance
- π― Smart CLI: Command autocomplete with AWS CLI cheatsheet built-in
- π Bilingual: Full support for English and Traditional Chinese
- π Clear Visibility: See profile details, account info, and current identity at a glance
- π¨ Modern UX: Beautiful, keyboard-driven interface that respects your terminal theme
β‘ Fast profile search and switching with real-time filtering
π― Smart CLI with command autocomplete and inline execution
π€ AI-powered Amazon Q Developer integration with streaming responses
π Built-in AWS CLI cheatsheet with quick reference for 15+ services
- Fast Profile Search: Filter by name, account, role, or region with real-time fuzzy matching
- SSO Authentication: Automatic
aws sso loginwhen tokens expire or on manual trigger - Profile Details: View comprehensive profile information including account, role, region, and session
- Amazon Q Integration: Ask questions in natural language
- Context-Aware: Automatically includes your current profile and region
- Streaming Responses: Real-time output as Q processes your query
- Command Suggestions: Get AWS CLI commands for common tasks
- Command History: Browse previous commands with ββ
- Smart Autocomplete: Suggestions from AWS CLI cheatsheet
- Inline Execution: Run AWS CLI commands directly in the TUI
- Output Capture: See command results with timing and exit codes
- Built-in Cheatsheet: Quick reference for 15+ AWS services
- Structured Logging: JSON logs to STDERR for debugging and monitoring
- Cross-Platform: Linux, macOS, Windows (PowerShell)
- Keyboard-First: Efficient navigation without touching the mouse
- Extensible: Clean Python architecture for customization
# Install with uv (recommended)
uv tool install --python 3.13 awsui
# Or install with pip
pip install awsui
# Launch the TUI
awsuiThat's it! Start managing your AWS profiles with ease. π
- Python: >= 3.13, < 3.14
- AWS CLI: v2 (required)
- Amazon Q CLI: Optional, for AI assistance (installation guide)
- uv: Recommended for dependency management (installation guide)
# Install as a tool (isolated environment)
uv tool install --python 3.13 awsui
# Run directly
awsuipip install awsui
# Run
awsui# Clone the repository
git clone https://github.com/junminhong/awsui.git
cd awsui
# Pin Python version
uv python install 3.13
uv python pin 3.13
# Install dependencies
uv sync
# Run from source
uv run awsuiLaunch the TUI to select and switch profiles:
awsuiKeyboard Shortcuts:
| Category | Key | Action |
|---|---|---|
| π Navigation | / |
Focus search box |
β β |
Navigate profiles | |
Enter |
Apply selected profile | |
Esc |
Leave input field | |
| π» CLI & Tools | c |
Focus CLI input |
a |
Toggle AI assistant panel | |
h |
Show AWS CLI cheatsheet | |
t |
Toggle left pane (profile list) | |
| π AWS | l |
Force SSO login for selected profile |
w |
Show current AWS identity (WhoAmI) | |
| βοΈ System | Ctrl+L |
Clear CLI output |
Ctrl+U |
Clear CLI input | |
? |
Show help | |
q |
Quit |
Skip interactive selection:
# Pre-select a profile when launching the TUI
awsui --profile my-prod-adminTemporarily override AWS region:
awsui --profile my-profile --region us-west-2# English (default)
awsui --lang en
# Traditional Chinese
awsui --lang zh-TWawsui --log-level DEBUG 2> awsui-debug.log-
Install Amazon Q Developer CLI:
# Follow official installation guide # https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html
-
Verify installation:
q --version
- Press
ain awsui to open AI assistant panel - Type your question (e.g., "How do I list all S3 buckets with encryption enabled?")
- Press
Enterto submit - View streaming response with AWS-specific context
- Press
aagain to close panel
The assistant automatically includes your current profile, region, and account context for more relevant answers.
~/.aws/config:
[sso-session my-company]
sso_start_url = https://my-company.awsapps.com/start
sso_region = us-east-1
sso_registration_scopes = sso:account:access
[profile production-admin]
sso_session = my-company
sso_account_id = 111111111111
sso_role_name = AdministratorAccess
region = us-east-1
output = json
[profile staging-developer]
sso_session = my-company
sso_account_id = 222222222222
sso_role_name = DeveloperAccess
region = us-west-2
output = json[profile base]
region = us-east-1
[profile cross-account-admin]
source_profile = base
role_arn = arn:aws:iam::333333333333:role/AdminRole
region = us-east-1[profile legacy-sso]
sso_start_url = https://my-company.awsapps.com/start
sso_region = us-east-1
sso_account_id = 444444444444
sso_role_name = ViewOnlyAccess
region = us-east-1awsui/
βββ awsui/ # Main package
β βββ __init__.py
β βββ app.py # Main Textual application
β βββ models.py # Profile data models
β βββ config.py # AWS config parsing (~/.aws/config)
β βββ aws_cli.py # AWS CLI wrapper (SSO, STS)
β βββ q_assistant.py # Amazon Q Developer CLI integration
β βββ autocomplete.py # Command autocomplete engine
β βββ command_parser.py # AWS CLI command parser
β βββ parameter_metadata.py # AWS parameter metadata handling
β βββ resource_suggester.py # AWS resource suggestion engine
β βββ service_model_loader.py # AWS service model loader
β βββ cheatsheet.py # AWS CLI command reference
β βββ i18n.py # Internationalization (EN/ZH-TW)
β βββ logging.py # Structured JSON logging
βββ tests/ # Test suite
β βββ __init__.py
β βββ conftest.py # Pytest configuration
β βββ test_app.py
β βββ test_autocomplete.py
β βββ test_aws_cli.py
β βββ test_cheatsheet.py
β βββ test_command_parser.py
β βββ test_config.py
β βββ test_global_parameters.py
β βββ test_i18n.py
β βββ test_logging.py
β βββ test_models.py
β βββ test_q_assistant.py
β βββ test_resource_suggester.py
β βββ test_service_model_loader.py
β βββ test_special_commands.py
β βββ test_special_commands_no_autocomplete.py
βββ docs/ # Documentation website
β βββ index.html
β βββ styles.css
β βββ script.js
β βββ images/ # Documentation images
βββ images/ # README images
β βββ logo.png
β βββ demo01.png
β βββ demo02.png
β βββ demo03.png
β βββ demo04.png
βββ pyproject.toml # Project configuration
βββ uv.lock # Dependency lock file
βββ LICENSE # MIT License
βββ README.md # English documentation
βββ README_ZH_TW.md # Traditional Chinese documentation
uv run pytestuv run pytest --cov=awsui --cov-report=html
open htmlcov/index.htmluv sync --dev# Linting (if configured)
uv run ruff check awsui/
# Type checking (if configured)
uv run mypy awsui/AWS CLI Not Found - E_NO_AWS: AWS CLI v2 not detected
Solution: Install AWS CLI v2 following the official guide
Verify installation:
aws --version # Should show "aws-cli/2.x.x ..."No Profiles Available - E_NO_PROFILES: No profiles detected
Solution: Configure at least one profile:
# For SSO
aws configure sso-session
# For legacy SSO
aws configure sso
# For static credentials
aws configureSSO Login Fails - E_LOGIN_FAIL: SSO login failed
Possible causes:
- Network connectivity issues
- Invalid SSO start URL
- MFA/2FA not completed
- Browser not opening (check firewall/permissions)
Solution:
# Try manual login first
aws sso login --profile your-profile-name
# Check browser permissions
# Ensure port 8080-8090 range is available for OAuth callbackIdentity Check Fails - E_STS_FAIL: Unable to fetch identity
Possible causes:
- Credentials expired (SSO token or assume-role session)
- Invalid profile configuration
- Network/VPC issues
- Missing IAM permissions
Solution:
# Force re-authentication
# Press 'l' in awsui to trigger SSO login
# Verify profile configuration
cat ~/.aws/config
# Test manually
aws sts get-caller-identity --profile your-profile-nameAmazon Q Not Available - Amazon Q CLI not available
Solution: Install Amazon Q Developer CLI:
# macOS
brew install amazon-q
# Other platforms: follow official guide
# https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.htmlVerify installation:
q --versionawsui follows AWS security best practices:
- β Credential Handling: Only uses AWS CLI's credential system - no credential storage or caching
- β Temporary Credentials: Leverages AWS STS and SSO for short-lived tokens
- β
Read-Only Config: Only reads
~/.aws/configand~/.aws/credentials- never writes - β Log Safety: Sensitive data (tokens, secrets) automatically masked in logs
- β
Environment Isolation: Supports
AWS_CONFIG_FILEandAWS_SHARED_CREDENTIALS_FILEfor custom config locations - β No Network Calls: All AWS operations delegated to official AWS CLI
- β Subprocess Safety: Secure subprocess execution with proper escaping
Target metrics:
- Startup time: β€ 300ms (cold start)
- Search response: β€ 50ms (keystroke to UI update)
- Profile switch: β€ 5s (including SSO login if needed)
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
uv run pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See Development section above.
This project is licensed under the MIT License - see the LICENSE file for details.
- Textual - Modern TUI framework for Python
- uv - Fast Python package installer and resolver
- AWS CLI - Official AWS command-line tool
- Amazon Q Developer - AI-powered assistant for AWS
- AWS CLI SSO Configuration
- AWS CLI Assume Role
- Textual Documentation
- Amazon Q Developer CLI
- Python 3.13 Documentation
awsui - Making AWS Profile switching delightful! π
If you find this tool useful, please consider giving it a β on GitHub!
Report Bug β’ Request Feature β’ PyPI Package



