$npx -y skills add github/awesome-copilot --skill azure-devops-cliManage Azure DevOps resources via CLI including projects, repos, pipelines, builds, pull requests, work items, artifacts, and service endpoints. Use when working with Azure DevOps, az commands, devops automation, CI/CD, or when user mentions Azure DevOps CLI.
| 1 | # Azure DevOps CLI |
| 2 | |
| 3 | Manage Azure DevOps resources using the Azure CLI with the Azure DevOps extension. |
| 4 | |
| 5 | **CLI Version:** 2.81.0 (current as of 2025) |
| 6 | |
| 7 | ## Prerequisites |
| 8 | |
| 9 | ```bash |
| 10 | # Install Azure CLI |
| 11 | brew install azure-cli # macOS |
| 12 | curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Linux |
| 13 | |
| 14 | # Install Azure DevOps extension |
| 15 | az extension add --name azure-devops |
| 16 | ``` |
| 17 | |
| 18 | ## Authentication |
| 19 | |
| 20 | ```bash |
| 21 | # Login with PAT token |
| 22 | az devops login --organization https://dev.azure.com/{org} --token YOUR_PAT_TOKEN |
| 23 | |
| 24 | # Set default organization and project (avoids repeating --org/--project) |
| 25 | # Note: Legacy URL https://{org}.visualstudio.com should be replaced with https://dev.azure.com/{org} |
| 26 | az devops configure --defaults organization=https://dev.azure.com/{org} project={project} |
| 27 | |
| 28 | # List current configuration |
| 29 | az devops configure --list |
| 30 | ``` |
| 31 | |
| 32 | ## CLI Structure |
| 33 | |
| 34 | ``` |
| 35 | az devops # Main DevOps commands |
| 36 | ├── admin # Administration (banner) |
| 37 | ├── extension # Extension management |
| 38 | ├── project # Team projects |
| 39 | ├── security # Security operations |
| 40 | │ ├── group # Security groups |
| 41 | │ └── permission # Security permissions |
| 42 | ├── service-endpoint # Service connections |
| 43 | ├── team # Teams |
| 44 | ├── user # Users |
| 45 | ├── wiki # Wikis |
| 46 | ├── configure # Set defaults |
| 47 | ├── invoke # Invoke REST API |
| 48 | ├── login # Authenticate |
| 49 | └── logout # Clear credentials |
| 50 | |
| 51 | az pipelines # Azure Pipelines |
| 52 | ├── agent # Agents |
| 53 | ├── build # Builds |
| 54 | ├── folder # Pipeline folders |
| 55 | ├── pool # Agent pools |
| 56 | ├── queue # Agent queues |
| 57 | ├── release # Releases |
| 58 | ├── runs # Pipeline runs |
| 59 | ├── variable # Pipeline variables |
| 60 | └── variable-group # Variable groups |
| 61 | |
| 62 | az boards # Azure Boards |
| 63 | ├── area # Area paths |
| 64 | ├── iteration # Iterations |
| 65 | └── work-item # Work items |
| 66 | |
| 67 | az repos # Azure Repos |
| 68 | ├── import # Git imports |
| 69 | ├── policy # Branch policies |
| 70 | ├── pr # Pull requests |
| 71 | └── ref # Git references |
| 72 | |
| 73 | az artifacts # Azure Artifacts |
| 74 | └── universal # Universal Packages |
| 75 | ``` |
| 76 | |
| 77 | ## Reference Files |
| 78 | |
| 79 | Read the relevant reference file based on the user's task. Each file contains complete command syntax and examples for its domain. |
| 80 | |
| 81 | | File | When to read | Covers | |
| 82 | |---|---|---| |
| 83 | | `references/repos-and-prs.md` | Repos, branches, pull requests, branch policies | Repositories, Import, PRs (create/list/vote/reviewers/policies), Git refs, Branch policies | |
| 84 | | `references/pipelines-and-builds.md` | Pipelines, builds, releases, artifacts | Pipelines CRUD, runs, builds, releases, artifacts download/upload | |
| 85 | | `references/boards-and-iterations.md` | Work items, sprints, area paths | Work items (WIQL/create/update/relations), Area paths, Iterations, Team iterations | |
| 86 | | `references/variables-and-agents.md` | Pipeline variables, agent pools | Pipeline variables, Variable groups, Pipeline folders, Agent pools/queues | |
| 87 | | `references/org-and-security.md` | Projects, teams, users, permissions, wikis | Projects, Extensions, Teams, Users, Security groups/permissions, Service endpoints, Wikis, Admin | |
| 88 | | `references/advanced-usage.md` | Output formatting, JMESPath queries | Output formats, JMESPath queries (basic + advanced), Global args, Common params, Git aliases | |
| 89 | | `references/workflows-and-patterns.md` | Automation scripts, best practices, error handling | Common workflows, Best practices, Error handling, Scripting patterns, Real-world examples | |
| 90 | | `references/long-comments-on-windows.md` | Long `--discussion`, `--description`, or `--content` values failing on Windows | The `cmd.exe` 8191 char cap on `az.cmd`, shell detection, and three verified workarounds (`azps.ps1`, native `--file-path`, `az devops invoke --in-file`) | |