mcpField
A
azure-devops-cli

azure-devops-cli

github.com/github云与 DevOps40.5k14.6k 次安装今天更新
代码仓库

关于 azure-devops-cli

通过 Azure CLI 及 Azure DevOps 扩展管理 Azure DevOps 资源的技能。它按任务引导查阅命令参考,覆盖代码库、流水线、看板、安全管理等领域。

主要功能

  1. 01按任务查找命令参考
  2. 02代码库与拉取请求操作
  3. 03流水线、构建和制品命令
  4. 04工作项与迭代命令
  5. 05组织与安全管理
  6. 06脚本和错误处理指南

适用场景

  1. 01创建或审查拉取请求
  2. 02运行并检查流水线构建
  3. 03更新工作项和迭代设置
  4. 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.md
boards-and-iterations.md
long-comments-on-windows.md
org-and-security.md
pipelines-and-builds.md
repos-and-prs.md
variables-and-agents.md
workflows-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