 pkg = require '../package.json'
 fs = require 'fs'
 
-cmd = argv._.shift() || 'help'
 if argv.env then config.env argv.env
 
-cli =
+commands =
   help: (argv) ->
     if argv.v || argv.version then return console.log pkg.version
 


  preview: (argv) ->
    preview = require('./preview')
    dirs = argv._
    dirs.push process.cwd() unless dirs.length

    preview argv._, (err, cnt, port) ->
      if err then return console.log chalk.red(err)
      console.log chalk.green("\\\\\\  ///  Versal SDK preview is started")
      console.log chalk.yellow(" \\\\\\///   ") + chalk.white("open http://localhost:#{port} in your favorite browser")

      }
      {
        name: "password"
        message: "Password:"
        required: true
        hidden: true
      }
    ]

    console.log 'Enter your Versal.com credentials to sign in:'
    prompt.get promptParams, callback

command = argv._.shift() || 'help'
if typeof commands[command] == 'function'
  commands[command](argv)
