Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
/ azctx Public archive

Switch faster between subscriptions in your azure cli

License

Notifications You must be signed in to change notification settings

StiviiK/azctx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azctx: Power tool for the Azure CLI

Proudly written in Go Latest GitHub release GitHub stars GitHub contributors

NOTE: This repository has been moved, please use the new repository: whiteducksoftware/azctx.

azctx helps you switch between azure cli subscriptions back and forth:

azctx demo GIF

azctx(1)

azctx is a CLI tool for managing azure cli subscriptions.
	It is a helper for the azure cli and provides a simple interface for managing subscriptions.
	Pass a subscription name to select a specific subscription.
	Pass - to switch to the previous subscription.

Usage:
  azctx [- / -- NAME] [flags]
  azctx [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  login       Login to Azure
  version     Print the CLI version

Flags:
  -c, --current               Display the current active subscription
      --filter-tenant-level   Filter tenant level accounts with no available subscriptions (default true)
  -h, --help                  help for azctx
  -r, --refresh               Re-Authenticate and refresh the subscriptions.
                              	Deprecated. Please use azctx login instead.
  -s, --short                 Use a short prompt

Use "azctx [command] --help" for more information about a command.

Installation

Homebrew

  • Install azctx with brew install stiviik/tap/azctx

Linux

  • Install the azctx binary from the repository
  • Add the azctx binary to your PATH

Troubleshooting

Error: AZURE_CONFIG_DIR is not set / a valid directory. [...]

Run once az configure to create the configuration directory.

Check the Microsoft Documentation for the correct path to the azure cli config directory and export it as AZURE_CONFIG_DIR environment variable.

export AZURE_CONFIG_DIR=$HOME/.azure

Todos

  • Implement Unit Tests