Browser and CLI Access

You can browse and access documents in Couchbase using browser and command line tools without writing any code.
This can be helpful to you if you simply wish to inspect cluster data without writing code.
You can access individual documents using the command line and web console.

Command-Line

You can access documents in Couchbase using command line interfaces.
You can use the cbc tool for simple document lookups by their IDs (or keys) and the cbq tool to issue N1QL queries.
This section will discuss the installation and usage of the cbc tool, and is targeted towards Linux and Mac OS X users.

You can also use cbc on Windows by extracting the archive with libcouchbase.
The archive contains cbc.exe by default.

Installing the command-line KV client

To use the cbc tool, first install the C SDK.
Note that you will also need to install the command line tools.

You can find out more about the cbc command by referring to your local man pages or by viewing its documentation.

Using the command-line query shell (cbq)

You can use the cbq program as a command line query shell to issue N1QL queries in couchbase.
cbq is available on all cluster nodes and does not require a separate installation.
Simply run cbq from the Couchbase installation directory (/opt/couchbase/bin/cbq on Linux and "/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbq").
Once in the shell, you should be greeted by a prompt and ready to issue any N1QL query.

Couchbase Web Console Document Access

You can use the Couchbase Web Console to view, edit, and create JSON documents up to 256KB in size.
To access documents using the Couchbase Web Console:

Navigate your browser to a cluster node.
Type the address of the cluster with the admin port (8091).
Use your username (usually Administrator).
The password is the password you used when setting up the cluster.

Once logged in, access the Buckets view, by left-clicking on the Buckets tab, in the navigation panel at the left-hand side.
The Buckets view displays all buckets currently defined on your system.
In the illustration below, the travel-sample bucket is displayed:

Left-click on the Documents tab, at the right-hand side of the travel-sample bucket-row.
This brings up the Documents view, which lists the documents contained by the selected bucket:

To retrieve a document, enter the document ID into the Look Up ID field, at the upper-right; then left-click on the adjacent button.
The Documents Editing page now appears.
This allows you to edit the selected document.

To create a new document, return to the Documents view, and click on Add Document, at the upper right.
This brings up the Create Document dialog, which allows you to enter a Document ID:

Enter an appropriate ID, then save.
This bring up the Documents Editing view.