couchbase-cli tool

couchbase-cli tool

The couchbase-cli tool is used to perform operations on an entire cluster.

Description

The couchbase-cli tool is located in the following paths, depending upon the platform. This tool 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 data bucket, all nodes in the cluster have access the bucket.

This tool provides access to various management operations for Couchbase Server clusters, nodes and buckets.

Note: Many of these settings can be performed using the REST API.
Operating System Directory Locations
Linux /opt/couchbase/bin/couchbase-cli
Windows C:\Program Files\Couchbase\Server\bin\couchbase-cli.exe
Mac OS X /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/couchbase-cli

couchbase-cli options

The couchbase-cli tool has the following generic options:

Table 1. couchbase-cli command options
Option Description
-u USERNAME, --user=USERNAME 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
Note: The user name can be set in the environment variable CB_REST_USERNAM E and the password can be set in the environment variable CB_REST_PASSWORD .

Syntax

The basic usage format is:

couchbase-cli COMMAND [bucket-name] CLUSTER [OPTIONS]
		

Where:

  • 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 --cluster=[host]:[port]