Die cbt-Befehlszeile implementiert keine intelligenten Wiederholungsversuche oder Fehlerbehandlung. Verwenden Sie in der Produktionsumgebung eine Bigtable-Clientbibliothek oder die Google Cloud Console.
Wenn die cbt-Befehlszeile bereits installiert ist, wird im Terminalfenster die Meldung All components are up to date angezeigt.
Installation überprüfen
Führen Sie den folgenden Befehl in der cbt-Befehlszeile aus, um festzustellen, ob die Befehlszeile installiert ist:
cbt listinstances
Im Terminalfenster werden zwei Spalten mit den Bezeichnungen Instance Name und Info angezeigt.
.cbtrc-Datei erstellen
Sie können die erforderlichen Optionen und Parameter wie -project-, -instance-, -creds-, -admin-endpoint- oder -data-endpoint-Optionen in einer einzigen .cbtrc-Datei speichern.
Konfigurieren Sie in der Datei .cbtrccbt für die Verwendung Ihres Projekts und Ihrer Instanz. Ersetzen Sie dabei project-id durch die ID des Projekts, in dem Sie die Bigtable-Instanz erstellt haben:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-27 (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)."]]