A TUI application for switching Azure tenants, directories, and subscriptions.
- Interactive TUI - Navigate with keyboard (vim-style j/k or arrows)
- View Current Account - See active user, tenant, and subscription
- Switch Subscriptions - Quick selection from available subscriptions
- Switch Tenants - Re-authenticate to a different Azure AD tenant
- CLI Mode - Non-interactive flags for scripting
brew install l2D/tap/azswitchgo install github.com/l2D/azswitch/cmd/azswitch@latestDownload the latest release from GitHub Releases.
docker pull ghcr.io/l2d/azswitchMount your local Azure CLI configuration:
docker run --rm -it -v ~/.azure:/home/azswitch/.azure ghcr.io/l2d/azswitch# Show current account
docker run --rm -v ~/.azure:/home/azswitch/.azure ghcr.io/l2d/azswitch --current
# List subscriptions
docker run --rm -v ~/.azure:/home/azswitch/.azure ghcr.io/l2d/azswitch --listTo access the container shell with Azure CLI:
docker run --rm -it -v ~/.azure:/home/azswitch/.azure --entrypoint /bin/sh ghcr.io/l2d/azswitchdocker build -t azswitch .
docker run --rm -it -v ~/.azure:/home/azswitch/.azure azswitch- Azure CLI must be installed
- Must be logged in (
az login)
azswitch# Show current account
azswitch --current
# List all subscriptions
azswitch --list
# Switch to subscription by name or ID
azswitch --subscription "My Subscription"
azswitch --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# Switch to a different tenant
azswitch --tenant xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx| Key | Action |
|---|---|
j / Down |
Move cursor down |
k / Up |
Move cursor up |
Enter |
Select item |
Tab |
Switch between subscriptions/tenants view |
? |
Toggle help |
q / Ctrl+C |
Quit |
make buildmake testmake lint