Skip to main content

CLI Utility tool to switch between azure subscriptions

Project description

Azure Subscription Switcher

Problem: Switching between azure subscriptions via Azure CLI involves multiple commands.

What is azure-subscription-switcher?

azsub is a CLI tool to interactively select Azure subscriptions using fzf fuzzy search. Inspired by az-account-switcher and kubectx

📦 Installation

pip install azure-subscription-switcher
# Or using Poetry
poetry add azure-subscription-switcher

🚀 Usage

azsub

-OR-

azsub -s <subscription_id>

🗒️ Example

🛠 Requirements

  • Azure CLI (az) must be installed and logged in.
  • fzf (fuzzy finder) is required:
    • Mac: brew install fzf
    • Linux: sudo apt install fzf
    • Windows: Install via Git Bash or Chocolatey (choco install fzf).

🧰 Features

✅ Fetches available Azure subscriptions
✅ Interactive fuzzy search for selection
✅ Automatically switches to the selected subscription
✅ Switches to the subscription passed with -s,--subscription

🛠 Development & Contribution

  1. Clone the repository:
    git clone https://github.com/LahiruSenevirathne/azure-subscription-switcher.git
    cd azure-subscription-switcher
    
  2. Install dependencies using Poetry:
    poetry install
    
  3. Run the CLI locally:
    poetry run azsub
    

🤝 Contributing

Pull requests are welcome! If you'd like to make improvements, please fork the repository and open a PR

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure_subscription_switcher-0.3.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azure_subscription_switcher-0.3.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file azure_subscription_switcher-0.3.2.tar.gz.

File metadata

  • Download URL: azure_subscription_switcher-0.3.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for azure_subscription_switcher-0.3.2.tar.gz
Algorithm Hash digest
SHA256 be8662370c0cbc05982e3cf437f34ce0d055d28987da529effcfafa2e5fc30ac
MD5 942a4966e6720796704834de23a352fc
BLAKE2b-256 eee6a93994068cee2e66eed9040ba3433612d9fbd80daa46fe06ca797df6eb2c

See more details on using hashes here.

File details

Details for the file azure_subscription_switcher-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for azure_subscription_switcher-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d7ee20249be078d5befc8d8e95a4a1c5d9b27d65b091f0ead92ca98a0b314922
MD5 e6c65a6c9f5e539abecc7e8d9e041555
BLAKE2b-256 091e3b99a6ed9ce208d33c9a1235182208dd9b58d777bedb94def974becab29c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page