Ubiquity.NET.CommandLine 20.1.8-rc

This is a prerelease version of Ubiquity.NET.CommandLine.

Requires NuGet 4.9.0 or higher.

dotnet add package Ubiquity.NET.CommandLine --version 20.1.8-rc
                    
NuGet\Install-Package Ubiquity.NET.CommandLine -Version 20.1.8-rc
                    
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="Ubiquity.NET.CommandLine" Version="20.1.8-rc" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ubiquity.NET.CommandLine" Version="20.1.8-rc" />
                    
Directory.Packages.props
<PackageReference Include="Ubiquity.NET.CommandLine" />
                    
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 Ubiquity.NET.CommandLine --version 20.1.8-rc
                    
#r "nuget: Ubiquity.NET.CommandLine, 20.1.8-rc"
                    
#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 Ubiquity.NET.CommandLine@20.1.8-rc
                    
#: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=Ubiquity.NET.CommandLine&version=20.1.8-rc&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ubiquity.NET.CommandLine&version=20.1.8-rc&prerelease
                    
Install as a Cake Tool

Ubiquity.NET.CommandLine

Common Text based (console) UX support. This provides a number of support classes for Text based UI/UXm including command line parsing extensions. This is generally only relevant for console based apps.

Example Command line parsing:

var reporter = new ColoredConsoleReporter(MsgLevel.Information);
if(!ArgsParsing.TryParse<Options>( args, reporter, out Options? options, out int exitCode ))
{
    return exitCode;
}

// ...

// Options is a class that has properties for all parsed commands, arguments and options
// Allowing for validation of them all in context (including each other)
// App can then dispatch behavior based on the commands/options etc... as needed.
// NO ASSUMPTION IS MADE ABOUT THE USE OF COMMANDS NOR THE BEHAVIOR OF THEM. The app
// is entirely in control of how they are used.

Supported Functionality

IDiagnosticReporter interface is at the core of the UX. It is similar in many ways to many of the logging interfaces available. The primary distinction is with the intention of use. IDiagnosticReporter specifically assumes the use for UI/UX rather than a debugging/diagnostic log. These have VERY distinct use cases and purposes and generally show very different information. (Not to mention the overlly complex requirements of the anti-pattern DI container assumed in Microsoft.Extensions.Logging)

Messages

All messages for the UX use a simple immutable structure to store the details of a message represented as DiagnosticMessage.

Pre-Built Reporters

There are a few pre-built implementation of the IDiagnosticReporter interface.

  • TextWriterReporter
    • Base class for writing UX to a TextWriter
  • ConsoleReporter
    • Reporter that reports errors to Console.Error and all other nessages to Console.Out
  • ColoredConsoleReporter
    • ConsoleReporter that colorizes output using ANSI color codes
      • Colors are customizable, but contains a common default
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ubiquity.NET.CommandLine:

Package Downloads
Ubiquity.NET.Runtime.Utils

General use Support for interpreters/runtimes

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
20.1.8-rc 125 11/2/2025
20.1.8-epsilon 62 10/11/2025
20.1.8-delta 145 9/7/2025
20.1.8-beta 144 9/4/2025