
Alibaba Cloud CLI
CLIAlibaba Cloud's official CLI (aliyun): manage ECS, OSS and other services through OpenAPI, with structured output, JMESPath filtering, waiting on resource states, product plugins and a built-in MCP proxy. Configure credentials first; OAuth sign-in works locally.
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
For a remote machine without a browser, use:
aliyun configure --mode OAuth --profile default --no-browser
Open the printed authorization link on a device with a browser. After signing in,
copy the complete callback URL from the address bar and paste it into the CLI,
even if the browser reports a connection error. Include both code and state.
This mode does not start a local callback server or require port forwarding.
Press Ctrl+C to cancel.
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 names case-insensitively, without expanding API aliases. Configure a rule for each command name used by your automation. See command matching rules.
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.
Data collection
Telemetry is enabled by default to help improve Alibaba Cloud CLI's stability, usability, and performance.
To disable telemetry, run:
aliyun configure telemetry disable
You can also disable it by setting ALIBABA_CLOUD_CLI_TELEMETRY_DISABLE=1. See Telemetry data collection for the collected information and available controls.
Troubleshoot
OpenAPI Troubleshoot helps diagnose OpenAPI request failures by RequestId or error message.
Starting with Alibaba Cloud CLI 3.5.4, use DEBUG=dara to enable SDK HTTP diagnostics. DEBUG=sdk is no longer supported. Review the output for sensitive information before sharing it.
DEBUG=dara aliyun ecs DescribeRegions --region cn-hangzhou --method GET
Excerpt from the diagnostic output, with credentials and signing values redacted.
> GET https://ecs.cn-hangzhou.aliyuncs.com/?AccessKeyId=REDACTED&Action=DescribeRegions&...&Signature=REDACTED&...
> x-acs-action: DescribeRegions
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=utf-8
Documentation
| Topic | English | 简体中文 |
|---|---|---|
| Documentation index | English | 中文 |
| Installation and upgrade | Guide | 指南 |
| Configuration and credentials | Guide | 指南 |
| Telemetry data collection | 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.
Recursos relacionados

Serverless Devs
CLIFull-lifecycle tool for serverless apps (the s command): describe an app in YAML and deploy it to FaaS platforms such as Alibaba Cloud Function Compute, AWS Lambda and Tencent Cloud SCF, with CI/CD integration. A CNCF Sandbox project; needs cloud provider credentials.
Serverless-Devs/Serverless-Devs1.8k
Pulumi
CLIDefine cloud infrastructure in general-purpose languages like TypeScript, Python and Go, then preview and deploy with pulumi up to AWS, Azure, GCP, Kubernetes and 300+ other providers. Open source and maintained by Pulumi.
pulumi/pulumi26k
AWS CLI
CLIAWS's official unified CLI for managing EC2, S3, IAM and every other AWS service with one set of commands, with --query (JMESPath) filtering and JSON output that agents can use to inspect and change cloud resources. Run aws configure to set credentials first.
aws/aws-cli17.4k
cloudflared
CLIOfficial Cloudflare Tunnel client: exposes local services to the internet without opening firewall ports and can proxy TCP access like SSH and RDP. Named tunnels need a Cloudflare account and domain; quick tunnels work without signing in.
cloudflare/cloudflared16.8k
flyctl
CLIFly.io's official CLI (fly): sign in, create and deploy apps, and list apps and check their status, reading fly.toml in the current directory to identify the app. Needs a Fly.io account.
superfly/flyctl1.7k
Railway CLI
CLIRailway's official CLI: deploy with railway up and manage infrastructure config, with token auth for non-interactive CI runs. The installer can set up the Railway skill and MCP for Claude Code, Codex and others in one step. Needs a Railway account.
railwayapp/cli634