The
cbt CLI
does not implement smart retries or error handling. When working in production
environment, use a Bigtable client library or the Google Cloud console.
If the
cbt CLI
is already installed, the terminal window displays the All components are up to date message.
Verify the installation
Run the following
cbt CLI
command to verify installation of the CLI:
cbt listinstances
The terminal window displays two columns named Instance Name and Info.
Create a .cbtrc file
You can store required options and parameters, such as -project, -instance, -creds, -admin-endpoint, or -data-endpoint options, in a single .cbtrc file for convenience.
In your .cbtrc file, configure cbt to use your project and instance by
replacing project-id with the ID for the project where you created
your Bigtable instance:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecbt\u003c/code\u003e CLI is a command-line tool for interacting with Bigtable, built using Go and the Go client library for Bigtable.\u003c/p\u003e\n"],["\u003cp\u003eYou can install the \u003ccode\u003ecbt\u003c/code\u003e CLI as a component of the gcloud CLI by running \u003ccode\u003egcloud components install cbt\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecbt\u003c/code\u003e CLI does not include smart retries or advanced error handling, making client libraries or the Google Cloud console better for production environments.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003e.cbtrc\u003c/code\u003e file to store frequently used options and parameters, such as project ID and instance name, for streamlined use of the \u003ccode\u003ecbt\u003c/code\u003e CLI.\u003c/p\u003e\n"],["\u003cp\u003eFor detailed information on usage and commands, the \u003ccode\u003ecbt\u003c/code\u003e CLI reference provides comprehensive documentation.\u003c/p\u003e\n"]]],[],null,["# cbt CLI overview\n\ncbt CLI\noverview\n================\n\nThe\n`cbt` CLI\nis a command-line interface for performing several\ndifferent operations on Bigtable. It is written in [Go](https://golang.org) using the\n[Go client library for Bigtable](/bigtable/docs/reference/libraries). Source code for the\n\n`cbt` CLI\nis available in the\n[GoogleCloudPlatform/google-cloud-go](https://github.com/GoogleCloudPlatform/google-cloud-go/tree/master/bigtable/cmd/cbt) GitHub repository. This\nrepository is a mirror of [code.googlesource.com/gocloud](https://code.googlesource.com/gocloud/+/master/bigtable/cmd/cbt/).\n\nFor information about Bigtable in general, see\nthe [overview of Bigtable](/bigtable/docs/overview).\n\nInstall the\n`cbt` CLI\n---------------------\n\nYou can install the\n`cbt` CLI\nas a\n[gcloud CLI component](/sdk/docs/managing-components).\n\nThe\n`cbt` CLI\ndoes not implement smart retries or error handling. When working in production\nenvironment, use a Bigtable client library or the Google Cloud console.\n\n1. [Install the gcloud CLI](/bigtable/docs/installing-cloud-sdk).\n2. Run the following commands:\n\n ```\n gcloud components update\n gcloud components install cbt\n ```\n\n If the\n `cbt` CLI\n is already installed, the terminal window displays the `All components are up to date` message.\n\n| **Note:** If you install the gcloud CLI in a directory that is not your home directory, you might need to update your PATH environment variable to include the path to `google-cloud-sdk/bin`.\n\nVerify the installation\n-----------------------\n\nRun the following\n`cbt` CLI\ncommand to verify installation of the CLI: \n\n cbt listinstances\n\nThe terminal window displays two columns named `Instance Name` and `Info`.\n\nCreate a .cbtrc file\n--------------------\n\nYou can store required options and parameters, such as `-project`, `-instance`, `-creds`, `-admin-endpoint`, or `-data-endpoint` options, in a single `.cbtrc` file for convenience.\n\n1. In your `.cbtrc` file, configure `cbt` to use your project and instance by\n replacing \u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e with the ID for the project where you created\n your Bigtable instance:\n\n ```\n echo project = project-id \u003e ~/.cbtrc\n echo instance = quickstart-instance \u003e\u003e ~/.cbtrc\n ```\n2. Verify that you set up the `.cbtrc` file correctly:\n\n ```\n cat ~/.cbtrc\n ```\n\n The terminal displays the contents of the `.cbtrc` file, which looks similar\n to the following settings: \n\n ```\n project = project-id\n instance = quickstart-instance\n ```\n\n Now you can use the\n `cbt` CLI\n with your instance.\n\nUse the\n`cbt` CLI\n-----------------\n\nFor details about using the\n`cbt` CLI\n, including a list of available commands,\nsee the [`cbt` CLI\nreference](/bigtable/docs/cbt-reference)."]]