All Products
Search
Document Center

Alibaba Cloud CLI:Manage and use Alibaba Cloud CLI plugins

Last Updated:Jun 09, 2026

Install CLI plugins to manage cloud products from the command line. Each plugin maps to one product, installs on demand, updates independently, and serializes parameters automatically.

Prerequisites

  1. You have installed Alibaba Cloud CLI 3.3.0 or later. For installation instructions, see Install, update, and uninstall Alibaba Cloud CLI.

  2. You have configured credentials for Alibaba Cloud CLI. For instructions, see Configure and manage credentials.

Quick start

This example installs the ecs plugin and queries regions:

# Install a plugin (using the ecs plugin as an example)
aliyun plugin install --name ecs

# Call an API to query the list of regions
aliyun ecs describe-regions --accept-language en-US

Run aliyun ecs --help to list all available commands. The sections below cover naming, installation, parameters, and advanced features.

Plugin overview

Each plugin wraps a cloud product's API into a standalone executable. Key features:

  • On-demand installation: Install only what you need.

  • Independent updates: Versioned and released separately from the CLI.

  • Consistent naming: Commands and parameters use kebab-case (describe-instances, --accept-language).

  • Simplified parameters: The CLI serializes parameters automatically — use the same key-value format regardless of API style.

  • Built-in help: Run --help on any command for parameter types, descriptions, and requirements.

Plugins are stored in ~/.aliyun/plugins and tracked in manifest.json.

Plugin naming convention

Plugins follow the naming format aliyun-cli-<ProductCode>, where the product code matches Alibaba Cloud OpenAPI:

Name

Product code

Cloud product

aliyun-cli-ecs

ecs

Elastic Compute Service (ECS)

aliyun-cli-fc

fc

Function Compute (FC)

aliyun-cli-rds

rds

ApsaraDB RDS

You can use either the full name (aliyun-cli-ecs) or product code (ecs). Names are case-insensitive.

Install plugins

Check plugin availability

Check whether a cloud product has a plugin:

  • Online query (recommended): Browse by category, search by keyword, and view command examples in the CLI Center.

  • Command-line query: List available plugins or search by keyword:

    • List all plugins in the remote index:

      aliyun plugin list-remote
    • Example output:

      Total plugins available: 316
      
      Name                                     Latest Version  Preview  Status         Local Version  Description
      ----                                     --------------  -------  ------         -------------  -----------
      aliyun-cli-ecs                           0.1.0           No       Installed      0.1.0          Alibaba Cloud CLI plugin for ECS operations.
      aliyun-cli-fc                            0.1.0           No       Installed      0.1.0          Alibaba Cloud CLI plugin for FC 3.0 operations.
      aliyun-cli-acc                           0.1.0           No       Not installed  -              Alibaba Cloud CLI plugin for acs operations.

Search for a plugin

Find which plugin provides a specific command. Prefix matching is supported.

# Search for plugins containing "ecs"
aliyun plugin search ecs
# Search for commands in the ecs plugin that start with "describe"
aliyun plugin search "ecs describe"
Note
  • Plugins follow Semantic Versioning (SemVer):

    • 0.x.x versions are experimental with no compatibility guarantee.

    • 1.0.0+ versions are stable within the same major version. Major version bumps may introduce breaking changes.

  • The remote index is cached for one hour. To force a refresh, set ALIBABA_CLOUD_CLI_PLUGIN_NO_CACHE=true.

Install a plugin

aliyun plugin install accepts a plugin via --name (e.g. aliyun plugin install --name ecs) or a positional argument (e.g. aliyun plugin install ecs). Both are equivalent. --name was added in v3.3.14.

Flag

Description

--name <name>

Install a single plugin by name. Available since v3.3.14. Mutually exclusive with --names and --package.

--names <name1> <name2> ...

Install one or more plugins by name, separated by spaces. Mutually exclusive with --name and --package.

--version <version>

