diff --git a/.vscode/cspell.global.yaml b/.vscode/cspell.global.yaml index e39b7b1f7ba..fe14c4f33eb 100644 --- a/.vscode/cspell.global.yaml +++ b/.vscode/cspell.global.yaml @@ -13,6 +13,8 @@ words: - opentelemetry - bson - azdo + - choco + - winget ignoreWords: - AADSTS - afwp diff --git a/README.md b/README.md index 818a292768a..da584608cba 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,34 @@ For advanced install scenarios see [Azure Developer CLI Installer Scripts](cli/i ### Windows +#### Windows Package Manager (winget) + +```powershell +winget install microsoft.azd +``` + +#### Chocolatey + +```powershell +choco install azd +``` + +#### Install script + ```powershell powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression" ``` +### MacOS -### Linux/MacOS +#### Homebrew + +```bash +brew tap azure/azd && brew install azd +``` + +If using `brew` to upgrade `azd` from a version not installed using `brew`, remove the existing version of `azd` using the uninstall script (if installed to the default location) or by deleting the `azd` binary manually. + +### Linux ``` curl -fsSL https://aka.ms/install-azd.sh | bash @@ -47,7 +70,7 @@ For example, to get the instructions for `bash` run `azd completion bash --help` #### Uninstalling 0.5.0-beta.1 and later -The Azure Developer CLI uses MSI to install on Windows. Use the "Add or remove programs" dialog in Windows to remove the "Azure Developer CLI" application. +The Azure Developer CLI uses MSI to install on Windows. Use the "Add or remove programs" dialog in Windows to remove the "Azure Developer CLI" application. If installed using a package manager like winget or choco, uninstall using the package manager's uninstall command. #### Uninstalling version 0.4.0-beta.1 and earlier @@ -59,10 +82,14 @@ powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/uninstall-azd.ps1 ### Linux/MacOS +If installed using the script, uninstall using this script. + ``` curl -fsSL https://aka.ms/uninstall-azd.sh | bash ``` +If installed using a package manager, uninstall using the package manager's uninstall command. + ## Data Collection The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkId=521839. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. diff --git a/cli/installer/README.md b/cli/installer/README.md index 21fc75970e5..b5876d9d23f 100644 --- a/cli/installer/README.md +++ b/cli/installer/README.md @@ -4,6 +4,22 @@ ### Windows +#### Windows Package Manager (winget) + +```powershell +winget install microsoft.azd +``` + +#### Chocolatey + +```powershell +choco install azd +``` + +#### Install script + +The install script downloads and installs the MSI package on the machine with default parameters. + ```powershell powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression" ``` @@ -14,10 +30,29 @@ Windows installations of the Azure Developer CLI now use MSI. The PowerShell scr See [MSI configuration](#msi-configuration) for advanced install scenarios. +### MacOS -### Linux/MacOS +#### Homebrew (recommended) + +```bash +brew tap azure/azd && brew install azd +``` + +The `brew tap azure/azd` command only needs to be run once to configure the tap in `brew`. + +If using `brew` to upgrade `azd` from a version not installed using `brew`, remove the existing version of `azd` using the uninstall script (if installed to the default location) or by deleting the `azd` binary manually. + +#### Script +The install script can be used to install `azd` at the machine scope. + +```bash +curl -fsSL https://aka.ms/install-azd.sh | bash ``` + +### Linux + +```bash curl -fsSL https://aka.ms/install-azd.sh | bash ``` @@ -60,6 +95,26 @@ When installing using the MSI directly (instead of the install script) the MSI b | `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. | +### Custom install location + +#### Windows + +The installer script can specify a custom location to the MSI installation: + +```powershell +powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' -OutFile 'install-azd.ps1'; ./install-azd.ps1 -InstallFolder 'C:\utils\azd'" +``` + +#### Linux/MacOS + +Specify the `--install-folder` when running the script. For example: + +```bash +curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --install-folder "~/mybin"` +``` + +The `--install-folder` parameter places the `azd` binary in the specified location. If the current user has write access to that location the install script will not attempt to elevate permissions using `sudo`. If the specified install folder does not exist the install will fail. + ### Download from daily builds The `daily` feed is periodically updated with builds from the latest source code in the `main` branch. Use the `version` parameter to download the latest daily release. @@ -127,3 +182,30 @@ To download and install the "daily" version of azd (most recent build) ```bash ./install-azd.sh --version daily ``` + +## Uninstall + +The Azure Developer CLI will write files to `~/.azd/` that are specific to the application's usage. Since this is user data uninstall processes do not alter or remove this data. + +### Windows + For versions released after `0.5.0-beta.1` use the following procedure to remove `azd`: + +1. Search for `Add or remove programs` in Windows +2. Locate `Azure Developer CLI` +3. Select `Uninstall` + +Uninstall script for version s released before `0.5.0-beta.1` (does not work on versions `0.5.0-beta.1` and later): + +```powershell +powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/uninstall-azd.ps1' | Invoke-Expression" +``` + +### Linux/MacOS + +If installed to the default location using the installation script `azd` can be removed using the uninstall script. + +```bash +curl -fsSL https://aka.ms/uninstall-azd.sh | bash +``` + +If installed to a custom location, remove `azd` by deleting the `azd` executable at the custom install location.