{"name":"cli-commands","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.4.0","description":"A convention for building command-driven CLI apps","repository":{"type":"git","url":"git+https://github.com/75lb/cli-commands.git"},"license":"MIT","keywords":["command-line-commands","command-line","command","commands","argv","parse","option","parser"],"engines":{"node":">=4.0.0"},"scripts":{"test":"test-runner test.js","docs":"jsdoc2md -t README.hbs index.js > README.md; echo"},"dependencies":{"command-line-args":"^5.0.2","command-line-commands":"^2.0.1"},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","test-runner":"^0.5.0"},"gitHead":"02a9915ce2b78a8542f536f953c7954c05e9d457","bugs":{"url":"https://github.com/75lb/cli-commands/issues"},"homepage":"https://github.com/75lb/cli-commands#readme","_id":"cli-commands@0.4.0","_npmVersion":"5.8.0","_nodeVersion":"9.11.1","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"integrity":"sha512-zAvJlR7roeMgpUIhMDYATYL90vz+9ffuyPr0+qq4LzcZ0Jq+gM+H1KdYKxerc6U2nhitiDEx79YiJlXdrooEOA==","shasum":"75b79bba16733267b71c60def2dd76f3a07cda8a","tarball":"http://registry-npm.ywwl.com/cli-commands/download/cli-commands-0.4.0.tgz","fileCount":7,"unpackedSize":7946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHo7Qw0nEAglDU5OMexuV95qwL5GtrCsb8VCKHbNuJoaAiBZ+dD5AEzyU5qQhOLs46aQuo4dgYoOuk1OUmoALFlvyA=="}],"size":2637,"noattachment":false,"key":"/cli-commands/-/cli-commands-0.4.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-commands_0.4.0_1523441318021_0.6512320203926283"},"_hasShrinkwrap":false,"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":1523441318103,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1523441318103,"dist-tags":{"latest":"0.4.0"}}