bw-cli
Version:
The Brightwork (bw) command line deployment tool. Build & deploy serverless RESTful APIs in minutes.
26 lines (25 loc) • 1.1 kB
JavaScript
require('./env')();
var path = require('path');
var fs = require('fs');
var program = require('commander');
var robot = fs.readFileSync(path.join(appPath, 'robot.txt'), 'utf8');
var logo = fs.readFileSync(path.join(appPath, 'logo.txt'), 'utf8');
var colors = require('colors');
var pkg = require(global.appPath + '/package.json')
program
.version(pkg.version)
.description('The BrightWork (bw) command line deployment tool. Build & deploy a serverless RESTfull API in less than 30 seconds.')
.command('info', 'Display BrightWork.io settings')
.command('login', 'Login with username and password to generate an authentication token')
.command('configure', 'Set or change BrightWork.io settings')
.command('init', 'Create an empty API manifest')
.command('push', 'Deploy your API')
.command('delete [api]', 'Delete an API')
.command('list', 'List your APIs')
.on('--help', function(){
console.log(colors.green(robot));
console.log(colors.green(logo));
console.log(this.helpInformation());
})
.parse(process.argv);