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>

🛠 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.1.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.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: azure_subscription_switcher-0.3.1.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/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for azure_subscription_switcher-0.3.1.tar.gz
Algorithm Hash digest
SHA256 3e82526b6b02761b2fbacc4603f9f382a1400c27292086634a2ad5985a192e73
MD5 564ea63c5f0a93ec6ce505733e770dd9
BLAKE2b-256 dae7718b4b0bac3e442cb4b1d37454e2d2074b5f79e11b94e46c816cf458ecec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for azure_subscription_switcher-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba93598719c16934d90e3508f981a12b9fef2ed39b3f5dcc0a5d0f3894a84ef
MD5 849c6dee1aa824df21d5e04c5eaddbee
BLAKE2b-256 2b3f578addd584b59d828b984c14d75adaaa0959ba99aaded7f04b40d79e7520

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