Specify the version to install. Only works with --name. If not specified, the latest stable version is installed.

--enable-pre

Allow installation of pre-release versions.

--package <path-or-url>

Install from a local archive file (.zip, .tar.gz, .tgz) or a URL that points to an archive. Mutually exclusive with --name and --names.

--source-base <url>

Use a custom plugin source URL for this command. Overrides the environment variable and configuration file settings.

Examples:

# Install a single plugin by name
aliyun plugin install --name ecs

# Install a specific version
aliyun plugin install --name fc --version 1.0.0

# Install multiple plugins at once
aliyun plugin install --names ecs rds vpc

# Install from a local archive file (for offline environments)
aliyun plugin install --package /path/to/ecs-plugin.zip

# Install from a URL
aliyun plugin install --package https://example.com/plugins/ecs-plugin.tar.gz

Verify with aliyun plugin list:

Name                Version             Description
----                -------             -----------
aliyun-cli-ecs      0.1.0               Aliyun CLI plugin for Elastic Compute Service operations.
aliyun-cli-fc       0.1.0               Aliyun CLI plugin for Function Compute 3.0 operations.
Note

The CLI auto-detects OS and architecture (darwin-arm64, linux-amd64) and downloads the matching package. In batch installs, one failure does not block others. Plugins requiring a newer CLI version prompt you to upgrade.

View plugin details

Run aliyun plugin list to list installed plugins. To view details of a specific plugin, run:

aliyun plugin show --name ecs

Example output:

Name:	              aliyun-cli-ecs
Version:	      0.3.0
Product code:	      Ecs
Short description:    Aliyun Ecs Plugin
Description:	      Aliyun CLI plugin for Elastic Compute Service operations.
API default:	      2014-05-26
API supported:	      2014-05-26

Fields:

Field

Description

Name

Full name (e.g. aliyun-cli-ecs).

Version

Installed version.

Product code

Product code (e.g. ecs).

Short description

Brief summary.

Description

Full description.

API default version

Default API version for commands.

API supported versions

Supported versions. Switch with --api-version.

Inner

Whether the plugin is an internal plugin.

Use plugins

Plugin commands use kebab-case. The CLI passes credentials, region, and timeout from the current profile automatically. Global options like --profile and --region apply without extra configuration.

Command format:

aliyun <plugin-name> <Command> [--parameter-name value ...]

Usage examples

View plugin help

Use aliyun <plugin-name> --help or aliyun <plugin-name> <Command> --help. For example, list all ecs commands:

aliyun ecs --help

View parameter details for a command:

aliyun ecs describe-regions --help

Example output:

