vadimdemedes / ronin

Toolkit for killer CLI applications
http://vdemedes.github.io/ronin
MIT License
299 stars 15 forks source link

Add optional desc property for options #26

Closed fnky closed 8 years ago

fnky commented 8 years ago

It would be nice to be able to add descriptions to options using an optional desc property.

options: {
  port: {
    type: 'number',
    default: 8080,
    desc: 'use port for something'
  },
  force: {
    type: 'boolean',
    alias: 'f',
    desc: 'force some behavior'
  }
}

Would generate this help message on app command -h

Usage: app command [OPTIONS]

  Doing some command

Options:
  --port <port>  use port for something (default: 8080)
  -f, --force    force some behavior  
vadimdemedes commented 8 years ago

I am working on the next version of Ronin in the next branch. This feature is already implemented there, so try installing that branch, instead of version on the npm.