https://github.com/hypercubed/generator-commander
A commander-cli generator for Yeoman
https://github.com/hypercubed/generator-commander
Last synced: 11 months ago
JSON representation
A commander-cli generator for Yeoman
- Host: GitHub
- URL: https://github.com/hypercubed/generator-commander
- Owner: Hypercubed
- License: mit
- Created: 2013-09-02T12:47:26.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-11-23T13:32:06.000Z (over 10 years ago)
- Last Synced: 2025-07-03T23:36:38.988Z (about 1 year ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generator-commander [](https://travis-ci.org/Hypercubed/generator-commander) [](http://badge.fury.io/js/generator-commander)
A CLI generator for [Yeoman](http://yeoman.io).
This generator will create a [Commander.js](https://github.com/visionmedia/commander.js) based command line application using [yo](https://github.com/yeoman/yo) with options to include [autocmdr](https://github.com/Hypercubed/autocmdr) components.
## Installation
Install Yeoman if you haven't done so already.
$ npm install -g yo
To install generator-commander:
$ npm install -g generator-commander
## Usage
At the command-line, `cd` into an empty directory, run this command and initiate the app generator:
$ yo commander
This will generate files in the current working directory for a [Commander.js](https://github.com/visionmedia/commander.js) based application.
To create a commander.js command-component initiate the command generator:
$ yo commander:command
This will create a new file in `cmds/` directory of the current working directory. This file can be included in your application by adding
require('../cmds/.js')(program);
to your application in the `bin` directory; or optionally install the `autocmdr` components for auto-loading `cmds`.
## [autocmdr](https://github.com/Hypercubed/autocmdr) and generator-commander
[autocmdr](https://github.com/Hypercubed/autocmdr) and generator-commander are brothers. autcmdr is a command line tool for running commands (commands in a commander.js command-component) and a set of libraries for enhancing command line applications. generator-commander is a tool for scaffolding commander.js command-components and command line applications.
Calling `autocmdr` from a shell will load commands located in the current working directory's `cmds/` folder. New commands can be added to any directory by invoking `yo commander:command `. When running `yo commander` you are given the option of including autocmdr components in your application. See the autocmdr [readme](https://github.com/Hypercubed/autocmdr/blob/master/Readme.md) for a complete workflow and explanation of the available components.
## What is Yeoman?
If you'd like to get to know Yeoman better and meet some of his friends, [Grunt](http://gruntjs.com) and [Bower](http://bower.io), check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
Copyright (c) 2013 J. Harshbarger
[](https://www.gittip.com/hypercubed/ "Donate weekly to this project using Gittip")
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7KYR6T9U2NHC "One time donation to this project using Paypal")