......
  --accept-language         string, Filters the results by language. For more information, see[RFC
                            7231](https://tools.ietf.org/html/rfc7231). Valid values:
                            - zh-CN: Simplified Chinese.
                            - zh-TW: Traditional Chinese.
                            - en-US: English.
                            - ja: Japanese.
                            - fr: French.
                            - de: German.
                            - ko: Korean.
                            Default: en-US
  --instance-charge-type    string, The billing method for the instance. For more information, see https://help.aliyun.
                            com/document_detail/25398.html. Valid values:
                            - PrePaid: Subscription. If you use this method, make sure your account supports balance payments or credit payments.
                            Otherwise, an `InvalidPayMethod` error is reported.
                            - PostPaid: Pay-As-You-Go.
                            - SpotWithPriceLimit: A user-defined maximum price for a spot instance.
                            - SpotAsPriceGo: The system automatically bids for a spot instance at the Pay-As-You-Go price.
                            Default: PostPaid
......

The output shows each parameter's type, description, and whether it is required.

Query regions

Query available regions:

aliyun ecs describe-regions --accept-language en-US

Example output:

{
  "Regions": {
     "Region": [
	{
	   "LocalName": "China (Qingdao)",
	   "RegionEndpoint": "ecs.cn-qingdao.aliyuncs.com",
	   "RegionId": "cn-qingdao"
			},
	{
	   "LocalName": "China (Beijing)",
	   "RegionEndpoint": "ecs.cn-beijing.aliyuncs.com",
	   "RegionId": "cn-beijing"
	},
......

Advanced usage

Use structured parameters

Plugins serialize parameters automatically. The input format is the same regardless of the underlying API style (repeatList, flat, or JSON):

  • Array parameters: Repeat the flag for each value (e.g. attribute-name).

    aliyun ecs describe-account-attributes\
          --biz-region-id cn-hangzhou\
          --attribute-name max-security-groups\
          --attribute-name instance-network-type
  • Object parameters: Use key=value pairs (e.g. tag).

    aliyun ecs describe-instances --biz-region-id cn-hangzhou\
           --tag key=env value=prod

Use multi-version APIs

Some products have multiple API versions. Run aliyun plugin list — plugins with multi-version support show multi-version in their description:

Name                Version             Description
----                -------             -----------
aliyun-cli-ecs      0.1.0               Alibaba Cloud CLI plugin for ECS operations.
aliyun-cli-ess      0.1.0               Alibaba Cloud CLI plugin for Auto Scaling operations with multi-version API support.
aliyun-cli-fc       0.1.0               Alibaba Cloud CLI plugin for FC 3.0 operations.

Use --api-version to select a specific version:

  • Use the default API version

    aliyun ess describe-scaling-groups --biz-region-id cn-hangzhou
  • Specify an API version by using --api-version

    aliyun ess describe-scaling-groups --api-version 2022-02-22 --biz-region-id cn-hangzhou
  • List the supported API versions

    aliyun ess list-api-versions 

Set a default API version with an environment variable to avoid repeating --api-version. Format: ALIBABA_CLOUD_<PRODUCT_CODE>_API_VERSION (<PRODUCT_CODE> in uppercase):

# Add the environment variable and apply it
echo 'export ALIBABA_CLOUD_ESS_API_VERSION=2022-02-22' >> ~/.bashrc
source ~/.bashrc

The --api-version flag takes precedence over the environment variable.

Update and uninstall plugins

Update a plugin

Update a specific plugin:

aliyun plugin update --name ecs

Update all installed plugins:

aliyun plugin update

If already at the latest version, the CLI reports no update needed. Add --enable-pre for pre-release versions.

Verify with aliyun plugin list.

Uninstall a plugin

Remove a plugin:

aliyun plugin uninstall --name ecs

Verify removal with aliyun plugin list.

Configure automatic installation

The CLI can auto-install missing plugins when a command requires them — useful for CI/CD pipelines and multi-product environments.

Enable automatic installation

Enable via command:

aliyun configure set --auto-plugin-install true

Or with an environment variable:

echo 'export ALIBABA_CLOUD_CLI_PLUGIN_AUTO_INSTALL=true' >> ~/.bashrc
source ~/.bashrc

Verify with aliyun configure get.

Allow pre-release auto-installation:

aliyun configure set --auto-plugin-install-enable-pre true

Or with an environment variable:

echo 'export ALIBABA_CLOUD_CLI_PLUGIN_AUTO_INSTALL_ENABLE_PRE=true' >> ~/.bashrc
source ~/.bashrc

Installation policy

Behavior varies by runtime environment:

Scenario

Behavior

Auto-installation enabled

Installs automatically and continues.

Interactive terminal with auto-install disabled

Prompts before installing.

Non-interactive environment (script or pipeline)

Displays a prompt but does not install.

Example output for automatic installation:

# Run a command when the ecs plugin is not installed
aliyun ecs describe-regions --accept-language en-US
# Output of the automatic installation process
Plugin 'aliyun-cli-ecs' is required for command 'ecs describe-regions' but not installed.
Auto-installing plugin 'aliyun-cli-ecs' (including pre-release versions)...
Downloading aliyun-cli-ecs 0.1.0...
Plugin aliyun-cli-ecs 0.1.0 installed successfully!
......

Example output in an interactive environment with auto-install disabled:

# Run a command when the ecs plugin is not installed
aliyun ecs describe-regions --accept-language en-US
# Output of the interactive installation process
Plugin 'aliyun-cli-ecs' is required for command 'ecs describe-regions' but not installed.
Tip: Run 'aliyun configure set --auto-plugin-install true' to skip this prompt.
Do you want to install it? [Y/n]: y
Installing plugin 'aliyun-cli-ecs' (including pre-release versions)...
Downloading aliyun-cli-ecs 0.1.0...
Plugin aliyun-cli-ecs 0.1.0 installed successfully!
......

Plugin global settings

Use aliyun configure plugin-settings to set a custom plugin source for restricted networks or centralized URL management. Settings are stored in ~/.aliyun/plugin-settings.json.

View current settings

View current settings:

aliyun configure plugin-settings show

Set a custom plugin source

Set a custom source URL:

aliyun configure plugin-settings set --source-base https://internal-mirror.example.com/cli-plugins

Verify:

aliyun configure plugin-settings show

Clear custom settings

Clear custom settings and restore defaults:

aliyun configure plugin-settings clear

Source URL priority

The CLI resolves the source URL in this order (first match wins):

  1. The --source-base flag on the current command.

  2. The ALIBABA_CLOUD_CLI_PLUGIN_SOURCE_BASE environment variable.

  3. The source-base value in ~/.aliyun/plugin-settings.json.

  4. The built-in default URL.

Note
  • Plugin settings are stored in ~/.aliyun/plugin-settings.json.

  • The plugin-settings subcommands belong to aliyun configure, not aliyun plugin.

Appendix

Plugin command list

Command

Description

aliyun plugin list

Lists installed plugins.

aliyun plugin show --name <name>

Shows details of an installed plugin.

aliyun plugin list-remote

Lists available plugins from the remote index.

aliyun plugin search <command-name>

Searches for the plugin that corresponds to a command.

aliyun plugin install (--name <name> | --names <name1> [<name2> ...] | --package <path-or-url>) [--version <version>] [--enable-pre] [--source-base <url>]

Installs one or more plugins.

aliyun plugin update [--name <name>] [--enable-pre]

Updates a plugin.

aliyun plugin uninstall --name <name>

Uninstalls a plugin.

aliyun configure plugin-settings show

Displays plugin system settings.

aliyun configure plugin-settings set --source-base <url>

Sets the plugin source base URL.

aliyun configure plugin-settings clear

Removes the custom source base URL and reverts to the built-in default.

Plugin environment variables

Environment variables for plugin behavior:

Environment variable

Description

ALIBABA_CLOUD_CLI_PLUGINS_DIR

Custom plugin directory. Default: ~/.aliyun/plugins.

ALIBABA_CLOUD_CLI_PLUGIN_NO_CACHE

Set to true to disable remote index caching.

ALIBABA_CLOUD_CLI_PLUGIN_AUTO_INSTALL

Set to true to enable automatic installation.

ALIBABA_CLOUD_CLI_PLUGIN_AUTO_INSTALL_ENABLE_PRE

Set to true to allow automatic installation of pre-release versions.

ALIBABA_CLOUD_CLI_PLUGIN_SOURCE_BASE

Custom plugin source URL. Equivalent to --source-base on plugin install and plugin update commands. Can also be set through aliyun configure plugin-settings set.

ALIBABA_CLOUD_<PRODUCT_CODE>_API_VERSION

Default API version for a product. Example: ALIBABA_CLOUD_ESS_API_VERSION=2022-02-22.

ALIBABA_CLOUD_CLI_MAX_LINE_LENGTH

Maximum line length for help output.

FAQ

Installation fails: "no stable version available"

The plugin has only pre-release versions. Add --enable-pre:

aliyun plugin install --name <plugin-name> --enable-pre