 path = require 'path'
 yaml = require 'yaml'
 fs = require 'fs'
+args = require 'args'
 
 brunch = require './brunch'
 helpers = require './helpers'



config =
  commands:
    new:
      help: 'Create new brunch project'
      opts:
        appPath:
          position: 1
          help: 'application path'


    test:
      help: 'Run tests for a brunch project'
      options:
        verbose:
          flag: yes
          help: 'set verbose option for test runner'
      callback: (options) ->
        brunch.test parseOpts options

  options:
    version:
      abbr: 'v'
      help: 'display brunch version'
      flag: yes
      callback: -> brunch.VERSION


exports.run = ->
  args.parse config
