Introduction to the Azure DevOps CLI

December 18, 2021

I’ve been playing a little with Azure DevOps recently, and one thing that I hadn’t realised, but found interesting, was the CLI.

If you use the Azure CLI (see this post for how you might install and run the CLI), then it turns out that you can add extensions to it; for example:



az extension add --name azure-devops

Once you’ve added this, you can view, and change your dev-ops set-up from the command line; for example, to list your repos:



az repos list --organization https://dev.azure.com/devopsplayground1 --project "Test Project"

Obviously, you’ll need to be logged into an account with permission to do that. This means that you can pass a WIQL query and see work items in a given state; for example:



az boards query --wiql "select state, title from workitems" --organization https://dev.azure.com/devopsplayground1 --project "Test Project"

References

https://docs.microsoft.com/en-us/azure/devops/cli/?view=azure-devops&WT.mc_id=DT-MVP-5004601



Profile picture

A blog about one man's journey through code… and some pictures of the Peak District
Twitter

© Paul Michaels 2022