Skip to main content

Introduction

danger

Tencent CloudBase Toolkit has ceased maintenance and iteration. It is recommended to use the Cloud Development CLI tool.

The Tencent CloudBase Toolkit is a VS Code (Visual Studio Code) plugin released by Tencent Cloud - CloudBase. This plugin enables you to better develop CloudBase projects and debug code locally, while effortlessly deploying projects to the cloud.

Through the Tencent CloudBase Toolkit plugin, you can:

  • Quickly create CloudBase projects locally
  • Quickly create cloud functions from multiple templates
  • Synchronize the cloud function list from the cloud and download the function code locally
  • Deploy cloud functions to the cloud and install dependencies in the cloud
  • Manage cloud functions, such as deleting cloud functions and viewing function details
  • Incrementally update cloud function files
  • Delete cloud function files from the cloud
  • Deploy static hosting files to the cloud

Meanwhile, the VS Code plugin also supports local debugging and cloud debugging of cloud functions, helping you quickly locate code issues.

Quick Start

Installation

  1. Run VS Code IDE
  2. Open the VS Code Extensions Marketplace
  3. Enter Tencent CloudBase Toolkit in the search box, click the Tencent CloudBase Toolkit plugin in the list below the search box to view details and select [install]

Create Environment

If you have already activated Cloud Development services and created the relevant environment, you can skip this step.

  1. Log in to the Tencent Cloud official account

    Visit the Tencent Cloud official website, register a Tencent Cloud account, and then log in to your account. If you already have an account, you can log in directly.

  2. Enable CloudBase

    Go to the CloudBase homepage and grant relevant permissions to enable the service.

  3. Create Environment

    Click New Environment, enter the environment name, select the pay-as-you-go billing mode, click Activate Now, wait for the service activation to complete, then proceed to the next steps.

Configuration

1. Click the icon in the left navigation bar to open the installed Tencent CloudBase Toolkit plugin.

2. Click Login

3. Select login method

CloudBase Toolkit provides two login methods: you can log in via the Tencent Cloud - CloudBase console, or use a Tencent Cloud access key to log in.

4. Create configuration file

After successful login, a "Login successful" prompt will appear in the bottom-right corner of the VSCode window. Meanwhile, if no cloudbaserc.json configuration file is detected in the current project, CloudBase Toolkit will prompt you to create a CloudBase project or create a configuration file.

Creating a CloudBase project pulls cloud modules to create a new project, while creating a configuration file only generates the cloudbaserc.json configuration file in the current directory.

Create Project

Note: The CloudBase Toolkit plugin depends on the cloudbaserc.json configuration file. You can only use the CloudBase Toolkit plugin for related operations when the cloudbaserc.json configuration file exists in the root directory of the current project.

If you don't have a CloudBase project yet, you can create a new CloudBase project through initialization. CloudBase Toolkit provides some template projects for selection.

Open an empty folder, click the CloudBase icon in the sidebar, then click the item in the example image below.

Select the Cloud Development environment to use

Select a Template

Wait for the template download to complete; a prompt will appear in the bottom-right corner. Contributions to your templates are welcome!

Project Directory Structure

Sign Out

Use Ctrl+Shift+P to bring up the command palette, enter cloudbase to search, then select the sign out command.