To start using the Azure DevOps extension for Azure CLI, perform the following steps: Install Azure CLI: Follow the instructions provided in Install the Azure CLI to set up your Azure CLI environment. At a minimum, your Azure CLI version must be 2.10.1. You can use az -version to validate. Add the Azure DevOps extension. The following steps enable you to install the AWS CLI version 1 from the command line on any build of macOS. The following is a summary of the installation commands that you can cut and paste to run as a single set of commands.
-->Azure DevOps Services | Azure DevOps Server 2020
With the Azure DevOps extension for Azure Command Line Interface (CLI), you can manage many Azure DevOps Services from the command line. CLI commands enable you streamline your tasks with faster and flexible interactive canvas, bypassing user interface workflows.
Note
The Azure DevOps Command Line Interface (CLI) is available for Azure DevOps Server 2020 and Azure DevOps Services.
To start using the Azure DevOps extension for Azure CLI, perform the following steps:
Install Azure CLI: Follow the instructions provided in Install the Azure CLI to set up your Azure CLI environment. At a minimum, your Azure CLI version must be 2.10.1. You can use az --version
to validate.
Add the Azure DevOps extension:
You can use az extension list
or az extension show --name azure-devops
to confirm the installation.
Sign in: Run az login
to sign in. Note that we support only interactive or log in using user name and password with az login
. To sign in using a Personal Access Token (PAT), see Sign in via Azure DevOps Personal Access Token (PAT). When connecting to an on-premises server instance, sign in using a PAT may be required to run select commands.
Configure defaults: We recommend you set the default configuration for your organization and project. Otherwise, you can set these within the individual commands themselves.
If you're connecting to an Azure DevOps Server, specify the URL for your server instance. For example:
Adding the Azure DevOps Extension adds devops
, pipelines
, artifacts
, boards
, and repos
groups.For usage and help content for any command, enter the -h parameter, for example:
You can use --open
switch to open any artifact in Azure DevOps portal in your default browser.
For example :
This command shows the details of build with id 1
on the command-line and also opens it in the default browser.
The Azure CLI is available to install in Windows, macOS and Linux environments. It can also be run in a Docker container and Azure Cloud Shell.
The current version of the Azure CLI is 2.12.1. For information about the latest release, see the release notes. To find your installed version and see if you need to update, run az --version
.
Note
If you're using the Azure classic deployment model, install the Azure classic CLI.
The CLI provides an in-tool command to update to the latest version:
Note
This command will also update all installed extensions by default. For more az upgrade
options, please refer to the command reference page.
See What is Azure CLI? for key characteristics.