NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #1433 most downloaded on NuGet
Command-line parsing API and utilities for console applications. Commonly used types: McMaster.Extensions.CommandLineUtils.CommandLineApplication McMaster.Extensions.CommandLineUtils.CommandOption McMaster.Extensions.CommandLineUtils.IConsole McMaster.Extensions.CommandLineUtils.Prompt McMaster.Extensions.CommandLineUtils.ArgumentEscaper A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus many enhancements.
Last release 6 months ago
05 Apr 2026
Release timing varies
gaps range from 3 weeks to 1.9 years
Nearly every release is documented
notes for 33 of 33 stable releases
4 versions withdrawn
withdrawn after publishing
127 years old
43 releases · first in 1900
@Chris-Wolfgang: Add support for keyed dependency injection via [FromKeyedServices] attribute
Changes since 5.0:
Features:
Fixes:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v510
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/5.1.0
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/5.1.0
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
Full Changelog: v5.0.1...v5.1.0
One column per quarter.
@natemcmaster: drop support for .NET Standard 2 and < .NET 6
Changes since 4.1:
Breaking changes:
Features:
Fixes:
Docs:
Other:
Updates in 5.0.1 patch:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v501
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/5.0.1
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/5.0.1
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
Full Changelog: v5.0.0...v5.0.1
@natemcmaster: drop support for .NET Standard 2 and < .NET 6
Changes since 4.1:
Breaking changes:
Features:
Fixes:
Docs:
Other:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v500
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/5.0.0
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/5.0.0
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
Full Changelog: v4.1.1...v5.0.0
fix: find dotnet.exe correctly when DOTNET_ROOT is not set (@danmoseley)
Changes since 4.0:
string[] options (@natemcmaster)See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v411
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.1.1
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/4.1.1
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
Full Changelog: v4.1.0...v4.1.1
Packages have been posted to these feeds:
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.1.0
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/4.1.0
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
string[] options by @natemcmaster in #540Full Changelog: v4.0.2...v4.1.0
string[] options@scott-xu and @natemcmaster: feature: add API for setting default value on options and arguments, and display them in help text (#389 and #420)
Changes since 3.1.0:
Features:
Fixes:
Updates in 4.0.1 patch:
Update in 4.0.2 patch:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v402
See changes in https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.0.2
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/4.0.2
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
@scott-xu and @natemcmaster: feature: add API for setting default value on options and arguments, and display them in help text (#389 and #420)
Changes since 3.1.0:
Features:
Fixes:
Updates in 4.0.1 patch:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v401
See also https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.0.1
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/4.0.1
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
@scott-xu and @natemcmaster: feature: add API for setting default value on options and arguments, and display them in help text (#389 and #420)
Features:
Fixes:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v400
See more details in https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md.
Packages have been posted to these feeds:
https://nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.0.0
https://nuget.org/packages/McMaster.Extensions.Hosting.CommandLine/4.0.0
https://github.com/natemcmaster?tab=packages&repo_name=CommandLineUtils
@scott-xu: Show allowed values in help text
Improvements:
Bug fixes:
Docs:
Other:
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/main/CHANGELOG.md#v310
AllowedValuesAttribute are used (#375)AllowedValues attribute instead of Enum values (#391)@AlexeyEvlampiev - implement support for GUID command line options (#333) and any other type that TypeConverter supports
Improvements:
Breaking changes:
See https://natemcmaster.github.io/CommandLineUtils/v3.0/upgrade-guide.html for more details.
See more details here: https://github.com/natemcmaster/CommandLineUtils/blob/master/CHANGELOG.md#v300
See https://natemcmaster.github.io/CommandLineUtils/v3.0/upgrade-guide.html for more details.
Refactor: obsolete throwOnUnexpectedArg in favor of UnrecognizedArgumentHandling. See https://github.com/natemcmaster/CommandLineUtils/issues/339 for
Fix [#320] - lazy load command object types to reduce unnecessary allocations
Fix [#92] by [@kbilsted] - Show enum names in help text for Options and Arguments stored as enum
Fix [#302] - fix regression introduced in 2.4.2 which caused Ctrl+C handling not to terminate the process quickly
Fix [#292] by [@thomaslevesque] - fix deadlock when Environment.Exit is called
Environment.Exit is calledFix [#286] - fix deadlock in CTRL+C handling on Windows
Fix [#277] - workaround a bug in NuGet's 'deterministic packaging' feature which causes issues based on your timezone
Fix [#227] by [@ejball] - ArgumentEscaper should escape empty string
CommandLineApplication.ExecuteAsync actually asynchronousFix [#218]: Handle options with multiple characters in the short option name when only specified in a subcommand
[@mpipo]: add an API to disable the pager for help text (CommandLineApplication.UsePagerForHelpText) ([#216])
Enhancements:
Fix [#211] by [@rlvandaveer]: honor attributes on classes which implement ValidationAttribute
Fix [#203] - fix InvalidOperationException thrown during help text generation on Mono
Bugs fixed:
PR [#192] by [@TheConstructor]: Add IUnhandledExceptionHandler
Fix [#86] by [@handcraftedsource]: handled nested HelpOptions. Fixes InvalidOperationException when multiple help options were defined.([#158])
Bugs fixed:
Enhancements:
UnrecognizedCommandParsingException which includes suggestions for similar options or
commands. (#164)bool[]. (#143)MissingParameterlessConstructorException that includes the type causing the exception in the message. ([#148])ValueParser.Create which makes it easier to create implementations of IValueParser
(#169)Other notes:
Thanks to [@lucastheisen] for writing a new package, McMaster.Extensions.Hosting.CommandLine (#167). This new package provides integration with ASP.NET Core's "Generic Host" feature..
Support the POSIX convention for cluster multiple options. For example, -ixd is treated the same as -i -x -d. Resolved [#93].
Enhancements:
Support the POSIX convention for cluster multiple options. For example, -ixd is treated the same as -i -x -d.
Resolved #93.
[@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
[Subcommand(typeof(AddCommand))]
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:
.IsRequired() for
CommandOption<T> and CommandArgument<T>.Details:
Clustering options: I've added this behavior as the new default, but only if I think it won't interfere with existing apps.
If it causes issues or you don't like clustering, you can disable this by setting
CommandLineApplication.ClusterOptions = false.
To preserve compatibility with existing apps, this behavior is off if you have configured options with short names with
multiple characters. In a future version, this will cause an error unless you set ClusterOptions = false.
Pager: this is the new default for showing help text. The pager should have graceful fallback to regular stdout
when there are issues launching less, or when stdout is redirected into a pipe.
[@bording] and [@SeanFeldman]: Unable to create new instance of CommandOption for type that is already registered
July 1, 2018
Bug fixes:
CommandOption<T> for type that is already registeredMinor improvements:
[@liamdawson]: support parsing System.Uri
May 24, 2018
Bug fixes:
System.UriDotNetExe.FullPath to honor the DOTNET_ROOT environment variable as a fallbackMake it easier to override the version text shown when --version is specified.
May 10, 2018
Minor improvements:
--version is specified.Add conventions from attributes that implement IConvention and IMemberConvention
April 28, 2018
Minor improvement:
Don't assign option and argument options if no value was provided, preserving the default CLR value unless there is user-input.
April 10, 2018
Bug fixes:
Minor improvements:
protected virtual API to DefaultHelpTextGenerator to make it easier to customize help textAdded support for command validators using CommandLineApplication.Validators and added a new OnValidate convention
March 30, 2018
CommandLineApplication.Validators and added a new OnValidate conventionArgumentEscaper where some strings were not properly escaped[@atruskie]: Added support for user-defined value parsers using IValueParser and CommandLineApplication.ValueParsers.
March 23, 2018
New API:
IValueParser and CommandLineApplication.ValueParsers.Option<T> and Argument<T>IValidationBuilder<T>.Accepts().Range(min, max) for int and double type arguments and optionsEnhancements:
Removed:
Tuple<bool,T> to CommandOptionType.SingleOrNoValue.
ValueTuple<bool,T> is still present.Add CommandOptionType.SingleOrNoValue. Options of this type can be a switch, or have a value but only in the form --param:value or --param=value.
March 7, 2018
New features:
CommandOptionType.SingleOrNoValue. Options of this type can be a switch, or have a value but only in the form --param:value or --param=value.Tuple<bool,T> and ValueTuple<bool,T> to CommandOptionType.SingleOrNoValueCommandLineApplication<TModel>. This allows associating an application with a specific .NET typeAdded more validation attributes.
Feb. 15, 2018
New features:
[FileExists] attribute[FileOrDirectoryExists] attribute[DirectoryExists] attribute[LegalFilePath] attribute[AllowedValues] attributeOption().Accepts() and Argument().Accepts().ExistingFile().ExistingFileOrDirectory().ExistingDirectory().EmailAddress().LegalFilePath().MinLength(length).MaxLength(length).RegularExpression(pattern).Values(string[] allowedValues)API improvements:
HelpOption can be set to be inherited by all subcommandsVersionOptionFromMember to use a property or method as the source of version informationDo not show validation error messages when --help or --version are specified
Dec. 27, 2017
Bug fixes:
OptionAttribute.ShortName is overridenAttributes. Simplify command line argument definitions by adding attributes to a class that represents options and arguments.
Dec. 12, 2017
New features:
[Option] or [Argument], [Subcommand].[Command] and [Subcmomand].[HelpOption] and [VersionOption].[Required] and any other ValidationAttribute to validate input on options and arguments.CommandOption.IsRequired() and CommandArgument.IsRequired().New API
Prompt.GetSecureStringPrompt.GetYesNo, Prompt.GetPassword, and more. Added API for interactively getting responses on the console.OptionAttribute, ArgumentAttribute, CommandAttribute, SubcommandAttribute, HelpOptionAttribute, and VersionOptionAttribute.CommandLineApplication.Execute<TApp>() - executes an app where TApp uses attributes to define its optionsCommandLineApplication.ExecuteAsync<TApp>() - sample thing, but async.CommandLineApplication.ResponseFileHandling - the parser can treat arguments that begin with '@' as response files.
Response files contain arguments that will be treated as if they were passed on command line.CommandLineApplication.VersionOptionFromAssemblyAttributes and .VerboseOption extension methodsMinor bug fixes:
.VerboseOption() and ensure .HasValue() is true when HelpOption or VerboseOption are matchedDotNetExe.FullPath might return the wrong location of the dotnet.exe fileOther:
Nothing published for this version
Nothing published for this version
Nothing published for this version
[@couven92] - Add support for .NET Standard 1.6
Oct. 31, 2017
Initial version of this library.
Sep. 16, 2017
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →