Cloud Efficiency CLI
Alibaba Cloud Cloud Efficiency (Yunxiao) DevOps command-line tool. Records non-obvious pitfalls and required field rules for the Cloud Efficiency API, helping you succeed on the first call.
Prerequisites
| Tool | Type | Required | Install |
|---|---|---|---|
| yunxiao MCP | mcp | No | Configure in Claude Code MCP settings (preferred over CLI) |
| aliyun CLI | cli | No | brew install aliyun-cli then aliyun configure — see openapi.md for full setup |
| git | cli | Yes | brew install git or git-scm.com |
| jq | cli | No | brew install jq (for JSON parsing in CLI mode) |
At least one of yunxiao MCP or aliyun CLI is required. MCP is preferred.
Do NOT proactively verify these tools on skill load. If a command fails due to a missing tool, directly guide the user through installation and configuration step by step.
When to Use
- Create/Manage MRs: Create merge requests, update descriptions, and view lists on codeup.aliyun.com repositories
- Task Management: Query/create/update task status, add comments
- Release Management: Create tags via the Cloud Efficiency API
Tool Selection
| Condition | Recommended Approach |
|---|---|
MCP service connected (mcp__yunxiao__* tools available) | Use MCP tools first (including MR operations) |
| No MCP service | Use aliyun CLI |
| Operation not covered by MCP tools (update MR, edit comments, etc.) | Use aliyun CLI |
⚠️
aliyun devops ListRepositorieshas a knownSYSTEM_UNAUTHORIZED_ERRORissue; prefer MCP tools to get repository IDs.
Common Operations Mapping
| Task | MCP Tool | CLI Alternative |
|---|---|---|
| Query repository | mcp__yunxiao__list_repositories | aliyun devops ListRepositories (may produce permission errors) |
| Create MR | mcp__yunxiao__create_change_request | aliyun devops CreateMergeRequest |
| View MR | mcp__yunxiao__get_change_request | aliyun devops GetMergeRequest |
| Update MR | — | aliyun devops UpdateMergeRequest |
| Query task | mcp__yunxiao__search_workitems | aliyun devops ListWorkitems |
| Get task detail | mcp__yunxiao__get_work_item | — |
| Update task status | mcp__yunxiao__update_work_item | REST API (see openapi.md) |
| Query workflow | mcp__yunxiao__get_work_item_workflow | aliyun devops ListWorkItemWorkFlowStatus |
| Add comment | mcp__yunxiao__create_work_item_comment | REST API (see openapi.md) |
| Edit comment | — | aliyun devops UpdateWorkitemComment |
| Query field config | mcp__yunxiao__get_work_item_type_field_config | aliyun devops ListWorkItemAllFields |
| Create Tag | — | aliyun devops CreateTag |
Top 5 Pitfalls
The most common traps — full rules in cheatsheet.md:
- Repository ID field is
Id(capital I) — using.idinjqreturnsnull - Creating an MR must provide
sourceProjectId,targetProjectId,createFrom: "WEB" - Updating task status requires the REST API —
aliyun devops POST /organization/.../workitems/updateWorkitemField updateWorkitemPropertyRequestmust be an array[{...}], field names usefieldIdentifier/fieldValue- Always query required fields before creating a task — different projects have different custom required fields
Detailed Guides
- AI Assistant Must-Read: cheatsheet.md — 13 golden rules + complete error quick reference
- API Full Reference: openapi.md — configuration guide, all API operation templates, complete MR/task/release workflows