关于 azure-devops-cli
通过 Azure CLI 及 Azure DevOps 扩展管理 Azure DevOps 资源的技能。它按任务引导查阅命令参考,覆盖代码库、流水线、看板、安全管理等领域。
主要功能
- 01按任务查找命令参考
- 02代码库与拉取请求操作
- 03流水线、构建和制品命令
- 04工作项与迭代命令
- 05组织与安全管理
- 06脚本和错误处理指南
适用场景
- 01创建或审查拉取请求
- 02运行并检查流水线构建
- 03更新工作项和迭代设置
- 04自动化 Azure DevOps 管理
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ github/ awesome-copilot --skill azure-devops-cli安装后在 Claude Code 中输入/azure-devops-cli确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/advanced-usage.mdboards-and-iterations.mdlong-comments-on-windows.mdorg-and-security.mdpipelines-and-builds.mdrepos-and-prs.mdvariables-and-agents.mdworkflows-and-patterns.md详细介绍
Azure DevOps CLI
使用 Azure CLI 和 Azure DevOps 扩展管理 Azure DevOps 资源。
CLI 版本: 2.81.0(截至 2025 年的当前版本)
先决条件
# Install Azure CLI
brew install azure-cli # macOS
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Linux
# Install Azure DevOps extension
az extension add --name azure-devops
身份验证
# Login with PAT token
az devops login --organization https://dev.azure.com/{org} --token YOUR_PAT_TOKEN
# Set default organization and project (avoids repeating --org/--project)
# Note: Legacy URL https://{org}.visualstudio.com should be replaced with https://dev.azure.com/{org}
az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
# List current configuration
az devops configure --list
CLI 结构
az devops # Main DevOps commands
├── admin # Administration (banner)
├── extension # Extension management
├── project # Team projects
├── security # Security operations
│ ├── group # Security groups
│ └── permission # Security permissions
├── service-endpoint # Service connections
├── team # Teams
├── user # Users
├── wiki # Wikis
├── configure # Set defaults
├── invoke # Invoke REST API
├── login # Authenticate
└── logout # Clear credentials
az pipelines # Azure Pipelines
├── agent # Agents
├── build # Builds
├── folder # Pipeline folders
├── pool # Agent pools
├── queue # Agent queues
├── release # Releases
├── runs # Pipeline runs
├── variable # Pipeline variables
└── variable-group # Variable groups
az boards # Azure Boards
├── area # Area paths
├── iteration # Iterations
└── work-item # Work items
az repos # Azure Repos
├── import # Git imports
├── policy # Branch policies
├── pr # Pull requests
└── ref # Git references
az artifacts # Azure Artifacts
└── universal # Universal Packages
参考文件
根据用户的任务阅读相关的参考文件。每个文件都包含其领域的完整命令语法和示例。
| 文件 | 何时阅读 | 涵盖内容 |
|---|---|---|
references/repos-and-prs.md | 仓库、分支、拉取请求、分支策略 | 仓库、导入、PR(创建/列出/投票/审阅者/策略)、Git 引用、分支策略 |
references/pipelines-and-builds.md | 管道、生成、发布、工件 | 管道 CRUD、运行、生成、发布、工件下载/上传 |
references/boards-and-iterations.md | 工作项、冲刺、区域路径 | 工作项(WIQL/创建/更新/关系)、区域路径、迭代、团队迭代 |
references/variables-and-agents.md | 管道变量、代理池 | 管道变量、变量组、管道文件夹、代理池/队列 |
references/org-and-security.md | 项目、团队、用户、权限、Wiki | 项目、扩展、团队、用户、安全组/权限、服务终结点、Wiki、管理 |
references/advanced-usage.md | 输出格式、JMESPath 查询 | 输出格式、JMESPath 查询(基础 + 高级)、全局参数、常用参数、Git 别名 |
references/workflows-and-patterns.md | 自动化脚本、最佳实践、错误处理 | 常见工作流、最佳实践、错误处理、脚本编写模式、实际示例 |
references/long-comments-on-windows.md | 在 Windows 上长 --discussion、--description 或 --content 值失败 | az.cmd 的 cmd.exe 8191 字符上限、Shell 检测以及三种经验证的解决方法(azps.ps1、本机 --file-path、az devops invoke --in-file) |
评论
支持 Markdown