Redpoint.CommandLine 2025.1119.450

Prefix Reserved
dotnet add package Redpoint.CommandLine --version 2025.1119.450
                    
NuGet\Install-Package Redpoint.CommandLine -Version 2025.1119.450
                    
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="2025.1119.450" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.CommandLine" Version="2025.1119.450" />
                    
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 2025.1119.450
                    
#r "nuget: Redpoint.CommandLine, 2025.1119.450"
                    
#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.
#addin nuget:?package=Redpoint.CommandLine&version=2025.1119.450
                    
Install Redpoint.CommandLine as a Cake Addin
#tool nuget:?package=Redpoint.CommandLine&version=2025.1119.450
                    
Install Redpoint.CommandLine as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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
2025.1119.450 0 2 hours ago
2025.1119.436 0 2 hours ago
2025.1119.409 0 2 hours ago
2025.1119.388 0 3 hours ago
2025.1119.360 0 3 hours ago
2025.1119.328 0 4 hours ago
2025.1119.299 0 4 hours ago
2025.1119.287 0 4 hours ago
2025.1116.868 38 3 days ago
2025.1116.841 42 3 days ago
2025.1116.444 46 3 days ago
2025.1115.498 92 4 days ago
2025.1115.491 92 4 days ago
2025.1100.365 160 19 days ago
2025.1100.336 148 19 days ago
2025.1100.331 150 19 days ago
2025.1098.108 138 21 days ago
2025.1093.291 159 a month ago
2025.1091.38 141 a month ago
2025.1091.26 150 a month ago
2025.1090.237 147 a month ago
2025.1089.1386 145 a month ago
2025.1083.515 397 a month ago
2025.1083.408 323 a month ago
2025.1083.398 322 a month ago
2025.1083.125 328 a month ago
2025.1080.41 133 a month ago
2025.1075.357 129 a month ago
2025.1073.332 124 a month ago
2025.1072.541 141 2 months ago
2025.1072.536 141 2 months ago
2025.1064.602 204 2 months ago
2025.1064.546 214 2 months ago
2025.1062.589 150 2 months ago
2025.1061.513 104 2 months ago
2025.1060.490 101 2 months ago
2025.1059.134 109 2 months ago
2025.1057.1020 102 2 months ago
2025.1056.584 97 2 months ago
2025.1050.282 97 2 months ago
2025.1050.232 89 2 months ago
2025.1049.55 102 2 months ago
2025.1045.285 106 2 months ago
2025.1043.288 97 3 months ago
2025.1043.246 91 3 months ago
2025.1043.197 92 3 months ago
2025.1043.180 86 3 months ago
2025.1043.108 91 3 months ago
2025.1043.38 92 3 months ago
2025.1043.27 102 3 months ago
2025.1042.725 90 3 months ago
2025.1042.690 88 3 months ago
2025.1042.688 92 3 months ago
2025.1042.418 97 3 months ago
2025.1042.215 88 3 months ago
2025.1042.203 105 3 months ago
2025.1042.184 95 3 months ago
2025.1042.142 91 3 months ago
2025.1042.127 89 3 months ago
2025.1037.1327 91 3 months ago
2025.1036.280 99 3 months ago
2025.1036.55 93 3 months ago
2025.1035.1387 108 3 months ago
2025.1031.111 100 3 months ago
2025.1030.916 108 3 months ago
2025.1030.895 95 3 months ago
2025.1030.592 98 3 months ago
2025.1029.664 81 3 months ago
2025.1029.632 80 3 months ago
2025.1029.596 81 3 months ago
2025.1028.386 88 3 months ago
2025.1025.723 85 3 months ago
2025.1025.712 85 3 months ago
2025.1019.913 89 3 months ago
2025.1018.374 88 3 months ago
2025.1018.285 79 3 months ago
2025.1017.646 84 3 months ago
2025.1017.379 92 3 months ago
2025.1016.1370 86 3 months ago
2025.1016.765 83 3 months ago
2025.1016.712 86 3 months ago
2025.1016.550 80 3 months ago
2025.1016.541 82 3 months ago
2025.1016.532 86 3 months ago
2025.1016.325 73 3 months ago
2025.1016.308 79 3 months ago
2025.1016.296 75 3 months ago
2025.1016.237 83 3 months ago
2025.1016.184 81 3 months ago
2025.1016.70 81 3 months ago
2025.1016.6 79 3 months ago
2025.1015.1438 81 3 months ago
2025.1015.1437 78 3 months ago
2025.1015.1411 80 3 months ago
2025.1015.240 62 3 months ago
2025.1015.223 58 3 months ago
2025.1015.183 59 3 months ago
2025.1014.1342 66 3 months ago
2025.1014.273 76 3 months ago
2025.1014.256 77 3 months ago
2025.1012.440 92 4 months ago
2025.1012.327 77 4 months ago
2025.1012.279 81 4 months ago
2025.1002.636 101 4 months ago
2025.1001.1435 97 4 months ago
2025.1001.1397 95 4 months ago
2025.1001.770 105 4 months ago
2025.1001.570 107 4 months ago
2025.1001.558 98 4 months ago
2025.1001.421 107 4 months ago
2025.1001.390 100 4 months ago
2025.1001.234 112 4 months ago
2025.1001.123 102 4 months ago
2024.1360.354 93 4 months ago
2024.1360.60 90 4 months ago
2024.1360.32 94 4 months ago
2024.1358.450 101 4 months ago
2024.1358.359 92 4 months ago
2024.1358.312 97 4 months ago
2024.1358.244 94 4 months ago
2024.1358.120 102 4 months ago
2024.1348.253 101 5 months ago
2024.1345.1379 92 5 months ago
2024.1345.506 95 5 months ago
2024.1345.379 90 5 months ago
2024.1345.145 88 5 months ago
2024.1345.72 95 5 months ago
2024.1345.69 86 5 months ago
2024.1345.15 93 5 months ago
2024.1344.1436 94 5 months ago
2024.1344.600 103 5 months ago
2024.1344.411 93 5 months ago
2024.1340.379 100 5 months ago
2024.1340.15 101 5 months ago
2024.1338.786 97 5 months ago
2024.1338.722 105 5 months ago
2024.1338.697 100 5 months ago
2024.1338.639 101 5 months ago
2024.1338.541 100 5 months ago
2024.1338.318 92 5 months ago
2024.1338.298 95 5 months ago
2024.1338.98 106 5 months ago
2024.1337.756 101 5 months ago
2024.1337.634 100 5 months ago
2024.1337.625 100 5 months ago
2024.1337.621 103 5 months ago
2024.1337.594 97 5 months ago
2024.1337.136 82 5 months ago
2024.1336.793 101 5 months ago
2024.1336.773 101 5 months ago
2024.1336.305 98 5 months ago
2024.1336.12 105 5 months ago
2024.1335.1421 99 5 months ago
2024.1335.1384 100 5 months ago
2024.1334.1308 95 5 months ago
2024.1334.764 99 5 months ago
2024.1334.722 99 5 months ago
2024.1330.185 97 5 months ago
2024.1328.505 98 5 months ago
2024.1328.470 99 5 months ago
2024.1328.452 98 5 months ago
2024.1323.910 97 5 months ago
2024.1323.653 90 5 months ago
2024.1323.185 101 5 months ago
2024.1323.49 91 5 months ago
2024.1322.714 100 5 months ago
2024.1320.653 96 5 months ago
2024.1320.619 89 5 months ago
2024.1320.601 98 5 months ago
2024.1320.159 93 5 months ago
2024.1320.98 93 5 months ago
2024.1320.2 91 5 months ago
2024.1319.1431 98 5 months ago
2024.1319.1335 92 5 months ago
2024.1317.631 101 6 months ago
2024.1316.330 113 6 months ago
2024.1311.540 106 6 months ago
2024.1306.225 101 6 months ago
2024.1306.199 100 6 months ago
2024.1306.171 98 6 months ago
2024.1306.117 97 6 months ago
2024.1305.506 92 6 months ago
2024.1305.502 104 6 months ago
2024.1305.465 97 6 months ago
2024.1305.442 92 6 months ago
2024.1305.399 102 6 months ago
2024.1299.1070 91 6 months ago
2024.1289.621 98 6 months ago
2024.1289.338 96 6 months ago
2024.1277.836 101 7 months ago
2024.1277.711 96 7 months ago
2024.1277.695 97 7 months ago
2024.1270.409 107 7 months ago
2024.1269.621 122 7 months ago
2024.1269.619 107 7 months ago
2024.1269.605 109 7 months ago
2024.1242.282 116 8 months ago
2024.1242.261 97 8 months ago
2024.1242.233 119 8 months ago
2024.1238.829 116 8 months ago
2024.1238.327 133 8 months ago
2024.1225.297 127 9 months ago
2024.1205.140 83 9 months ago
2024.1204.110 121 9 months ago
2024.1204.62 87 9 months ago
2024.1190.491 118 10 months ago
2024.1177.305 122 6/25/2024
2024.1168.700 101 6/16/2024
2024.1168.649 116 6/16/2024
2024.1168.535 102 6/16/2024
2024.1167.643 110 6/15/2024
2024.1166.989 121 6/14/2024
2024.1166.818 94 6/14/2024
2024.1166.535 97 6/14/2024
2024.1166.422 114 6/14/2024
2024.1166.362 99 6/14/2024
2024.1166.360 99 6/14/2024
2024.1165.1212 105 6/13/2024
2024.1165.1160 95 6/13/2024
2024.1165.1019 108 6/13/2024
2024.1165.978 114 6/13/2024
2024.1165.920 108 6/13/2024
2024.1165.908 95 6/13/2024
2024.1165.873 94 6/13/2024
2024.1165.830 117 6/13/2024
2024.1165.806 123 6/13/2024
2024.1165.794 96 6/13/2024
2024.1165.792 110 6/13/2024
2024.1165.761 109 6/13/2024
2024.1165.743 109 6/13/2024
2024.1165.735 93 6/13/2024
2024.1165.713 117 6/13/2024
2024.1165.640 104 6/13/2024
2024.1165.574 113 6/13/2024
2024.1165.466 109 6/13/2024
2024.1165.417 128 6/13/2024
2024.1165.392 113 6/13/2024
2024.1164.341 87 6/12/2024
2024.1155.941 121 6/3/2024
2024.1140.783 121 5/19/2024
2024.1140.692 121 5/19/2024
2024.1140.673 101 5/19/2024
2024.1129.506 125 5/8/2024
2024.1128.831 139 5/7/2024
2024.1124.465 96 5/3/2024
2024.1123.1162 91 5/2/2024
2024.1123.1117 76 5/2/2024
2024.1123.1050 84 5/2/2024
2024.1122.352 123 5/1/2024
2024.1122.233 109 5/1/2024
2024.1115.1101 131 4/24/2024
2024.1115.1048 105 4/24/2024
2024.1115.932 114 4/24/2024
2024.1115.858 101 4/24/2024
2024.1115.665 110 4/24/2024
2024.1115.648 131 4/24/2024
2024.1115.591 104 4/24/2024
2024.1101.390 111 4/10/2024
2024.1100.741 129 4/9/2024
2024.1099.526 108 4/8/2024
2024.1099.466 114 4/8/2024
2024.1098.573 129 4/7/2024
2024.1095.977 110 4/4/2024
2024.1095.847 104 4/4/2024
2024.1095.604 112 4/4/2024
2024.1095.485 125 4/4/2024
2024.1094.930 106 4/3/2024
2024.1094.910 122 4/3/2024
2024.1094.387 122 4/3/2024
2024.1094.313 122 4/3/2024
2024.1093.520 120 4/2/2024
2024.1092.240 114 4/1/2024
2024.1089.1425 125 3/29/2024
2024.1089.983 110 3/29/2024
2024.1089.942 104 3/29/2024
2024.1089.2 109 3/29/2024
2024.1088.1343 134 3/28/2024
2024.1088.1139 126 3/28/2024
2024.1088.875 120 3/28/2024
2024.1088.700 140 3/28/2024
2024.1088.603 127 3/28/2024
2024.1088.590 100 3/28/2024
2024.1088.575 130 3/28/2024
2024.1088.561 131 3/28/2024
2024.1088.506 110 3/28/2024
2024.1088.18 109 3/28/2024
2024.1087.1181 141 3/27/2024
2024.1087.1173 109 3/27/2024
2024.1087.1143 129 3/27/2024
2024.1087.1108 114 3/27/2024
2024.1087.950 146 3/27/2024
2024.1087.939 121 3/27/2024
2024.1087.252 122 3/27/2024
2024.1070.736 142 3/10/2024
2024.1049.1437 153 2/19/2024
2024.1036.571 139 2/5/2024
2024.1036.508 104 2/5/2024
2024.1032.1204 115 2/1/2024
2024.1032.1133 104 2/1/2024
2024.1032.1122 119 2/1/2024
2024.1032.1071 99 2/1/2024
2024.1032.940 121 2/1/2024
2024.1031.912 117 1/31/2024
2024.1031.893 99 1/31/2024
2024.1031.851 118 1/31/2024
2024.1031.829 113 1/31/2024
2024.1031.386 128 1/31/2024
2024.1031.318 123 1/31/2024
2024.1017.460 131 1/17/2024
2024.1017.420 119 1/17/2024
2024.1017.163 119 1/17/2024
2024.1016.414 323 1/16/2024
2024.1012.167 139 1/12/2024
2024.1011.406 122 1/11/2024
2024.1010.315 128 1/10/2024
2023.1358.326 159 12/24/2023
2023.1351.473 150 12/17/2023
2023.1351.445 121 12/17/2023
2023.1351.432 134 12/17/2023
2023.1350.478 121 12/16/2023
2023.1344.600 129 12/10/2023
2023.1344.529 139 12/10/2023
2023.1339.582 163 12/5/2023
2023.1338.1072 134 12/4/2023
2023.1336.844 137 12/2/2023
2023.1335.378 143 12/1/2023
2023.1335.236 141 12/1/2023
2023.1335.203 136 12/1/2023
2023.1334.814 131 11/30/2023
2023.1332.652 127 11/28/2023
2023.1332.622 140 11/28/2023
2023.1332.524 156 11/28/2023
2023.1331.1073 119 11/27/2023
2023.1331.423 126 11/27/2023
2023.1328.513 137 11/24/2023
2023.1327.985 145 11/23/2023
2023.1325.593 138 11/21/2023
2023.1325.551 140 11/21/2023
2023.1325.529 130 11/21/2023