Skip to content

About

Proto WASM plugin for managing Azure CLI (az) installations — per-version, side-by-side, no system package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

proto-azure-cli-plugin

A proto WASM plugin for managing Azure CLI installations.

Per-version, side-by-side installs of az managed by proto — without touching your system package manager.

Installation

Add to .prototools:

[plugins]
azure-cli = "github://BarretoTech/proto-azure-cli-plugin"

Or with a pinned plugin version:

[plugins]
azure-cli = "github://BarretoTech/proto-azure-cli-plugin@v0.1.2"

Usage

Install the latest version:

proto install azure-cli

Install a specific version:

proto install azure-cli 2.86.0

List available versions:

proto versions azure-cli

Pin a version

Proto needs a version source to know which az to run. Pick whichever of the three patterns fits your workflow — any one is enough.

proto pin — writes to the nearest .prototools:

proto pin azure-cli 2.86.0   # or: proto pin azure-cli latest

Edit .prototools directly — the latest alias resolves to the highest released version every time proto reloads, so this is a good fit for projects that always want the newest:

azure-cli = "latest"           # or "2.86.0", "~2.86", "^2"

.tool-versions — asdf-compatible. Useful if you already maintain one for other tools:

azure-cli 2.86.0

Proto walks upward from the current directory looking for any of these, so project-local pins override user-global ones.

Run

After installation and pinning, the az command is available on PATH via proto's shims:

az --version
az login

Supported Platforms

Platform Architecture Install strategy
macOS arm64, x64 Prebuilt tarball from GitHub (bundles Python 3.13)
Windows x64 Prebuilt ZIP from GitHub (bundles Python 3.13)
Linux (any libc) x64, arm64 pip install into a per-version virtualenv
Windows arm64 Not supported

Linux prerequisites

The Linux install path needs:

  • Python 3.10 or newer on PATH as python3
  • The venv module — usually a separate package on Debian/Ubuntu (sudo apt install python3-venv or python3.10-venv), built-in elsewhere
  • Network access to PyPI for pip install azure-cli==<version>

The plugin will surface a clear error if any of these are missing.

Configuration

Override the archive mirror URL in .prototools:

[tools.azure-cli]
dist-url = "https://your-mirror.example.com/azure-cli-releases"

The default is https://github.com/Azure/azure-cli/releases/download. The plugin appends /azure-cli-<version>/<asset-name> to this URL.

How it works

Azure CLI is a Python application, not a single static binary, so the plugin dispatches by host OS:

  • macOS + Windows: Microsoft publishes self-contained archives on GitHub (azure-cli-<v>-macos-{arm64,x86_64}.tar.gz, azure-cli-<v>-x64.zip) that bundle their own Python 3.13 runtime. The plugin downloads and unpacks the archive matching your platform.
  • Linux: no portable Microsoft artifact exists, so the plugin uses proto's native install hook to create a per-version venv with your system Python and pip install azure-cli==<version> into it. The result is a fully isolated install at ~/.proto/tools/azure-cli/<version>/venv/.

In both cases proto's shim system exposes the az command on your PATH.

Development

Setup toolchain:

proto install rust
rustup target add wasm32-wasip1

Build the plugin:

cargo build --target wasm32-wasip1

Test locally with proto by pointing at the built WASM:

# .prototools
[plugins]
azure-cli = "file://./target/wasm32-wasip1/debug/azure_cli_plugin.wasm"
proto --log trace install azure-cli
proto --log trace versions azure-cli
az --version

License

MIT

About

Proto WASM plugin for managing Azure CLI (az) installations — per-version, side-by-side, no system package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages