All Products
Search
Document Center

Alibaba Cloud CLI:What is Alibaba Cloud CLI

Last Updated:Jun 03, 2026

Alibaba Cloud CLI is an open-source, cross-platform command-line tool that lets you do everything the Alibaba Cloud console does — from your terminal. Combine commands into scripts to automate resource management across over 300 cloud services.

Why use CLI

CLI uses a plugin-based architecture: when you run a command for a cloud service, CLI automatically downloads the corresponding plugin. No toolkits to preinstall, no setup per service — just run the command and CLI handles the rest. Over 300 services are supported, including ECS, RDS, OSS, SLB, and FC.

Scripting and automation

Any console operation maps to a single CLI command. Write those commands into shell scripts to handle batch resource creation, scheduled cleanup, CI/CD pipelines, and other automation workflows.

For example, query ECS instances across multiple regions:

for region in cn-hangzhou cn-shanghai cn-beijing; do
  aliyun ecs describe-instances --biz-region-id "$region" --pager
done

Multiple profiles

Save multiple credential profiles and switch between them with the --profile parameter. No re-authentication is needed when moving between development, staging, and production environments:

aliyun ecs describe-instances --profile dev
aliyun ecs describe-instances --profile prod

Pipes and tooling

CLI outputs structured responses that you can pipe to standard tools such as jq, grep, and awk.

For example, extract the IDs of all running instances in a region:

aliyun ecs describe-instances --biz-region-id cn-hangzhou --pager \
  | jq -r '.Instances.Instance[] | select(.Status=="Running") | .InstanceId'

AI agent integration

CLI's text-based interface makes it a natural fit for AI agent workflows.

CLI includes a built-in MCP authentication proxy (aliyun mcp-proxy) that simplifies integrating third-party AI applications — such as Dify and LangChain — with Alibaba Cloud OpenAPI MCP Server.

Start the local proxy and let your AI agent connect through http://127.0.0.1:8088:

aliyun mcp-proxy --port 8088

For configuration details, see Proxy an OpenAPI MCP server with aliyun mcp-proxy.

Supported environments

  • Linux — Bash, Zsh, and other shells

  • macOS — Terminal (Bash or Zsh)

  • Windows — Command Prompt and PowerShell

  • Remote — SSH to ECS instances or Use Cloud Shell

Version information

Check your installed version. For the latest release, see GitHub Releases.

aliyun version
Note

Versions earlier than 3.3.0 are no longer maintained and do not receive feature updates or bug fixes. To upgrade, see Upgrade Alibaba Cloud CLI.

Alibaba Cloud CLI is hosted on the GitHub aliyun-cli repository. To report issues or suggest improvements, submit a GitHub Issue.

What's next