The complete solution for node.js command-line interfaces. Commander exports a global object which is convenient for quick programs. For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use. Each option can have a short flag (single character) and a long name, separated by a comma or space or vertical bar ('|'). Multiple short flags may optionally be combined in a single argument following the dash: boolean flags, followed by a single option taking a value (possibly followed by the value). You may specify a function to do custom processing of option-arguments. The callback function receives two parameters, the user specified option-argument and the previous value for the option. It returns the new value for the option. This allows you to coerce the option-argument to the desired type, or accumulate values, or do entirely custom processing.

Features

  • Simplifies node.js command-line interfaces
  • Stand-alone executable (sub)commands
  • The help information is auto-generated based on the information commander already knows about your program
  • You can add extra text to be displayed along with the built-in help
  • Make lists of arguments, options, and subcommands visible
  • Legacy options as properties

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Commander.js

Commander.js Web Site

Other Useful Business Software
Zenflow- The AI Workflow Engine for Software Devs Icon
Zenflow- The AI Workflow Engine for Software Devs

Parallel agents. Multi-agent orchestration. Specs that turn into shipped code. Zenflow automates planning, coding, testing, and verification.

Zenflow is the AI workflow engine built for real teams. Parallel agents plan, code, test, and verify in one workflow. With spec-driven development and deep context, Zenflow turns requirements into production-ready output so teams ship faster and stay in flow.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Commander.js!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript User Interface (UI) Software, JavaScript Source Code Analysis Tool

Registered

2021-02-23