Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x-commander

Extended version of commander.js

Installation

npm install x-commander

Usage

const { program } = require('x-commander');

// defaults
program.configureHelp({
    labels: {
        usage: 'Usage:',
        description: undefined,
        arguments: 'Arguments:',
        options: 'Options:',
        commands: 'Commands:',
    },
    styles: {
        label: str => str,
        usage: str => str,
        description: str => str,
        term: str => str,
        termDescription: str => str,
    },
    formatParams: {
        newLineUsage: false,
        indentDescription: false,
        baseIndentWidth: 0,
        itemIndentWidth: 2,
        itemSeparatorWidth: 2,
        minColumnWidthForWrap: 40,
    },
    formatHelp(cmd, helper) {
        return helper.renderHelpTemplate(cmd, helper);
    }
});

License

MIT

About

node.js command-line interfaces made easy

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages