balena-cli/lib/app.coffee

26 lines
625 B
CoffeeScript
Raw Normal View History

2014-11-17 19:48:26 +00:00
program = require('commander')
2014-11-18 12:35:50 +00:00
packageJSON = require('../package.json')
data = require('./data/data')
config = require('./config')
2014-11-17 19:48:26 +00:00
auth = require('./actions/auth')
app = require('./actions/app')
2014-11-17 19:48:26 +00:00
program.version(packageJSON.version)
program
.command('login <username:password>')
.description('Login with your resin.io account')
.action(auth.login)
2014-11-17 19:48:26 +00:00
program
.command('apps')
.description('Show a list of your apps')
.action(app.list)
2014-11-17 19:48:26 +00:00
# TODO: Check if not running on UNIX environment
# and add a custom path accordingly
data.prefix.set config.dataPrefix, (error) ->
throw error if error?
program.parse(process.argv)