A newer version of this documentation is available.

View Latest


The cbq tool enables you to run N1QL queries from the command line.


The basic syntax is:

cbq> create primary index on `beer-sample`;
cbq> select * from `beer-sample` limit 1;

For a detailed explanation on logging in and running a N1QL query using cbq, see Running N1QL queries from a command line .