aztx
is a command-line tool designed to streamline the management of Azure tenant and subscription contexts. It provides an intuitive fuzzy-finder interface for switching between Azure subscriptions and tenants, making it easier to work with multiple Azure environments.
- 🔍 Fuzzy search interface for finding subscriptions and tenants
- ⚡ Quick context switching between subscriptions
- 🔄 Easy switching to previous context (similar to
cd -
) - 🎯 Tenant-first selection mode
- 🔧 Configurable logging levels
Note
This tool is built on top of the azure-cli and fzf and requires them to be installed and configured. If you use the Brew or Scoop package managers, these pre-requisites will be handled during installation.
- go >=1.16.6
- azure-cli >= 2.22.1
- fzf >= 0.20.0
Brew (Mac/Linux)
brew tap riweston/aztx
brew install aztx
Scoop (Windows)
scoop bucket add riweston https://github.com/riweston/scoop-bucket.git
scoop update
scoop install riweston/aztx
winget (Windows)
winget install aztx
Download the latest release from the releases page and add it to your PATH.
go install github.com/riweston/aztx
# Launch interactive subscription selector
aztx
# Switch to previous subscription context
aztx -
# Select tenant before choosing subscription
aztx --by-tenant
Configuration is stored in ~/.aztx.yml
. The following options are available:
# Log level: debug, info, warn, error
log-level: info
# by-tenant: true, false
by-tenant: false
You can also set configuration via environment variables:
AZTX_LOG_LEVEL
: Set logging levelAZTX_BY_TENANT
: Enable tenant-first selection mode
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Give a ⭐️ if this project helped you!