With the CLI

Install the CLI

It can can be installed with homebrew by running:

brew install CrunchyData/brew/cb

You can update to newer versions with:

brew upgrade cb

You can also find packaged releases available on GitHub


A tutorial is available on YouTube at https://www.youtube.com/watch?v=tZNfZ-rl65I.

Tab completion

The Crunchy Bridge CLI offers tab completion so you can easily find the syntax for line completion. The CLI works best when used with the Fish (Friendly Interactive Shell) shell.

Authentication and API keys

The CLI will connect to your Bridge account via an API key available in your Account Settings. The first time you will need to create an API key and this will remain part of your account until you delete it.

API keys in account settings

After creating your API key, run:

cb login

And paste the login and secret key when prompted. To confirm that you are logged in, or to request your user id or name run cb whoami.

Creating a cluster

command about required default value values
-h, --help Show this help no
--plan Plan (server vCPU+memory) yes hobby-2, hobby-4, hobby-8, hobby-16, standard-8, standard-16, standard-32, standard-64, standard-128, standard-192, standard-384, memory-16, memory-32, memory-64, memory-128, memory-512, memory-768
-n, --name Cluster name no Cluster date+time You can create custom cluster names with standard ASCII characters
-p, --platform Cloud provider yes aws, azr, gcp
-r, --region Cluster region yes GCP: asia-northeast1 (Tokyo) asia-south1 (Mumbai) australia-southeast1 (Sydney) europe-north1 (Finland) europe-west1 (Belgium) europe-west3 (Frankfurt) northamerica-northeast1 (Montreal) us-central1 (Iowa) us-east4 (Virginia) us-west1 (Oregon) AWS: ap-northeast-1 (Tokyo) ap-southeast-1 (Singapore) ap-southeast-2 (Sydney) ap-south-1 (Mumbai) ca-central-1 (Toronto) eu-central-1 (Frankfurt) eu-north-1 (Stockholm) eu-south-1 (Milan) eu-west-1 (Ireland) eu-west-3 (Paris) sa-east-1 (Sao Paulo) us-east-1 (N. Virginia) us-east-2 (Ohio) us-west-1 (N. California) us-west-2 (Oregon) Azure: australiaeast (Australia) australiasoutheast (Australia) canadacentral (Toronto) centralus (Iowa)
-s, --storage Size of cluster in GB yes Any number from 10 - 20480
-t, --team Team ID yes To get your list of team ids, use cb teams
--network Network no New network To get the network of an existing cluster, use the cb info command
--replica Command to create replica of existing cluster no Input the ID of the cluster you want to replicate. Cluster IDs can be found with cb list.
--fork Command to create a fork / point-in-time recovery of an existing cluster no Input the ID of the cluster you want to fork, Cluster IDs can be found with cb list.
--at time Time for create fork/PITR no Current time Recovery point in RFC3339 for the last 10 days. Example UTC: 2021-10-12T23:20:50.52Z or with timezone offset: 2021-10-12T16:20:50.52-07:00.

For example:

cb create --platform aws --plan standard-8 --region us-east-2 --ha false --storage 100 -t fb545b7f7jfbhfrrdnnupz6qvm

Which would produce something like:

Created cluster vz72xkaswnbhpaxddxzfhzgimq "Cluster 2021-10-19 15_02_09"

Or to create a replica:

cb create --platform aws --plan hobby-2 --region us-east-2 --ha false --storage 10 --replica vz72xkaswnbhpaxddxzfhzgimq --team fb545b7f7jfbhfrrdnnupz6qvm

Which would produce:

Created cluster ojmu5tgjj5cn5gm763oto6irf4 "Replica of Cluster 2021-10-19 15_02_09"

List of commands available in the Crunchy Bridge CLI

Command Description
backup See a backup list, start a new backup, or retrieve a token to view backups in storage
create Create a new cluster, create a fork, or create a replica. Input platform, zone, and machine specifications to create a new cluster
destroy Deletes a cluster
detach Detach a cluster
firewall Manage firewall rules
help Shows the help
info Detailed cluster info including plan, region, network, and firewall
list List the active clusters for your entire account for all teams
logdest View or update the log destinations for a cluster
login Stores your api id and secret for a single session in a command line
logs View live cluster logs
psql Input the cluster id and connects to cluster with psql as postgres user
rename Change cluster names
restart Restart a cluster
resume Resume a suspended cluster
role Manage cluster roles
scope This will run a helpful set of queries to get insights into your cluster and database health
suspend This will suspend a cluster’s operations while saving the database in storage
team Manage teams
team-member Manage team members
teamcert This will show you the certificate for a team which can be used to check certificates
token Returns a token that is required for use when interacting with the API. Read more about tokens in the API docs
upgrade Manage a cluster upgrades
uri Dsiplay connection URI for a cluster
version Show the version and last updated date of the CLI tool
whoami Information on current user