#!/usr/bin/env node

'use strict';

var pkg   = require('../package.json');

var docopt = require('docopt').docopt;
var updateNotifier = require('update-notifier');

updateNotifier({ pkg }).notify();

var doc = `
usage: collider [--version] [--help] <command> [<args>...]

options:
  -h, --help  Show help information.
  --version   Show program version.

commands:
  run       Run the current project.
  new       Create a new project in the current directory.
  matter    Manage Matter libraries in the current project.
  generate  Generate skeleton Matter within the current project.
  help      Show help information.

See 'collider help <command>' for more information on a specific command.
`;

var args = docopt(doc, {
  version: `Collider CLI ${pkg.version}`,
  options_first: true,
});

var cmd  = args['<command>'];
var argv = [cmd].concat(args['<args>']);

switch(cmd) {
  case 'run':
    require('../lib/commands/run')(argv);
    break;
  case 'new':
    require('../lib/commands/new')(argv);
    break;
  default:
    console.error(`"${cmd}" is not a collider command. See 'collider --help'.`)
}

@@ -1009,16 +1009,235 @@
  break;%0A
+  case 'matter':%0A    require('../lib/commands/matter')(argv);%0A    break;%0A  case 'generate':%0A    require('../lib/commands/generate')(argv);%0A    break;%0A  case 'help':%0A    require('../lib/commands/help')(argv);%0A    break;%0A
   defaul

Add matter, generate and help commands to switch