Installation
- Mac/Linux/Windows WSL
- Windows PowerShell
- npm/yarn/pnpm
Recommended: One-click installation script
Completes installation in seconds (compared to several minutes typically required for npm installation), delivering a faster and more convenient experience:
curl https://static.cloudbase.net/cli/install/install.sh -fsS | bash
irm https://static.cloudbase.net/cli/install/install.ps1 | iex
To install with npm/yarn/pnpm:
npm i -g @cloudbase/cli
Or use Yarn 1.x:
yarn global add @cloudbase/cli
Or Pnpm:
pnpm add -g @cloudbase/cli
If you encounter issues accessing the official npm registry, typically seeing errors during installation such as "ETIMEOUT" or "npm ERR! network request to https://registry.npmjs.org/@cloudbase%2fcli failed", you should temporarily specify a domestic npm mirror in China:
npm i -g @cloudbase/cli --registry=http://mirrors.cloud.tencent.com/npm/
yarn global add @cloudbase/cli --registry=http://mirrors.cloud.tencent.com/npm/
AI Development
Use tcb ai
to start AI development.
tcb ai
All Commands
Use tcb -h
to view all available commands.
tcb -h
[Optional] Use a proxy
When using the CloudBase CLI, your terminal must have access to the public network. If your terminal cannot directly access the public network, you can set up an HTTP proxy to enable the CLI to function properly. The CLI reads the http_proxy
or HTTP_PROXY
environment variables to automatically configure the network proxy service.
For example, you can run the following command in the terminal to configure the CLI to access the network through the proxy service at http://127.0.0.1:8000
:
export HTTP_PROXY=http://127.0.0.1:8000
http://127.0.0.1:8000` is only an example; do not use it directly. The specific proxy configuration should be determined based on your network setup.
The above command only sets a temporary proxy, which will automatically become invalid after you close the terminal. You will need to set it again when you open the terminal next time. If you need persistent proxy access to the public network, you can add the command to your terminal's configuration file.