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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeBrix.ArgumentParser.MitLicenseForever" Version="1.0.117" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeBrix.ArgumentParser.MitLicenseForever" Version="1.0.117" />
                    
Directory.Packages.props
<PackageReference Include="CodeBrix.ArgumentParser.MitLicenseForever" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeBrix.ArgumentParser.MitLicenseForever --version 1.0.117
                    
#r "nuget: CodeBrix.ArgumentParser.MitLicenseForever, 1.0.117"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeBrix.ArgumentParser.MitLicenseForever@1.0.117
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeBrix.ArgumentParser.MitLicenseForever&version=1.0.117
                    
Install as a Cake Addin
#tool nuget:?package=CodeBrix.ArgumentParser.MitLicenseForever&version=1.0.117
                    
Install as a Cake Tool

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 / HelpCommand model for building git-/svn-style command suites.
  • Localisation via a pluggable MessageLocalizerConverter delegate.
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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