#!/usr/bin/env node
const program = require('commander')
const chalk = require('chalk')

program
  .description('A utility to build, publish and install sketch plugins')
  .command('init', 'scaffold a new plugin')
  .command('build [options]', 'compile the javascript files into cocoascript')
  .command('publish [options] <bump>', 'publish a new version of the plugin')
  .command('search <query>', 'search for plugins')
  .command('install [options] <name>', 'install a new plugin')
  .command('uninstall [options] <name>', 'uninstall a plugin')
  .command('link <path>', 'symlink a local plugin for development')
  .command('log', 'show the Sketch.app logs')
  .command('login <token>', 'login to github using an access token')
  .command('logout', 'delete the access token')
  .parse(process.argv)

if (!program.runningCommand) {
  console.log(`${chalk.red('error')} Unknown command ${program.args[0]}`)
  program.help()
}

@@ -368,185 +368,8 @@
 n')%0A
-  .command('search %3Cquery%3E', 'search for plugins')%0A  .command('install %5Boptions%5D %3Cname%3E', 'install a new plugin')%0A  .command('uninstall %5Boptions%5D %3Cname%3E', 'uninstall a plugin')%0A
   .c

remove search, install, and uninstall commands