cmdr

command line apps made easy

npm install cmdr
8 downloads in the last month

node-cmdr

command line router

NPM

Overview

Like dancer/sinatra/berliner, but for commandline interfaces:

require('cmdr')

  "say ([a-z]+) (\\d+) times?": (msg, times) ->
    for i in [0...times]
      console.log msg

  "buy something (cool|fancy) for \\w+": (adj, target) ->
    console.log "okay I'll find something #{adj} for #{target}"

  "help": (cmd) ->
    console.log "sorry, command #{cmd} is not recognized.\nValid commands are: ..."

Then use it:

$ myprogram say hello 4 times
hello
hello
hello
hello

Problem solved.

Licensing

BSD (see LICENCE.txt for details)

```

npm loves you