0.3.0 • Published 10 years ago

flumecli v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago