VOOZH about

URL: https://www.nuget.org/packages/Redpoint.CommandLine/

⇱ NuGet Gallery | Redpoint.CommandLine 2026.1170.257




👁 Image
Redpoint.CommandLine 2026.1170.257

Prefix Reserved
dotnet add package Redpoint.CommandLine --version 2026.1170.257
 
 
NuGet\Install-Package Redpoint.CommandLine -Version 2026.1170.257
 
 
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="Redpoint.CommandLine" Version="2026.1170.257" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.CommandLine" Version="2026.1170.257" />
 
Directory.Packages.props
<PackageReference Include="Redpoint.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 Redpoint.CommandLine --version 2026.1170.257
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Redpoint.CommandLine, 2026.1170.257"
 
 
#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 Redpoint.CommandLine@2026.1170.257
 
 
#: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=Redpoint.CommandLine&version=2026.1170.257
 
Install as a Cake Addin
#tool nuget:?package=Redpoint.CommandLine&version=2026.1170.257
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Redpoint.CommandLine

This library provides APIs for building dependency injected console applications, with both commands and option declarations being dependency injected.

To use this library, first define your command:

internal class SomeAction
{
	public class Options
	{
		public Option<string> SomeOpt = new Option<string>("--opt", "My option description.");

		// Add more fields or properties that use Option<> or Argument<> and they'll be automatically
		// registered to the command line parser.
	}

	public static Command CreateCommand(ICommandBuilder builder)
	{
		return new Command("some-action", "The description of your some-action command.");
	}

	public class CommandInstance : ICommandInstance
	{
 private readonly ILogger<CommandInstance> _logger;
 private readonly Options _options;

 public CommandInstance(
 ILogger<CommandInstance> logger,
 Options options)
 {
 _logger = logger;
 _options = options;
 }

 public Task<int> ExecuteAsync(ICommandInvocationContext context)
 {
 // Example on how to access an option's value.
 var value = context.ParseResult.GetValueForOption(_options.SomeOpt);

 // ... implement your command here ...
 _logger.LogInformation("Hello world!");

 // Return the exit code for the application.
 return Task.FromResult(0);
 }
	}
}

To register and execute commands, in your Program.Main:

// Use the command line builder APIs to build the root command.
var rootCommand = CommandLineBuilder.NewBuilder()
 .AddGlobalRuntimeServices((builder, services) =>
 {
 // Register global runtime services here, such as services.AddLogging(...)
 })
 .SetGlobalExecutionHandler(async (sp, executeCommand) =>
 {
 // Can be used to wrap execution of all commands, such as capturing
 // exceptions and logging them:

 var logger = sp.GetRequiredService<ILogger<Program>>();
 try
 {
 return await executeCommand().ConfigureAwait(true);
 }
 catch (Exception ex)
 {
 logger.LogError(ex, $"Uncaught exception during command execution: {ex}");
 return 1;
 }
 })
 // Add each of your commands like this:
 .AddCommand<SomeAction.CommandInstance, SomeAction.Options>(SomeAction.CreateCommand)
 // Then build the root command to use below.
 .Build("My console application description.");

// Parse and execute the command.
var exitCode = await rootCommand.InvokeAsync(args).ConfigureAwait(false);
await Console.Out.FlushAsync().ConfigureAwait(false);
await Console.Error.FlushAsync().ConfigureAwait(false);
Environment.Exit(exitCode);
throw new BadImageFormatException();
Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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

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
2026.1170.257 0 6/19/2026
2026.1169.464 62 6/18/2026
2026.1169.426 78 6/18/2026
2026.1169.413 75 6/18/2026
2026.1169.196 78 6/18/2026
2026.1161.947 91 6/10/2026
2026.1159.820 96 6/8/2026
2026.1159.804 98 6/8/2026
2026.1159.544 98 6/8/2026
2026.1159.510 93 6/8/2026
2026.1154.870 94 6/3/2026
2026.1154.811 91 6/3/2026
2026.1154.803 95 6/3/2026
2026.1154.686 97 6/3/2026
2026.1154.457 99 6/3/2026
2026.1153.1025 96 6/2/2026
2026.1153.1010 95 6/2/2026
2026.1153.988 95 6/2/2026
2026.1153.959 99 6/2/2026
2026.1153.916 95 6/2/2026
Loading failed