flumedb / flumecli

command line interface for flumedb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flumecli

create a command line interface for a flumedb.

first create your flumedb with installed views, etc, as shown on the flumedb readme. Then, simply pass the db instance to flumecli

//db.js
var Flume = require('flumedb')
var CLI = require('flumecli')

var db = Flume(log)
  .use(name, view)...

if(!module.parent) CLI(db)

currently, flumecli assumes it makes sense to output your data as JSON objects. flume cli can call any method on your database, including on views.

node db.js stream # dump whole stream
node db.js get {seq} # get value at {seq}
node db.js append --foo bar # append an object {"foo": "bar"} (using minimist format)

# also, methods on views can be called!
node db.js {name}.{method}

any arguments in minimist format will be parsed, this is equivalent to javascript, but is also an ordinary command line switch style.

License

MIT

About

command line interface for flumedb

License:MIT License


Languages

Language:JavaScript 100.0%