Skip to content

yakovypg/NetArgumentParser

Repository files navigation

NetArgumentParser

netargumentparser

license version csharp

About

NetArgumentParser is a cross-platform, free, 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.

NuGet Badge Contributors Build Status

Table of contents

Main Features

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.
  • Generation of argument parser using attributes.

Many other features with examples you can find in documentation.

Quick Start

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.

Build From Source

To build the library, run the following command from the project root.

dotnet build

Run Tests

To test the library, run the following command from the project root.

dotnet test

Connect Project

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.

Documentation

You can read our documentation in the DOCUMENTATION.md.

Contributing

Contributions are welcome, have a look at the CONTRIBUTING.md document for more information.

License

The project is available under the GPLv3 license.