The argparse4j is a command line argument parser library for Java based on Python's argparse.
Features
- Customizable option prefix characters, e.g. '--foo', '+f' and '/h'.
- Supported positional arguments and optional arguments.
- Variable number of arguments.
- Generates well formatted line-wrapped help message.
- Takes into account East Asian Width ambiguous characters when line-wrap.
- Sub-commands like, git add.
- 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
- Print candidates for unrecognized flags/commands.
License
MIT LicenseFollow argparse4j
Other Useful Business Software
One Monitoring Tool for IT, OT and Cloud | Free Trial
Modern infrastructure spans data centers, cloud platforms and factory floors, and every blind spot between them is a risk. PRTG supports SNMP, WMI, SSH and other standard protocols to monitor IT, OT and hybrid environments through one customizable dashboard. Build the views your team needs, from network health to application performance, without switching tools. Try PRTG free for 30 days now.
Rate This Project
Login To Rate This Project
User Reviews
-
5 out of 5 starsSimply awesome! I tried out several argument parsing libraries before I found argparse4j. It is just so much more elegant and easy to use. I will never use anything else for Java again.
-
5 out of 5 starsFantastic. Very good use of dynamic features of Java. Method chaining is also a great solution to Java's lack of kwargs. One improvement that would be nice, though, is the ability to specify multiple types in the .Type() method in the same way it can be done in the .setDefault() method. Not crucial by any means, but would make some tasks easier.