Alibaba Cloud CLI (Alibaba Cloud CLI) is an open‑source cross‑platform command‑line tool for managing Alibaba Cloud resources. You can perform almost all console operations in the terminal and combine commands into scripts for automated operations.
AI translation
阿里云 CLI(Alibaba Cloud CLI)是一个开源的跨平台命令行工具,用于管理阿里云资源。你可以在终端中完成控制台的几乎所有操作,并将命令组合为脚本实现自动化运维。
Developer toolsGo · ShellGitHub @aliyunOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Alibaba Cloud CLI
Translation pending
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
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.Read the full README ↗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.
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:
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.
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.
aliyun --help
aliyun ecs DescribeInstances --help
aliyun ecs describe-instances --help
aliyun ecs DescribeInstances \
--output cols=InstanceId,Status rows=Instances.Instance[]
aliyun ecs describe-instances \
--cli-query 'Instances.Instance[].{Id:InstanceId,Status:Status}'
aliyun ecs DescribeInstances \
--InstanceIds '["i-example"]' \
--waiter expr='Instances.Instance[0].Status' to=Running
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.
OpenAPI Troubleshoot helps diagnose OpenAPI request failures by RequestId or error message.
| 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:
Alibaba Cloud CLI is licensed under the Apache License 2.0.
| 指南 |