liv

A CLI tool for save and manage your global npm modules

Liv

A CLI tool for save and manage your global npm modules

Install the module with: npm install -g liv

var Liv = require('liv');
//Create new instance of Liv 
var api = new Liv('access_token');

To run Liv in monitor mode you have to use the option --time 5000

Example:

# Time in milliseconds
liv monitor --time 5000 &

INFO: Without --time the default is 900000 = 15 minutes

Parameter: prompts Type: Array Example:

var prompts = [
{
    type: 'input',
    name: 'name',
    message: 'What\'s your name?'
}, 
{
    type: 'input',
    name: 'email',
    message: 'What\'s your email?'
}];

Parameter: cb Type: Function Example:

function(answers) {
    
}

The 'prompt' method is responsible for asking questions

How to use this method

var prompts = [
{
    type: 'input',
    name: 'name',
    message: 'What\'s your name?'
}, 
{
    type: 'input',
    name: 'email',
    message: 'What\'s your email?'
}];
 
api.prompt(prompts, function(answers) {
    console.log(answers);
}); 

Parameter: name Type: String Example: myname

Parameter: email Type: String Example: example@example.com

Parameter: password Type: String Example: 123456test

The 'signup' method is responsible for create accounts

How to use this method

 
api.signup('myname', 'email', '123456test');

Parameter: email Type: String Example: example@example.com

Parameter: password Type: String Example: 123456test

The 'login' method is responsible to login in accounts

How to use this method

 
api.login('email', '123456test');

Parameter: email Type: String Example: example@example.com

The 'forgot' method is responsible for reset passwords

How to use this method

 
api.forgot('example@example.com');

Parameter: pureJson Type: Boolean Example: true

The 'me' method is responsible for showing profile info

How to use this method

 
api.me(true);

Parameter: name Type: String Example: myname

Parameter: email Type: String Example: example@example.com

Parameter: password Type: String Example: 123456test

The 'updateMe' method is responsible for update profile info

How to use this method

 
api.updateMe('myname', 'email', '123456test');

The 'deleteMe' method is responsible for delete profile info

How to use this method

 
api.deleteMe();

Parameter: pureJson Type: Boolean Example: true

The 'modules' method is responsible for list all modules

How to use this method

 
api.modules(true);

Parameter: cb Type: Function Example: function(list) {}

The 'getModules' method is responsible for return all modules

How to use this method

 
api.getModules(function(list) {
    console.log(list.all); // All modules in a string 
    console.log(list.modules); // All modules in a array 
});

Parameter: modules Type: Array Example: [{name: '', version: ''}]

The 'updateModules' method is responsible for update modules

How to use this method

 
api.updateModules([{name: 'liv', version: '0.1.0'}]);

See the CONTRIBUTING Guidelines

If you have any problem or suggestion please open an issue here.

The MIT license

Copyright 2014, Christopher EnyTC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.