{"name":"cli-commands","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.3.0","description":"cli-commands","repository":{"type":"git","url":"git+https://github.com/75lb/cli-commands.git"},"license":"MIT","main":"cli-commands.js","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 cli-commands.js > README.md; echo"},"dependencies":{"command-line-args":"^4.0.6","command-line-commands":"^2.0.0"},"devDependencies":{"jsdoc-to-markdown":"^3.0.0","test-runner":"^0.3.0"},"gitHead":"da7900dd991b906327b4a0339bf42f95df091517","bugs":{"url":"https://github.com/75lb/cli-commands/issues"},"homepage":"https://github.com/75lb/cli-commands#readme","_id":"cli-commands@0.3.0","_npmVersion":"5.0.2","_nodeVersion":"8.0.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"integrity":"sha512-9inNJFL2C6AHzFkfJqkATdOylwb3+e/dleE1RJx47QdWXA2Y97/kngCzZpIig2ANPwaWzPD63qhtMwKKmeBmZA==","shasum":"fb92e5a286fe9cf3c86d4eb558e6f5a54ecaef46","tarball":"http://registry-npm.ywwl.com/cli-commands/download/cli-commands-0.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUdC0KSbUgjUiKFz10bN6QRjUbPVBW8XZAWvNSWEKsWgIgZtw+tKFJjCgvtjXlbYQmayjoQi4HVmHZhmCGA+tjlKA="}],"size":2686,"noattachment":false,"key":"/cli-commands/-/cli-commands-0.3.0.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cli-commands-0.3.0.tgz_1496779003119_0.2290594121441245"},"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":1496779004059,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1496779004059,"dist-tags":{"latest":"0.4.0"}}