This topic introduces the concepts and core features of Alibaba Cloud CLI. It also clarifies the differences between the unified Alibaba Cloud CLI and service-specific CLIs to help you choose the right tool for your needs.
What is a CLI?
A CLI is a user interface (UI) that allows users to interact with computers by using text commands. You can directly enter commands in a CLI to perform operations without the need to use a graphical user interface (GUI). A CLI is used in multiple fields, including system management, software development, and network configuration. In the computer field, CLIs are widely used for various operating systems and software tools.
What is Alibaba Cloud CLI?
Alibaba Cloud CLI is a command-line tool that is built based on Alibaba Cloud API. You can use Alibaba Cloud CLI to create, delete, modify, and query Alibaba Cloud resources and perform O&M operations.
Linux Shell: In the Linux or macOS operating system, common shells, such as
Bash,Zsh, andtcsh, are used to run commands.Windows CLI: In the Windows operating system, you can use the Windows command prompt or PowerShell to run commands.
Remote operation: You can use Alibaba Cloud CloudShell to run commands, or use a remote terminal, such as SSH, to run commands by using Elastic Compute Service (ECS) instances.
You can also use Alibaba Cloud CLI to develop the shell script to implement automatic management and maintenance on Alibaba Cloud services. Before you use Alibaba Cloud CLI, make sure that your Alibaba Cloud service is activated and that you understand how to use the Alibaba Cloud service API.
If you have questions, submit a ticket for technical support or submit feedback on GitHub Issue.
What are the differences between Alibaba Cloud CLI and service-specific CLIs, such as Simple Log Service CLI?
Alibaba Cloud CLI is a common command-line tool. It is applicable to different features and scenarios than service-specific CLIs.
The unified Alibaba Cloud CLI supports over 100 services, including ECS, ApsaraDB RDS, and Server Load Balancer (SLB). It allows you to use a unified set of commands to manage resources across multiple products and accounts. The unified CLI is ideal for users who need to manage multiple services, offering broad, foundational features for flexible operations.
A service-specific CLI, such as the Simple Log Service CLI, is a tool designed for a single service. These CLIs offer specialized, in-depth features tailored to the service's complex use cases. We recommend using a service-specific CLI when you require advanced, product-focused functionality.
Features
Cloud resource management
Alibaba Cloud CLI is a management tool developed based on Alibaba Cloud API. You can call API operations of various Alibaba Cloud services by using Alibaba Cloud CLI. This way, you can efficiently manage and maintain your cloud resources without logging on to consoles.
Multi-service integration
Alibaba Cloud CLI is integrated with more than 100 Alibaba Cloud services, including ECS, RDS, and SLB. You can configure and manage multiple Alibaba Cloud services by using a single command line.
Multiple credential profiles
Alibaba Cloud CLI allows you to configure and manage multiple sets of credentials. You can save independent access keys and permission policies into different credential profiles. This enables you to easily switch between profiles when calling APIs, which is ideal for managing separate environments (such as development, testing, and production) or implementing hierarchical permission control.
Automatic retry with exponential backoff
Alibaba Cloud CLI automatically uses an exponential backoff mechanism for retries when encountering throttling errors from service APIs. For more information, see Advanced backoff mechanism based on the throttling policy. This mechanism prevents unnecessary retries, reduces system resource consumption, and improves operational efficiency.
Automatic command completion
Alibaba Cloud CLI supports automatic command completion on Linux and macOS. You do not need to memorize complex service commands. Automatic command completion is supported by Bash and Zsh.
Multiple output formats
Alibaba Cloud CLI provides multiple output formats to facilitate code viewing and collaborative coding. The JSON and table formats are supported. You can use an output format based on your business requirements.
Online help
Alibaba Cloud CLI provides online help. You can add the help option to query the operations that you can perform and the parameters of the operations.
Multi-system support
You can install and use Alibaba Cloud CLI in multiple operating systems such as Windows, macOS, and Linux.
References
For more information about Alibaba Cloud CLI and Alibaba Cloud API, see the following topics: