McMaster.Extensions.CommandLineUtils 2.1.0-beta
Command-line parsing API. A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus extras.
Commonly used types:
McMaster.Extensions.CommandLineUtils.CommandLineApplication
McMaster.Extensions.CommandLineUtils.CommandOption
McMaster.Extensions.CommandLineUtils.IConsole
McMaster.Extensions.CommandLineUtils.ArgumentEscaper
No packages depend on McMaster.Extensions.CommandLineUtils.
2.1.0:
New features:
- Attributes. Simplify command line argument definitions by adding attributes to a class that represents options and arguments.
- Options defined as [Option] or [Argument], [Subcommand].
- Command parsing options can be defined with [Command] and [Subcmomand].
- Special options include [HelpOption] and [VersionOption].
- Async from end to end. Using C# 7.1 and attribute binding, your console app can be async from top to bottom.
New API
- Prompt.GetYesNo, Prompt.GetPassword, and more. Added API for interactively getting responses on the console.
- Added OptionAttribute, ArgumentAttribute, CommandAttribute, SubcommandAttribute, HelpOptionAttribute, and VersionOptionAttribute.
- CommandLineApplication.Execute<TApp>() - executes an app where TApp uses attributes to define its options
- CommandLineApplication.ExecuteAsync<TApp>() - sample thing, but async.
- CommandLineApplication.StopParsingHelpOption and StopParsingVerboseOption. When the help and verbose options are matched
against a command-line flag, the parsing will stop by default. You can turn this off by setting these options if you
want OnExecute to be invoked no matter what.
- 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.
Minor bug fixes:
- Add return types to .VerboseOption() and ensure .HasValue() is true when HelpOption or VerboseOption are matched
- Fix a NullReferenceException in some edge cases when parsing args
.NET Framework 4.5
- No dependencies.
.NET Standard 1.6
- System.Diagnostics.Process (>= 4.1.0)
- System.Threading.Thread (>= 4.0.0)
.NET Standard 2.0
- No dependencies.
Version | Last updated |
---|---|
4.1.1 | 03/30/2025 |
4.1.0 | 08/26/2023 |
4.0.2 | 11/19/2022 |
4.0.1 | 03/30/2025 |
4.0.0 | 12/27/2021 |
4.0.0-beta.74 | 03/30/2025 |
4.0.0-beta.56 | 03/30/2025 |
3.1.0 | 01/10/2021 |
3.1.0-rc.371 | 04/09/2025 |
3.1.0-beta.356 | 03/30/2025 |
3.1.0-beta.336 | 04/02/2025 |
3.0.0 | 03/29/2020 |
3.0.0-rc.289 | 03/21/2020 |
3.0.0-alpha.268 | 04/06/2025 |
2.6.0 | 03/08/2020 |
2.5.1 | 03/30/2025 |
2.5.0 | 01/02/2020 |
2.4.4 | 03/30/2025 |
2.4.3 | 11/01/2019 |
2.4.2 | 03/23/2025 |
2.4.1 | 09/18/2019 |
2.4.0 | 09/14/2019 |
2.3.4 | 04/11/2019 |
2.3.3 | 04/07/2025 |
2.3.2 | 03/30/2025 |
2.3.1 | 01/19/2019 |
2.3.0 | 01/01/2019 |
2.2.5 | 07/02/2018 |
2.2.4 | 05/25/2018 |
2.2.3 | 05/11/2018 |
2.2.2 | 03/30/2025 |
2.2.1 | 04/11/2018 |
2.2.0 | 03/30/2025 |
2.2.0-rc | 03/23/2018 |
2.2.0-beta | 03/08/2018 |
2.2.0-alpha | 03/30/2025 |
2.1.1 | 03/30/2025 |
2.1.0 | 12/13/2017 |
2.1.0-rc | 12/07/2017 |
2.1.0-beta | 04/05/2025 |
2.1.0-alpha | 11/11/2017 |
2.0.1 | 10/13/2017 |
2.0.0 | 09/16/2017 |