CodeBrix.ArgumentParser.MitLicenseForever
1.0.117
dotnet add package CodeBrix.ArgumentParser.MitLicenseForever --version 1.0.117
NuGet\Install-Package CodeBrix.ArgumentParser.MitLicenseForever -Version 1.0.117
<PackageReference Include="CodeBrix.ArgumentParser.MitLicenseForever" Version="1.0.117" />
<PackageVersion Include="CodeBrix.ArgumentParser.MitLicenseForever" Version="1.0.117" />
<PackageReference Include="CodeBrix.ArgumentParser.MitLicenseForever" />
paket add CodeBrix.ArgumentParser.MitLicenseForever --version 1.0.117
#r "nuget: CodeBrix.ArgumentParser.MitLicenseForever, 1.0.117"
#:package CodeBrix.ArgumentParser.MitLicenseForever@1.0.117
#addin nuget:?package=CodeBrix.ArgumentParser.MitLicenseForever&version=1.0.117
#tool nuget:?package=CodeBrix.ArgumentParser.MitLicenseForever&version=1.0.117
CodeBrix.ArgumentParser
A fully managed, cross-platform command-line option parser for .NET, forked from Mono.Options 6.12.0.148 and adapted to the CodeBrix family conventions.
CodeBrix.ArgumentParser has no dependencies other than .NET, and is provided as a .NET 10 library and associated CodeBrix.ArgumentParser.MitLicenseForever NuGet package.
CodeBrix.ArgumentParser supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.
CodeBrix.ArgumentParser supports:
Getopt::Long-inspired option parsing with short (-v), long (--verbose), and Windows-style (/v) option prefixes.- Required values (
name=), optional values (name:), value-less boolean flags, and negatable switches (-a+/-a-). - Option bundling (
-abc==-a -b -c) and-Dkey=value-style prefix bundling. - Typed option callbacks via
System.ComponentModel.TypeConverter— e.g.Add<int>,Add<FileInfo>. - Key/value options via the
OptionAction<TKey, TValue>delegate. - Multi-value options with customisable separators (e.g.
--define foo=bar,baz=qux). - Response-file expansion via
ResponseFileSource(@args.rsp). - A
CommandSet/Command/HelpCommandmodel for building git-/svn-style command suites. - Localisation via a pluggable
MessageLocalizerConverterdelegate. - Automatic help output via
OptionSet.WriteOptionDescriptions(TextWriter).
Sample Code
Parsing a simple set of options
using CodeBrix.ArgumentParser;
using CodeBrix.ArgumentParser.Options;
int verbose = 0;
bool showHelp = false;
string name = null;
var p = new OptionSet
{
{ "v|verbose", "Increase verbosity.", v => ++verbose },
{ "n|name=", "The {NAME} to greet.", v => name = v },
{ "h|?|help", "Show this message and exit.", v => showHelp = v != null },
};
List<string> extra = p.Parse(args);
if (showHelp)
{
p.WriteOptionDescriptions(Console.Out);
return;
}
Console.WriteLine($"Hello, {name}! (verbosity={verbose})");
License
The project is licensed under the MIT License. see: https://en.wikipedia.org/wiki/MIT_License
CodeBrix.ArgumentParser incorporates source code from Mono.Options 6.12.0.148, which is also MIT-licensed. See THIRD-PARTY-NOTICES.txt for the full attribution and upstream license text.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.117 | 102 | 4/29/2026 |