shellify

Created: 2014-05-19 14:40
Updated: 2014-09-06 16:12
License: mit

README.md

Shellify

NPM Version Downloads Build Status Code Coverage Dependencies Support

Shellify is a module for creating command-line interfaces.

Example

var shellify = require('shellify');

shellify({
  commands: {
    init: {
      note: 'Creates a new package using the Seattle Pub.js Standard',
      options: {
        name: '!Project name (can contain uppercase)',
        author: '!Author name and email|Sam Eubank<sameubank@gmail.com>',
        description: '!Package description'
      },
      alias: 'c'
    },
    space: {
      note: 'Converts tabs to 2 spaces and ensures standard line endings',
      alias: 's'
    },
    version: {
      note: 'Increments the major, minor or patch version by one',
      options: {
        number: '?Major, minor or patch|patch'
      },
      alias: 'v'
    },
    publish: {
      note: 'Publishes from the current working directory',
      alias: 'p'
    }
  }
});

API

shellify(options)

Shellify exports itself as a function, seen in the example above.

shellify.logger

The Cedar console logger used by shellify, complete with symbols and colors.

shellify.base

A string that turns your terminal text back to its default color.

shellify.(red|yellow|green|cyan|blue|magenta|grey)

A string that turns your terminal text red/yellow/green/cyan/blue/magenta/grey.

shellify.mkdirp

A reference to a copy of substack's mkdirp module, allowing the same functionality as mkdir -p.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more