Ubiquity.NET.CommandLine
20.1.8-rc
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
<PackageReference Include="Ubiquity.NET.CommandLine" Version="20.1.8-rc" />
<PackageVersion Include="Ubiquity.NET.CommandLine" Version="20.1.8-rc" />
<PackageReference Include="Ubiquity.NET.CommandLine" />
paket add Ubiquity.NET.CommandLine --version 20.1.8-rc
#r "nuget: Ubiquity.NET.CommandLine, 20.1.8-rc"
#:package Ubiquity.NET.CommandLine@20.1.8-rc
#addin nuget:?package=Ubiquity.NET.CommandLine&version=20.1.8-rc&prerelease
#tool nuget:?package=Ubiquity.NET.CommandLine&version=20.1.8-rc&prerelease
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
- Base class for writing UX to a
ConsoleReporter- Reporter that reports errors to
Console.Errorand all other nessages toConsole.Out
- Reporter that reports errors to
ColoredConsoleReporterConsoleReporterthat colorizes output using ANSI color codes- Colors are customizable, but contains a common default
| Product | Versions 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. |
-
net8.0
- AnsiCodes (>= 0.2.1)
- System.CommandLine (>= 2.0.0-rc.2.25502.107)
- Ubiquity.NET.Extensions (>= 20.1.8-rc)
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 |