Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Install the CLI tool


May 27, 2021 Web Cloud Development and Web Hosting Learning Guide


Table of contents


Cloud Development Officially Provides Command Line Tools (CLI): . Y ou can use the CLI for cloud development resource control, function deployment, and more. Here's how to install it:

Step 1: Make sure node and .js are installed

If you do not have a Node .js installed on your machine, it is recommended .js download a binary file from the Node.js website and install it directly, and we recommend that you select ltS version.

Step 2: Install the command line tool

You can now use npm to install cloudbase/cli, open the command line terminal, and enter the following command:

  1. sudo npm i -g @cloudbase/cli

If prompted to enter a password, enter your computer's power-on password. Sudo is used here to have permission to install globally.

Step 3: Test whether the installation was successful

If the installation process does not have an error prompt, the installation is generally successful. Let's move on to the command:

  1. cloudbase -v

If you see the output version number, it has been installed successfully.

Step 4: Learn more about one more command

To simplify the input, the cloudbase command can be simply written as tcb. t cb is short for Tencent CloudBase for cloud development products. Here you can also learn more about 1 more command and try to enter to the command line terminal:

  1. tcb -h

You can see all the capabilities and commands that the CLI currently supports. It is recommended that you use -h frequently to view commands.

? W hen using the CloudBase CLI, you need your terminal to be able to access the network. If your terminal does not have direct access to the public network, you can set up an HTTP proxy to enable the CLI to function http_proxy or HTTP_PROXY environment variables and automatically set up the network proxy service.

For example, you can run the following command in the terminal to set up http://127.0.0.1:8000 through the proxy service http://127.0.0.1:8000 of the server:

  1. export HTTP_PROXY=http://127.0.0.1:8000

The above command is only a temporary setting, when you close the terminal, the agent will automatically expire, the next time you open the terminal need to be reset. If you need to access the public network through an agent all the time, you can add commands to the terminal's configuration file.