Alibaba Cloud CLI
$ aliyun Official High RiskAlibaba Cloud CLI (aliyun) invokes Alibaba Cloud OpenAPI endpoints directly from a single Go binary, returning JSON by default and supporting --profile switching, --region overrides, --output tabular extraction, and --waiter polling.
brew install aliyun-cli aliyun maps 1:1 to Alibaba Cloud OpenAPI RPC/ROA calls with default JSON responses, avoiding MCP wrapper lag.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Emits JSON by default and exposes embedded API metadata via aliyun <product> --help, though it lacks built-in JMESPath filtering.
- Default JSON output; lacks built-in
--queryprojection
Supports --profile isolation and STS tokens, but lacks a universal --dry-run flag outside select APIs like ECS --DryRun.
- Supports named
--profileconfigs and RAM/STS credentials
Fast standalone Go binary installable via Homebrew or GitHub releases across macOS, Linux, and Windows.
- Single Go binary via
brew install aliyun-cli
Covers broad Alibaba Cloud OpenAPI surface, though PascalCase RPC flags require careful parameter matching.
- Direct RPC/ROA API mapping across Alibaba Cloud products
Official aliyun/aliyun-cli repository actively maintained by Alibaba Cloud.
- Official
aliyun/aliyun-cliunder Apache-2.0
Includes offline OpenAPI metadata (aliyun <service> <action> --help) alongside online documentation.
- Embedded API parameter help per service
Security, Auth & Guardrails
Stores profiles in ~/.aliyun/config.json, or reads ALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET, and ALIBABA_CLOUD_STS_TOKEN.
CLI is free (Apache-2.0); cloud resource actions incur Alibaba Cloud billing.
# Aliyun CLI Agent Rules - Explicitly pass `--profile` and `--region` on every invocation. - Restrict agents to read-only RAM policies (`ReadOnlyAccess`) during discovery. - Require approval before calling `Delete*`, `Release*`, or `Stop*` OpenAPI actions.
Agent-Ready Command Recipes
Safe Read-Only Queries
aliyun configure list
Checks active profile names, regions, and authentication modes.
aliyun ecs DescribeInstances --RegionId cn-hangzhou --PageSize 20
Returns raw JSON directly from the ECS OpenAPI endpoint.
Strengths for Agents
- + Fast single Go binary with zero runtime dependencies.
- + Outputs raw OpenAPI JSON by default.
- + Supports
--profileand STS temporary credentials.
Caveats & Pitfalls
- ! No built-in JMESPath
--queryflag; pipe tojqfor field filtering. - ! Service APIs use mixed PascalCase parameters and lack a universal CLI
--dry-run.