{"name":"cli-commands","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.2.1","description":"cli-commands","repository":{"type":"git","url":"git+https://github.com/75lb/cli-commands.git"},"license":"MIT","main":"./lib/cli-commands.js","keywords":[],"engines":{"node":">=4.0.0"},"scripts":{"test":"test-runner test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo"},"dependencies":{"ansi-escape-sequences":"^3.0.0","command-line-args":"^3.0.5","command-line-commands":"^2.0.0","command-line-usage":"^4.0.0"},"gitHead":"c86dbabf8954ca43156e1f7279e06c8536092cf0","bugs":{"url":"https://github.com/75lb/cli-commands/issues"},"homepage":"https://github.com/75lb/cli-commands#readme","_id":"cli-commands@0.2.1","_shasum":"70f5a38c6661635b611577f674e6d0d0d8d0356b","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"shasum":"70f5a38c6661635b611577f674e6d0d0d8d0356b","tarball":"http://registry-npm.ywwl.com/cli-commands/download/cli-commands-0.2.1.tgz","integrity":"sha512-lrZiP7xZ0v+ciTTUDlpkI4beabc8w6+XBX0i1/AQui5EZZvnbvzzNnmULd2b18LDriYxRS1dQ3zaH8YDSxrNXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFEht3Jja0ZSkMXrxEtcTd4FcDl1M1idtVxAraMpPR4gIgBU3mr9StFl6i3YFfrOrbz7GKRaXNEApQ5+W5ykoWczM="}],"size":2626,"noattachment":false,"key":"/cli-commands/-/cli-commands-0.2.1.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/cli-commands-0.2.1.tgz_1488795170576_0.6592849376611412"},"directories":{},"readme":"[![view on npm](https://img.shields.io/npm/v/cli-commands.svg)](https://www.npmjs.org/package/cli-commands)\n[![npm module downloads](https://img.shields.io/npm/dt/cli-commands.svg)](https://www.npmjs.org/package/cli-commands)\n[![Build Status](https://travis-ci.org/75lb/cli-commands.svg?branch=master)](https://travis-ci.org/75lb/cli-commands)\n[![Dependency Status](https://david-dm.org/75lb/cli-commands.svg)](https://david-dm.org/75lb/cli-commands)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# cli-commands\n\nA convention for building command-driven CLI apps.\n\n## Synopsis\n\n```js\nconst CliCommands = require('cli-commands')\n\nconst validCommands = [\n  { name: null },\n  { name: 'show', command: require('./command/show').create() },\n  { name: 'serve', command: require('./command/serve').create() },\n  { name: 'help', command: require('./command/help').create() }\n]\n\nconst cliCommands = new CliCommands(validCommands)\n```\n\nWhere each command looks something like this:\n\n```js\nclass ShowCommand {\n  optionDefinitions () {\n    /* command has a --help option */\n    return [\n      { name: 'help', type: Boolean, alias: 'h' }\n    ]\n  }\n  description () { return 'Print some information.' }\n  usage () {\n    return [\n      { header: 'Options', optionList: this.optionDefinitions() }\n    ]\n  }\n  cliView (data) {\n    return JSON.stringify(data, null, '  ')\n  }\n  execute (options) {\n    // do something sync or async\n  }\n  static create () {\n    return new this(...arguments)\n  }\n}\n```\n\n# API Reference\n\n<a name=\"module_cli-commands\"></a>\n\n## cli-commands\n<a name=\"exp_module_cli-commands--Commands\"></a>\n\n### Commands ⏏\n**Kind**: Exported class  \n\n* * *\n\n&copy; 2016-18 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1488795172470,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1488795172470,"dist-tags":{"latest":"0.4.0"}}