New library: argparse, for parsing CLI arguments

Mathias LANG geod24 at gmail.com
Tue Oct 19 03:49:46 UTC 2021


On Wednesday, 13 October 2021 at 11:27:40 UTC, Andrey Zherikov 
wrote:
> Hi everyone,
>
> I'm happy to announce that I've published a CLI argument 
> parsing library - 
> [argparse](https://code.dlang.org/packages/argparse). It's been 
> around for some time already so please take a look and provide 
> your feedback if you haven't done so.
>
> The reasoning to create one more CLI parsing library is that 
> the existing libraries do not provide enough flexibility in 
> parsing that I'm looking for and/or they depend on other 
> libraries. As a result `argparse` supports wide variety of data 
> types including enums, callbacks and arrays as well as a fully 
> customized argument parsing. It also doesn't depend on anything 
> besides the standard library.
>
> Since it's in active development (activeness depends on my 
> availability of course), I have few things to do before making 
> the first major release so stay tuned and/or contribute if 
> you'd like to.

Very interesting! I was looking for something similar recently, 
will definitely give it a try! One thing that it'd be interested 
to see would be subcommand support. Check what DUB is doing for 
example.


More information about the Digitalmars-d-announce mailing list