brainy-cli

0.0.3 • Public • Published

brainy-cli

command line tools to help you bootstrap a Backbone.js app on Node.js.

installation

$ npm install brainy-cli -g

usage

at the moment this is just a cute cli wrapper for managing CouchDB and MongoDB databases.

$ brainy-database --help
Usage: brainy-database [directive] [options]

Directives:
  create             Creates a new database with the specified configuration

Options:
  --database.adapter The database type (mongodb)
  --database.host    The database hostname (127.0.0.1)
  --database.port    The database port (27017)
  --database.name    The database name (brainy)
  -c, --config       Print out the supplied configuration
  -h, --help         You're staring at it

$ brainy-database --config
{ adapter: 'mongodb',
  host: '127.0.0.1',
  port: 27017,
  name: 'brainy' }

$ brainy-database --config --database.name=test
{ adapter: 'mongodb',
  host: '127.0.0.1',
  port: 27017,
  name: 'test' }

$ brainy-database create --database.name=test
Checking if database "test" exists...
The database does not exist. Creating now...
Database created

$ brainy-database create --database.name=test
Checking if database "test" exists...
The database already exists. Would you like to recreate it? (Y) 
Destroying database...
Database destroyed
Recreating database...
Database created

$ brainy-database delete --database.name=test
Checking if database "test" exists...
Are you sure you would like to delete the database? (N) 
Destroying database...
Database destroyed

Readme

Keywords

none

Package Sidebar

Install

npm i brainy-cli

Weekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • catshirt