A newer version of this documentation is available.

View Latest


The couchbase-cli tool is used to perform operations both on single nodes or on entire clusters.


The basic syntax is:

couchbase-cli COMMAND CLUSTER [options]


  • COMMAND is a CLI command.

  • CLUSTER is a cluster specification. The following shows both short and long form syntax:

// Short form
    -c [host]:[port]
// Long form


The couchbase-cli tool is located in the specific paths, depending on the platform. It can perform operations on an entire cluster, on a bucket shared across an entire cluster, or on a single node in a cluster. For instance, if this tool is used to create a bucket, all nodes in the cluster have access to the bucket.

Many of the couchbase-cli commands can be performed using the REST API reference.


The following are the command options:

Table 1. couchbase-cli options
Option Description


Admin username of the cluster.

-p PASSWORD, --password=PASSWORD

Admin password of the cluster.

-o KIND, --output=KIND

Type of document: JSON or standard.

-d, --debug

Output debug information.

-h, --help

Help information.

-s, --ssl

Uses SSL for communication with secure servers.

The username can be set in the environment variable CB_REST_USERNAME and the password can be set in the environment variable CB_REST_PASSWORD.


List the buckets in a cluster:

export CB_REST_USERNAME=Administrator; export CB_REST_PASSWORD=mypasswd; \
/opt/couchbase/bin/couchbase-cli bucket-list -c localhost:8091