tree: 7379c9f86df7e7e5e52a7f4ca55995de0290047a [path history] [tgz]
  1. cbt.go
  2. cbt_test.go
  3. cbtdoc.go
  4. gcpolicy.go
  5. gcpolicy_test.go
  7. testing.go
  8. timeout_test.go

CBT: Cloud Bigtable Tool

This is the source for cbt.

Build and Run

To build the tool locally, run this command in this directory:

go build .

That will build the cbt binary in that directory. To run commands with the cbt you built (rather than the official one) invoke it with the directory prefix like this:

./cbt help


This tool gets documented on the Go packages website as well as the cloud site.

Go Package Documentation

This command will generate a file with a package description which gets used for the You should update this after any changes to the usage or descriptions of the commands. To generate the file, run:

go generate

The output will be in cbtdoc.go.

You may want to verify this looks good locally. To do that, you will need to generate the doc into your GOPATH version of the directory, then run godoc and you can view the local version

go run . -o $(go env GOPATH)/src/ doc

Cloud Site Documentation

The Cloud documentation uses the cbt mddoc command to generate part of the cbt Reference page. To preview what it will look like upon generation, you can generate it into a file with the command:

go run . -o mddoc

This will create a file You don't need to check it into this repository, so delete it once you are happy with the output.


The configuration for the options (-project, -instance, and -creds) is in cbtconfig.go. So change that file if you need to modify those.