awswit is an interactive AWS profile switcher with fuzzy search and frecency sorting.
cargo install awswitBash / Zsh
# ~/.bashrc or ~/.zshrc
eval "$(awswit init bash)" # or zshFish
# ~/.config/fish/config.fish
awswit init fish | sourcePowerShell
# $PROFILE
awswit init powershell | Invoke-Expressionawswit # interactive picker
awswit prod # switch directly
awswit -l # list profiles
awswit -u # unsetPick a profile, hit Enter. AWS_PROFILE is set in your current shell.
- Fuzzy search — type to filter, matches appear instantly
- Frecency sorting — frequently and recently used profiles are ranked higher
- Favorites — pin profiles to the top with
* - Preview panel — press
Ctrl+Pto see region, account ID, role ARN, and more - fzf integration — pass
--fzfor setAWSWIT_USE_FZF=1 - No credential handling — awswit sets
AWS_PROFILEand leaves authentication to the AWS SDK, SSO, or aws-vault - Single binary — written in Rust with no runtime dependencies
awswit reads ~/.aws/config, shows you a picker, and sets these in your shell:
AWS_PROFILE=prod
AWS_DEFAULT_PROFILE=prod
AWS_REGION=ap-northeast-1 # if the profile defines a region
AWS_DEFAULT_REGION=ap-northeast-1
AWSWIT_PROFILE=prod
The AWS SDK resolves credentials based on the profile configuration — IAM keys, SSO, role assumption, credential_process, or anything else. awswit does not touch credentials.
| Key | Action |
|---|---|
| Type | Fuzzy search |
Enter |
Select profile |
↑/↓ or Ctrl+k/Ctrl+j |
Navigate |
* or Ctrl+F |
Toggle favorite |
Ctrl+P |
Toggle preview panel |
Esc / Ctrl+C |
Cancel |
awswit [PROFILE] Switch to a profile (TUI if no name given)
awswit init <shell> Print shell integration script
awswit completions <shell> Generate tab-completion script
| Flag | Description |
|---|---|
-v, --version |
Print version |
-s, --show-commands |
Print export commands instead of setting them |
-u, --unset |
Unset all AWS environment variables |
-l, --list-profiles |
List profiles |
-n, --no-interactive |
Skip TUI, resolve profile by name or $AWS_PROFILE |
--fzf |
Use external fzf |
--region <region> |
Override region |
--config-file <path> |
Path to AWS config file |
--info |
INFO-level logs |
--debug |
DEBUG-level logs |
~/.awswit/config.toml (all optional):
fuzzy-match = true # Fuzzy profile name matching (default: true)
colors = true # Colored output (default: true on Linux/macOS)
region = "ap-northeast-1" # Default region overrideUnknown keys are rejected on load, so typos are caught immediately.
Shell Completions
awswit completions bash > /etc/bash_completion.d/awswit
awswit completions zsh > ~/.zfunc/_awswit
awswit completions fish > ~/.config/fish/completions/awswit.fishWhy not just export AWS_PROFILE=foo?
You can. awswit is for when you have 10+ profiles and typing exact names gets tedious. With fuzzy search, favorites, and frecency, the right profile is usually one or two keystrokes away.
How is this different from awsume / aws-vault?
They manage credentials — STS calls, token caching, MFA. awswit does none of that. It sets AWS_PROFILE and lets the SDK handle authentication:
- No background processes
- No token files to debug
- Works with any auth method, including ones that did not exist when awswit was written
If you already use aws sso login or aws-vault, awswit is the missing piece — a fast way to pick which profile is active.
MIT — see LICENSE.