NetArgumentParser is a cross-platform, free and open source library for parsing command-line options, arguments and subcommands. This library contains the main features of popular argument parsers such as argparse
, as well as many of its own.
NetArgumentParser supports many frameworks, so you can use it in most of your projects. Moreover, you can find clear examples of using this library here.
This library supports the following main features:
- Parse short-named options (such as
-v
). - Parse long-named options (such as
--version
or-version
). - Parse windows-based options (such as
/v
or/version
). - Parse compound options (such as
-lah
). - Parse nested subcommands (such as
app subcommand subsubcommand
). - Extract extra arguments.
- Provide a lot of default option types.
- Support custom options and converters.
- Configure command-line help generation and output stream.
Many other features with examples you can find in documentation.
To start working with the library you need to connect it to your project. If you are going to connect a library cloned from a repository, you may want to build and test it before doing so.
You can build the library with the following command, which should be run from the root of the library project.
dotnet build
You can test the library with the following command, which should be run from the root of the library project.
dotnet test
The easiest way to get started with the NetArgumentParser is to include the project package via the NuGet package manager. Another way is to clone the repository and then connect it. You can find instructions for connecting NetArgumentParser to your project here.
You can read our documentation in the DOCUMENTATION.md.
Contributions are welcome, have a look at the CONTRIBUTING.md document for more information.
The project is available under the GPLv3 license.