All Products
Search
Document Center

Alibaba Cloud CLI:Use the VS Code extension of Alibaba Cloud CLI

Last Updated:Jul 31, 2024

This topic describes how to install and use the Visual Studio Code (VS Code) extension of Alibaba Cloud CLI.

Prerequisites

Alibaba Cloud CLI is installed. For more information about how to install Alibaba Cloud CLI on different operating systems, see the following topics:

Overview

The VS Code extension of Alibaba Cloud CLI is designed to improve the user experience of Alibaba Cloud CLI. The extension provides code files suffixed with .aliyun, and is similar to a command-line notepad. The extension provides the automatic code completion feature. When you compile code in an .aliyun file, the extension provides hints to automatically fill in partially typed commands, methods, and parameters. This greatly improves code compilation efficiency. After code compilation is complete, you can run the code on the terminal or in the editor with one click. You do not need to copy the code to another environment for execution.

The extension provides the following benefits:

Command line enhancement

  • Highlights the syntaxes in *.aliyun code files.

  • Provides CodeLens for Alibaba Cloud CLI commands to run in the editor.

  • Allows you to run Alibaba Cloud CLI commands on the terminal with one click.

  • Allows you to run Alibaba Cloud CLI commands in the editor with one click.

The following figure provides an example of command line enhancement.

1111.png

Automatic code completion

  • Provides hints to automatically fill in partially typed commands.

    The following figure provides an example of automatic command completion.

    2222.png

  • Provides hints to automatically fill in partially typed methods.

    The following figure provides an example of automatic method completion.

    33333.png

  • Provides hints to automatically fill in partially typed parameters.

    The following figure provides an example of automatic parameter completion.

    444444.png

CLI configuration management

  • Allows you to switch between different configuration credentials to use Alibaba Cloud CLI.

    55555.png

Install the extension

In the left-side navigation bar of VS Code, click Extensions. In the left-side search box, enter aliyuncli. Select Alibaba Cloud CLI Tools from the search results and click Install.

66666.png

After the extension is installed, the Alibaba Cloud icon appears in the status bar.

77777.png

Use the extension

The following video demonstrates how to use the extension.