Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including generator-commander with all npm packages installed. Try it out:

require("yo/package.json"); // yo is a peer dependency. var generatorCommander = require("generator-commander")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

generator-commander v0.0.11

A commander-cli generator for Yeoman

generator-commander Build Status NPM version

A CLI generator for Yeoman.

This generator will create a Commander.js based command line application using yo with options to include autocmdr components.


Install Yeoman if you haven't done so already.

$ npm install -g yo

To install generator-commander:

$ npm install -g generator-commander


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 based application.

To create a commander.js command-component initiate the command generator:

$ yo commander:command <name>

This will create a new file in cmds/ directory of the current working directory. This file can be included in your application by adding


to your application in the bin directory; or optionally install the autocmdr components for auto-loading cmds.

autocmdr and generator-commander

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 <name>. When running yo commander you are given the option of including autocmdr components in your application. See the autocmdr readme 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 and Bower, check out the complete Getting Started Guide.


MIT License

Copyright (c) 2013 J. Harshbarger Gittip donate button Paypal donate button

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free