
Alibaba Cloud CLI
CLI阿里云官方命令行(aliyun),通过 OpenAPI 管理 ECS、OSS 等云产品资源,支持结构化输出、JMESPath 过滤、等待资源状态与产品插件,并内置 MCP 代理。需先配置凭证,本地可用 OAuth 登录。
Alibaba Cloud CLI
A cross-platform command-line tool for managing Alibaba Cloud resources through OpenAPI.
Alibaba Cloud CLI (aliyun) is written in Go and works on macOS, Linux, and Windows. It supports interactive and non-interactive credential profiles, OpenAPI calls, local API help, structured output, waiters, safety controls, and an extensible plugin system.
Alibaba Cloud CLI invokes cloud services through OpenAPI. Activate the target service first and make sure your identity has the required permissions. Avoid long-lived AccessKeys where a temporary or identity-based credential mode is available.
Install
Choose one of the following methods:
# Homebrew
brew install aliyun-cli
# macOS or Linux installer script
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"
Official packages:
Verify the installation:
aliyun version
Upgrade an existing standalone installation:
aliyun upgrade
If the CLI was installed through a package manager, prefer that package manager's upgrade command.
See the installation guide for PATH setup, source builds, and upgrades.
To try the CLI without installing it locally, open Alibaba Cloud Shell:
Quick start
1. Configure a profile
For an interactive local environment, OAuth avoids storing a long-lived AccessKey:
aliyun configure --mode OAuth --profile default
You can also use AK, StsToken, RamRoleArn, EcsRamRole, OIDC, External, CredentialsURI, ChainableRamRoleArn, CloudSSO, BearerToken, or Anonymous mode where applicable.
# Inspect and select profiles
aliyun configure list
aliyun configure switch --profile default
See configuration and credentials before using a profile in production or CI.
2. Call an API
Both the traditional PascalCase form and the metadata-driven kebab-case form are supported where metadata is available:
aliyun ecs DescribeRegions
aliyun ecs describe-regions
Safety policy matches command spelling by design: it ignores case but does not expand API aliases or equate PascalCase with kebab-case. Configure rules for each spelling your automation uses; see the matching contract.
3. Explore help
aliyun --help
aliyun ecs DescribeInstances --help
aliyun ecs describe-instances --help
Common capabilities
Filter and format output
aliyun ecs DescribeInstances \
--output cols=InstanceId,Status rows=Instances.Instance[]
aliyun ecs describe-instances \
--cli-query 'Instances.Instance[].{Id:InstanceId,Status:Status}'
Wait for a resource state
aliyun ecs DescribeInstances \
--InstanceIds '["i-example"]' \
--waiter expr='Instances.Instance[0].Status' to=Running
Use product plugins
aliyun plugin search <command-name>
aliyun plugin install --name <plugin-name>
aliyun plugin list
aliyun plugin update --name <plugin-name>
See command usage and plugin management for the complete workflows.
Troubleshoot
OpenAPI Troubleshoot helps diagnose OpenAPI request failures by RequestId or error message.
Documentation
| Topic | English | 简体中文 |
|---|---|---|
| Documentation index | English | 中文 |
| Installation and upgrade | Guide | 指南 |
| Configuration and credentials | Guide | 指南 |
| Commands, output, and automation | Guide | 指南 |
| MCP, OpenTelemetry, and machine interfaces | Guide | 指南 |
| Built-in OSS automation | Guide | 指南 |
| Plugin management | Guide | 指南 |
Additional resources:
Support
- Search existing or open a GitHub issue.
- For a suspected security vulnerability, follow SECURITY.md instead of opening a public issue.
- Release notes and binaries are available on the Releases page.
License
Alibaba Cloud CLI is licensed under the Apache License 2.0.
相關資源

Serverless Devs
CLIServerless 应用全生命周期管理工具(s 命令):用 YAML 描述应用,一键部署到阿里云函数计算、AWS Lambda、腾讯云 SCF 等 FaaS 平台,并可接入 CI/CD。CNCF Sandbox 项目,需要配置云厂商密钥。
Serverless-Devs/Serverless-Devs1.8k
Pulumi
CLI用 TypeScript、Python、Go 等通用编程语言定义云基础设施,pulumi up 即可预览并部署到 AWS、Azure、GCP、Kubernetes 等 300 多个提供方。Pulumi 官方维护,开源。
pulumi/pulumi25.8k
AWS CLI
CLIAWS 官方统一命令行,用一套命令管理 EC2、S3、IAM 等各项 AWS 服务,支持 --query(JMESPath)过滤与 JSON 输出,便于 agent 查询和变更云资源。使用前需用 aws configure 配置访问凭证。
aws/aws-cli17.3k
cloudflared
CLICloudflare Tunnel 官方客户端:无需开放防火墙端口即可把本地服务暴露到公网,也能代理 SSH、RDP 等 TCP 访问。命名隧道需 Cloudflare 账号与域名,快速隧道可免登录试用。
cloudflare/cloudflared16.2k
flyctl
CLIFly.io 官方命令行(fly):登录账号、创建并部署应用、查看应用列表与运行状态,自动读取当前目录的 fly.toml 识别应用。需要 Fly.io 账号。
superfly/flyctl1.7k
Railway CLI
CLIRailway 官方命令行:用 railway up 部署项目、管理基础设施配置,支持 token 在 CI 中非交互运行;安装时可一键为 Claude Code、Codex 等配置 Railway skill 与 MCP。需要 Railway 账号。
railwayapp/cli622