Stay organized with collections Save and categorize content based on your preferences.

cbt tool overview

The cbt tool is a command-line interface for performing several different operations on Cloud Bigtable. It is written in Go using the Go client library for Cloud Bigtable. Source code for the cbt tool is available in the GitHub repository GoogleCloudPlatform/google-cloud-go. This repository is a mirror of

For information about Bigtable in general, see the overview of Bigtable.

Installing the cbt tool

You can install the cbt tool as a gcloud CLI component or by using the standard go tool.

The cbt tool does not implement smart retries or error handling. When working in a production environment, use a Bigtable client library or the Google Cloud console.

gcloud CLI

This installation path is recommended if you work with multiple Google Cloud products.

  1. Install the gcloud CLI.
  2. Run the following commands:

      gcloud components update
      gcloud components install cbt

    If the tool is already installed, the terminal window displays the message All components are up to date.

Go tool

If you have the latest stable release of the go tool installed, you can install the cbt tool using the following command:

go get

Verifying the installation

Run a cbt command to verify installation of the tool:

cbt listinstances

The terminal window displays two columns named Instance Name and Info.

Creating a .cbtrc file

  1. Configure cbt to use your project and instance by creating a .cbtrc file, replacing project-id with the ID for the project where you created your Bigtable instance:

       echo project = project-id > ~/.cbtrc
       echo instance = quickstart-instance >> ~/.cbtrc

  2. Verify that you set up the .cbtrc file correctly:

       cat ~/.cbtrc

    The terminal displays the contents of the .cbtrc file, which looks similar to the following:

    project = project-id
    instance = quickstart-instance

    Now you can use the cbt tool with your instance.

Using the cbt tool

For details about using the cbt tool, including a list of available commands, see the cbt reference.