Redpoint.CommandLine 2025.1133.347

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Redpoint.CommandLine --version 2025.1133.347
                    
NuGet\Install-Package Redpoint.CommandLine -Version 2025.1133.347
                    
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.1133.347" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.CommandLine" Version="2025.1133.347" />
                    
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.1133.347
                    
#r "nuget: Redpoint.CommandLine, 2025.1133.347"
                    
#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.1133.347
                    
Install Redpoint.CommandLine as a Cake Addin
#tool nuget:?package=Redpoint.CommandLine&version=2025.1133.347
                    
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.  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

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