Quick Start
CloudBase CLI installs globally through npm. After tcb login completes, the CLI can run resource management commands.
Prerequisites
- A Tencent Cloud account.
- CloudBase activated with an environment created. See Create an environment.
- Node.js. Required when installing through npm, yarn, or pnpm.
Install
npm i -g @cloudbase/cli
For other package managers, registry mirrors, and upgrades, see Installation.
Log in
tcb login
tcb login uses device code authorization: the terminal prints an authorization link and a user code. Open the link on a device with a browser, enter the user code, and confirm.
On a machine with a graphical interface, use local callback authorization instead:
tcb login --flow web
For international accounts, sub-accounts, and other login methods, see Login authentication.
Verify
tcb env list
The command prints the environments available to the current account, including environment IDs.