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.

Web Console Document Access

You can use the Web Console to view, edit, and create JSON documents up to 2.5KB in size.
To access documents using the 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, go to the Data Buckets section

Click on the Documents button of the default bucket:

To retrieve a document, type in the document ID and click on Lookup ID.
This will then open the document edit page:

To create a new document, return to the Documents section and click on Create Document

You’ll be prompted to enter a document ID

Once created, you can now edit your document.
Don’t forget to Save when done