cliak

0.0.3 • Public • Published

cliak!

cliak is a minimal Command Line Interface (CLI) written in Node for performing CRUD operations on a Riak distributed database instance.

Installation

:::shell
$ npm install cliak

You will need to make the script executable in order to run it:

:::shell
$ chmod a+x node_modules/cliak/bin/cliak

Usage

:::shell
$ cliak --help

Example

:::shell
$ cliak -h 127.0.0.1 -p 8098 -P http

cliak invoked without any option will use the following default values to connect to the riak instance:

:::javascript
{
  host: '127.0.0.1',
  port: 8098,
  protocol: 'http'
}

Interactions

You can use cliak to perform the following operations:

Exists

Find out if a given object exists in the riak instance.

:::shell
> exists avengers black_widow

Get

Retrieve object data from the riak instance.

:::shell
> get avengers black_widow

Save

Persist/update an object in the riak instance.

:::shell
> save avengers iron_man "{name:'tony starks', power: 'super armor'}"

Note that the object/value to persist must be between double-quotes.

Delete

Delete an object from the riak instance.

:::shell
> delete avengers iron_man

All

You can display the entire content of a bucket like this:

:::shell
> all avengers

However keep in mind the following from Basho:

This operation requires traversing all keys stored in the cluster and should not be used in production.

This means that cliak's performance on executing all will be less than desirable if you have a large number of keys in the store.

Termination

:::shell
> exit

Readme

Keywords

none

Package Sidebar

Install

npm i cliak

Weekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • csolar