| name | aliyun-cli |
| description | Guide agents to use Alibaba Cloud CLI correctly and safely. Use when a user asks to run or explain aliyun CLI, Alibaba Cloud CLI, Aliyun CLI, 阿里云 CLI, cloud resource inspection, profile/credential setup, ECS/VPC/SLB/RDS/ACK/OSS/RAM or other Alibaba Cloud operations from a terminal, including read-only queries, OpenAPI command discovery, JSON/query output, troubleshooting, or preparing mutating commands. |
Alibaba Cloud CLI
Use Alibaba Cloud CLI through the aliyun binary.
Workflow
- Resolve the binary with
command -v aliyun; if absent, tell the user Alibaba Cloud CLI is not installed and stop before inventing commands.
- Inspect local context before operating:
aliyun version
aliyun configure list
aliyun configure get
- Confirm the active profile,
--region, account context, and endpoint context before any resource query that depends on them.
- Use
aliyun --help, aliyun <command> --help, and aliyun <command> <sub-command> --help to discover exact product/plugin names, OpenAPI operations, and flags.
- Prefer structured output for follow-up processing. Alibaba Cloud CLI API commands return JSON by default; use
--cli-query for JSON filtering and --output for tabular display.
- For unfamiliar operations, use Alibaba Cloud OpenAPI Explorer or CLI help to map the API operation to the installed CLI command. Prefer Alibaba Cloud CLI 3.3+ plugin command style when available, and fall back to legacy PascalCase OpenAPI commands only when local help shows that shape.
- Summarize results with profile, region, and account context so the user can see what scope was queried.
Command Reference
Read references/cli-usage.md when you need exact command patterns for configuration, output formatting, OSS, request previews, debugging, or troubleshooting.
Safety
Treat create, update, delete, start, stop, restart, reboot, resize, attach, detach, bind, unbind, authorize, revoke, grant, upload, download-to-sensitive-path, overwrite, and any operation with write/delete side effects as mutating.
Before running a mutating command, get explicit confirmation in the current conversation. Present the exact command, active profile, --region, target resource identifiers, and expected effect. Use --cli-dry-run for plugin commands when available; use legacy --dryrun only when command help shows that exact flag.
Never print or persist access keys, access key secrets, STS tokens, passwords, private keys, cookies, or decrypted configuration. If authentication is missing, guide the user to configure credentials locally; do not ask them to paste secrets into chat.