argparse4j is a free, open source, command line argument parser library based on Python's argparse.
argparse4j is developed in the Java programming language and can be run on Mac OS X, Windows and Linux.
Here are some key features of "argparse4j":
· Supported positional arguments and optional arguments.
· Variable number of arguments.
· Generates well formatted line-wrapped help message.
· Suggests optional arguments/sub-command if unrecognized arguments/sub-command were given, e.g. "unrecognized argument '--tpye': Did you mean: --type".
· Takes into account East Asian Width ambiguous characters when line-wrap.
· Sub-commands like, git add.
· Customizable option prefix characters, e.g. '+f' and '/h'.
· Print default values in help message.
· Choice from given collection of values.
· Type conversion from option strings.
· Can directly assign values into user defined classes using annotation.
· Group arguments so that it will be printed in help message in more readable way.
· Read additional arguments from file.
Requirements:
· Java
What's New in This Release: [ read full changelog ]
· Show command aliases in help message
· Avoid \n and use %n or TextHelper.LINESEP instead
· Add CountArgumentAction
· CountArgumentAction counts the number of occurrence of an option. Arguments.count() returns the instance of this object for shortcut.
· Support ${prog} substitution in version string
· Add ArgumentParser.usage()
· By default, the program usage is generated from the arguments the ArgumentParser object contains. This method overrides it.
· Add ArgumentParser.addMutuallyExclusiveGroup() without title arg
· If both title and description are empty, the help message for the group is merged into other optional arguments.