McMaster.Extensions.CommandLineUtils 2.3.0-alpha

Command-line parsing API and utilities for console applications.

Commonly used types:


A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus many enhancements.

This is a prerelease version of McMaster.Extensions.CommandLineUtils.
There is a newer version of this package available.
See the version list below for details.
Install-Package McMaster.Extensions.CommandLineUtils -Version 2.3.0-alpha
dotnet add package McMaster.Extensions.CommandLineUtils --version 2.3.0-alpha
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.3.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add McMaster.Extensions.CommandLineUtils --version 2.3.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes


* Support the POSIX convention for cluster multiple options. For example, `-ixd` is treated the same as `-i -x -d`.

* @bjorg: support SingleOrNoValue notation. `--option[:value]`

* New type: `Pager`. Provides a simple interaction model for displaying console output in a pager.

* Display help text using the `less` pager on macOS/Linux.

* Make suggestions when invalid options or commands are used, but there is a valid one that is similar.
 (Thanks to @MadbHatter for doing the initial work on this.)

* Add support for subcommand aliases. Commands can be given multiple names.
 [Command("organization", "org", "o")]
 public class OrgCommand { }

* Obsolete the constructor of `[Subcommand]` which takes a string.

* Infer subcommand names from the type name
 public class Git { }

 public class AddCommand { } // subcommand name = "add"

* @lvermeulen: Sort subcommands by name in help text. This can be disabled with `DefaultHelpTextGenerator.SortCommandsByName`.

Bugs fixed:

* Duplicate subcommand names used to cause undefined behavior. Now, attempting to add a duplicate subcommand name or aliases will
 cause the library to throw before the app can execute.

* Fix bug in subcommand name inference. When not specified, the subcommand always matched the entry assembly name.
 In this update, this convention only applies to the parent command.

* Add generic overloads of `.IsRequired()` for `CommandOption<T>` and `CommandArgument<T>`.

See more details here:

Showing the top 10 GitHub repositories that depend on McMaster.Extensions.CommandLineUtils:

Repository Stars
.NET Decompiler
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
Powerful .NET library for benchmarking
xunit/xunit is a free, open source, community-focused unit testing tool for the .NET Framework.
Write C# apps with a text editor, nuget and the power of Roslyn!
Fluent migrations framework for .NET
CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
Cross platform code coverage for .NET
Run C# scripts from the .NET CLI.
Command line parsing and utilities for .NET Core and .NET Framework.

Version History

Version Downloads Last updated
2.4.0-alpha.70 95 6/20/2019
2.3.4 44,958 4/11/2019
2.3.3 31,236 3/11/2019
2.3.2 50,638 2/5/2019
2.3.1 13,231 1/19/2019
2.3.0 42,235 1/1/2019
2.3.0-rc.460 253 12/15/2018
2.3.0-beta 715 12/4/2018
2.3.0-alpha 1,890 10/3/2018
2.2.5 201,257 7/2/2018
2.2.4 37,161 5/25/2018
2.2.3 18,268 5/11/2018
2.2.2 16,907 4/28/2018
2.2.1 9,301 4/11/2018
2.2.0 100,258 3/31/2018
2.2.0-rc 802 3/23/2018
2.2.0-beta 538 3/8/2018
2.2.0-alpha 510 2/20/2018
2.1.1 50,042 12/28/2017
2.1.0 1,749 12/13/2017
2.1.0-rc 489 12/7/2017
2.1.0-beta 1,374 11/22/2017
2.1.0-alpha 393 11/11/2017
2.0.1 5,671 10/13/2017
2.0.0 4,153 9/16/2017
Show less