A newer version of this documentation is available.

View Latest

Common usage

While the library offers several command-line tools, they conform to similar rules. Specifically, all client-based command-line tools follow a specific format when connecting to the cluster.


To connect to a cluster, pass the cluster’s connection string to the -U option. If your bucket requires a password, you can specify the password using the -P option. The value to the -P option can either be a literal password string (insecure, but more convenient when testing), or a dash (-), which will cause the command line tool to prompt for the password once during execution. The latter method is more secure and should be used when connecting to production password-protected buckets.


Logging can be enabled by passing the -v option. In accordance with many traditional command line tools, the verbosity of the logging may be increased by passing the -v option more than once.

Connection String Options

While connection string options can be passed directly inside the connection string, they can also be specified on the command line directly by using the -D option. The -D option can be supplied multiple times and functions similarly to the option of the same name as used in the C preprocessor.

cbc cat foo -U couchbase://localhost/default?certpath=/foo/bar/baz?operation_timeout=5.0
        # Simpler
        cbc cat foo -U couchbase://localhost/default -Dcertpath=/foo/bar/baz -Doperation_timeout=5.0