Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cmdln

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmdln - npm Package Versions

1245

3.4.0

Diff

Changelog

Source

3.4.0

  • [pull #10] Add the {{cmd}} template var for subcommand help text (by Dave Eddy).
trentm
published 3.3.0 •

Changelog

Source

3.3.0

  • <MyCLI instance>.bashCompletion() will generate bash completions for the MyCLI tool. You can add, e.g., a 'completion(s)' command to your CLI for users to run. Or you could generate completions and distribute those with your tool.

    See "examples/conan.js" for example usage.

      $ alias conan="node examples/conan.js"
      $ conan completion > conan.completion
      $ source conan.completion
      $ conan <TAB>
      --help      --version   -v          completion  hear        see
      --verbose   -h          -x          crush       help        smash
    

    Bash completion support is mostly by <github.com/bahamas10>.

trentm
published 3.2.4 •

Changelog

Source

3.2.4

  • Add support for MyCLI.prototype.do_frob.allowUnknownOptions = true. Instead of raising a usage error, unknown options to that subcommand will be passed through in args.
trentm
published 3.2.3 •

Changelog

Source

3.2.3

  • Add support for MyCLI.prototype.do_frob.interspersedOptions = false to disable interspersed options (i.e. options after the first argument) to a given command. By default cmdln allows interspersed options for subcommands (using the node-dashdash default).
trentm
published 3.2.2 •

Changelog

Source

3.2.2

  • Don't error with:

      Error: "helpSubcmds" error: unmatched command handlers found: foo, bar
    

    if the "foo" and "bar" commands are hidden (via do_foo.hidden = true).

trentm
published 3.2.1 •

Changelog

Source

3.2.1

  • [issue #8] Fix error class name in stack traces in node 0.12 and later.
trentm
published 3.2.0 •

Changelog

Source

3.2.0

  • [pull #7] Support for hidden command aliases to allow renaming a command while preserving the old name (though not documenting it).

      MyCLI.prototype.do_frob.hiddenAliases = ['ye-old-frob'];
      MyCLI.prototype.do_frob.aliases = ['fr'];
    

    By Dave Pacheco.

trentm
published 3.1.0 •

Changelog

Source

3.1.0

  • [issue #5] Add helpSubcmds constructor option to allow control over the output of the "Commands:" section of top-level help. For example, this code:

      helpSubcmds: [
          'help',
          { group: '' },
          'in-empty-group',
          { group: 'Most Excellent Commands' },
          'awesome',
          { group: 'Other Commands', unmatched: true }
      ]
    

    yields help output something like:

      ...
      Commands:
          help (?)        Help on a specific sub-command.
    
          in-empty-group  Do in-empty-group things.
    
        Most Excellent Commands:
          awesome         Do awesome things.
    
        Other Commands:
          something-else  Do something-else things.
    

    By Josh Clulow.

  • [issue #4] Add Cmdln.prototype.helpFromSubcmd(subcmd) to get the help string for the given subcommand. This can be useful for tools that want to emit usage information as part of a usage error. E.g.:

      MyCLI.prototype.do_frob = do_frob(subcmd, opts, args, cb) {
          if (!opts.frobber) {
              return callback(new Error('you forgot the frobber\n' +
                  this.helpFromSubcmd(subcmd)));
          }
          // ...
      };
    
trentm
published 3.0.2 •

Changelog

Source

3.0.2

  • Change to use '^' semver ranges for dependencies. This allows for better de-duping under "node_modules" for apps using this package.
trentm
published 3.0.1 •

Changelog

Source

3.0.1

  • Allow one to override how option help is formatted for a subcmd by setting CLI.prototype.do_<subcmd>.helpOpts = <dashdash helpOpts object>;. See supported helpOpts in the dashdash help config docs.

  • Update to latest dashdash (1.7.1).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc