McMaster.Extensions.CommandLineUtils 2.3.0

Command-line parsing API and utilities for console applications.

Commonly used types:


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

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
dotnet add package McMaster.Extensions.CommandLineUtils --version 2.3.0
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.3.0" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

## Enhancements:

* 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.
* Obsolete the constructor of `[Subcommand]` which takes a string.
* Infer subcommand names from the type name
* @lvermeulen: Sort subcommands by name in help text. This can be disabled with `DefaultHelpTextGenerator.SortCommandsByName`.
* @jcaillon: Add API for `UnrecognizedCommandParsingException` which includes suggestions for similar options or commands.
* @TheConstructor: add CommandLineApplication.GetValidationResult()

## 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>`.
* @handcraftedsource: handled nested HelpOptions (fixes #86 - InvalidOperationException when multiple help options were defined)

See more details here:

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

Repository Stars
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
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.
ACID Document Database
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.
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at or our versioned developer docs at
Cross platform code coverage for .NET

Read more about the GitHub Usage information on our documentation.

Version History

Version Downloads Last updated
2.5.0 7,555 1/2/2020
2.4.4 25,405 11/11/2019
2.4.3 12,843 11/1/2019
2.4.2 41,171 9/24/2019
2.4.1 7,991 9/18/2019
2.4.0 3,857 9/14/2019
2.3.4 212,662 4/11/2019
2.3.3 58,676 3/11/2019
2.3.2 78,930 2/5/2019
2.3.1 21,959 1/19/2019
2.3.0 66,153 1/1/2019
2.2.5 268,093 7/2/2018
2.2.4 47,636 5/25/2018
2.2.3 19,789 5/11/2018
2.2.2 31,781 4/28/2018
2.2.1 10,726 4/11/2018
2.2.0 134,420 3/31/2018
2.2.0-rc 886 3/23/2018
2.2.0-beta 630 3/8/2018
2.2.0-alpha 602 2/20/2018
2.1.1 66,901 12/28/2017
2.1.0 2,298 12/13/2017
2.1.0-rc 580 12/7/2017
2.1.0-beta 1,528 11/22/2017
2.1.0-alpha 482 11/11/2017
2.0.1 5,877 10/13/2017
2.0.0 5,046 9/16/2017
Show less