Install the Azure Developer CLI (preview)

Welcome to the Azure Developer CLI (azd)! Let's get started with installing and learning how to run the azd.

Start by selecting your development environment. For more information about the pros and cons of the different development environment choices, see Azure Developer CLI (azd) supported environments.

Pre-requisites

Before you get started using azd, ensure you have:

Install azd

Run the following script:

powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"

Install using MSI directly

For an advanced approach, you can install using the MSI directly. Download the MSI directly from GitHub Releases and install the MSI via the following command:

msiexec.exe /i <msi-path> <optional parameters>

When installing using the MSI directly (instead of the install script) the MSI behavior can be modified by providing the following parameters to msiexec.exe.

Parameters Value
ALLUSERS 2: Default. Install for current user (no privilege elevation required).
1: Install for all users (may require privilege elevation).
INSTALLDIR Installation path.
"%LOCALAPPDATA%\Programs\Azure Dev CLI": Default.
"%PROGRAMFILES%\Azure Dev CLI": Default all users.

For example, to install for all users in c:\all-users\azd, you can run a command similar to:

msiexec.exe /i <msi-path> ALLUSERS=1 INSTALLDIR=c:\all-users\azd

Note

The install script doesn't support installing versions of azd on Windows that predate the MSI. To manually update older versions of the Azure Developer CLI without MSI, see the Install versions predating MSI section.

Install using package management tools

A package manager assists developers and administrators with installing, updating, configuring, and removing software packages in a reliable way. You can install the Azure Developer CLI using the following popular package management tools:

  • Brew
  • Windows Package Manager
brew tap azure/azd && brew install azd

Install DEB/RPM Packages

The Azure Developer CLI releases signed .deb and .rpm packages to GitHub Releases. To install, download the appropriate file from the GitHub release and run the appropriate command to install the package:

You can install the .deb package using apt-get:

curl -fSL https://github.com/Azure/azure-dev/releases/download/azure-dev-cli_<version>/azd_<version>_amd64.deb -o azd_<version>_amd64.deb
apt update 
apt install ./azd_<version>_amd64.deb -y

Note

You may need to use sudo when running apt.

Uninstall azd

To uninstall the azd:

Once you've installed the MSI versions, using the uninstall script to remove azd will leave some items behind on the machine. Instead, for version 0.5.0-beta.1 and later:

  1. Search for Add or remove programs in Windows.

  2. Locate Azure Dev CLI and select the three dots to expand the options menu.

  3. Select Uninstall.

For versions before 0.5.0-beta.1, use the following uninstall script:

powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/uninstall-azd.ps1' | Invoke-Expression"

Uninstall using a package manager

If you installed the Azure Developer CLI using a package manager, you can also uninstall it using the following commands:

brew uninstall azd

Uninstall DEB/RPM Packages

If you installed the Azure Developer CLI using .deb or .rpm packages, you can also uninstall it using the following commands:

Uninstall the .deb package using dpkg:

apt remove -y azd

Note

You may need to use sudo when running dpkg.

Install versions predating MSI

As of version 0.5.0-beta.1, the PowerShell install script for Azure Developer CLI (install-azd.ps1) uses the published MSI file instead of installing from the .zip file. There is no change for users who want to use the script to install or upgrade.

Since the install script doesn't support installing versions of azd on Windows that predate the MSI, you'll need to manually install older versions.

  1. Download the appropriate .zip file from the Azure Developer CLI GitHub releases.

  2. Extract the .zip file.

  3. Rename the azd-windows-amd64.exe to azd.exe

  4. Place azd.exe in the appropriate location.

Next steps