Redpoint.CommandLine 2025.1191.922

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.1191.922
                    
NuGet\Install-Package Redpoint.CommandLine -Version 2025.1191.922
                    
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.1191.922" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.CommandLine" Version="2025.1191.922" />
                    
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.1191.922
                    
#r "nuget: Redpoint.CommandLine, 2025.1191.922"
                    
#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@2025.1191.922
                    
#: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=2025.1191.922
                    
Install as a Cake Addin
#tool nuget:?package=Redpoint.CommandLine&version=2025.1191.922
                    
Install 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.1199.287 0 7/18/2025
2025.1198.1048 23 7/17/2025
2025.1198.682 30 7/17/2025
2025.1198.638 25 7/17/2025
2025.1198.574 27 7/17/2025
2025.1198.187 32 7/17/2025
2025.1191.922 126 7/10/2025
2025.1191.235 127 7/10/2025
2025.1190.175 128 7/9/2025
2025.1189.851 131 7/8/2025
2025.1189.841 131 7/8/2025
2025.1187.587 130 7/6/2025
2025.1183.853 131 7/2/2025
2025.1181.644 130 6/30/2025
2025.1175.340 135 6/24/2025
2025.1174.62 134 6/23/2025
2025.1171.352 113 6/20/2025
2025.1169.413 133 6/18/2025
2025.1166.1191 136 6/15/2025
2025.1166.1178 133 6/15/2025
2025.1166.1177 130 6/15/2025
2025.1159.445 107 6/8/2025
2025.1159.364 107 6/8/2025
2025.1159.324 106 6/8/2025
2025.1155.438 142 6/4/2025
2025.1141.1424 145 5/21/2025
2025.1140.383 139 5/20/2025
2025.1140.377 148 5/20/2025
2025.1139.983 140 5/19/2025
2025.1139.952 140 5/19/2025
2025.1139.941 138 5/19/2025
2025.1139.855 133 5/19/2025
2025.1139.850 141 5/19/2025
2025.1139.837 141 5/19/2025
2025.1139.811 140 5/19/2025
2025.1139.806 134 5/19/2025
2025.1139.796 139 5/19/2025
2025.1139.729 136 5/19/2025
2025.1139.719 136 5/19/2025
2025.1139.706 145 5/19/2025
2025.1139.694 141 5/19/2025
2025.1139.679 131 5/19/2025
2025.1139.662 141 5/19/2025
2025.1139.638 138 5/19/2025
2025.1139.628 142 5/19/2025
2025.1139.626 142 5/19/2025
2025.1139.619 141 5/19/2025
2025.1139.605 137 5/19/2025
2025.1139.600 140 5/19/2025
2025.1139.583 140 5/19/2025
2025.1139.573 138 5/19/2025
2025.1139.564 140 5/19/2025
2025.1139.552 137 5/19/2025
2025.1139.543 141 5/19/2025
2025.1138.909 139 5/18/2025
2025.1136.150 210 5/16/2025
2025.1135.267 216 5/15/2025
2025.1135.143 221 5/15/2025
2025.1133.453 232 5/13/2025
2025.1133.351 228 5/13/2025
2025.1133.349 226 5/13/2025
2025.1133.347 226 5/13/2025
2025.1130.236 79 5/10/2025
2025.1129.831 107 5/9/2025
2025.1129.346 124 5/9/2025
2025.1129.345 126 5/9/2025
2025.1121.1370 154 5/1/2025
2025.1119.450 152 4/29/2025
2025.1119.436 154 4/29/2025
2025.1119.409 154 4/29/2025
2025.1119.388 152 4/29/2025
2025.1119.360 142 4/29/2025
2025.1119.328 170 4/29/2025
2025.1119.299 157 4/29/2025
2025.1119.287 158 4/29/2025
2025.1116.868 83 4/26/2025
2025.1116.841 82 4/26/2025
2025.1116.444 85 4/26/2025
2025.1115.498 131 4/25/2025
2025.1115.491 129 4/25/2025
2025.1100.365 181 4/10/2025
2025.1100.336 172 4/10/2025
2025.1100.331 169 4/10/2025
2025.1098.108 164 4/8/2025
2025.1093.291 183 4/3/2025
2025.1091.38 156 4/1/2025
2025.1091.26 167 4/1/2025
2025.1090.237 169 3/31/2025
2025.1089.1386 164 3/30/2025
2025.1083.515 416 3/24/2025
2025.1083.408 341 3/24/2025
2025.1083.398 341 3/24/2025
2025.1083.125 345 3/24/2025
2025.1080.41 148 3/21/2025
2025.1075.357 149 3/16/2025
2025.1073.332 142 3/14/2025
2025.1072.541 159 3/13/2025
2025.1072.536 160 3/13/2025
2025.1064.602 219 3/5/2025
2025.1064.546 233 3/5/2025
2025.1062.589 169 3/3/2025
2025.1061.513 125 3/2/2025
2025.1060.490 119 3/1/2025
2025.1059.134 129 2/28/2025
2025.1057.1020 120 2/26/2025
2025.1056.584 115 2/25/2025
2025.1050.282 113 2/19/2025
2025.1050.232 111 2/19/2025
2025.1049.55 118 2/18/2025
2025.1045.285 124 2/14/2025
2025.1043.288 116 2/12/2025
2025.1043.246 110 2/12/2025
2025.1043.197 113 2/12/2025
2025.1043.180 111 2/12/2025
2025.1043.108 109 2/12/2025
2025.1043.38 109 2/12/2025
2025.1043.27 120 2/12/2025
2025.1042.725 108 2/11/2025
2025.1042.690 106 2/11/2025
2025.1042.688 110 2/11/2025
2025.1042.418 114 2/11/2025
2025.1042.215 106 2/11/2025
2025.1042.203 126 2/11/2025
2025.1042.184 117 2/11/2025
2025.1042.142 113 2/11/2025
2025.1042.127 106 2/11/2025
2025.1037.1327 108 2/6/2025
2025.1036.280 119 2/5/2025
2025.1036.55 112 2/5/2025
2025.1035.1387 124 2/4/2025
2025.1031.111 117 1/31/2025
2025.1030.916 126 1/30/2025
2025.1030.895 112 1/30/2025
2025.1030.592 115 1/30/2025
2025.1029.664 102 1/29/2025
2025.1029.632 97 1/29/2025
2025.1029.596 100 1/29/2025
2025.1028.386 106 1/28/2025
2025.1025.723 108 1/25/2025
2025.1025.712 109 1/25/2025
2025.1019.913 105 1/19/2025
2025.1018.374 106 1/18/2025
2025.1018.285 95 1/18/2025
2025.1017.646 104 1/17/2025
2025.1017.379 109 1/17/2025
2025.1016.1370 105 1/16/2025
2025.1016.765 103 1/16/2025
2025.1016.712 109 1/16/2025
2025.1016.550 96 1/16/2025
2025.1016.541 100 1/16/2025
2025.1016.532 103 1/16/2025
2025.1016.325 91 1/16/2025
2025.1016.308 97 1/16/2025
2025.1016.296 94 1/16/2025
2025.1016.237 99 1/16/2025
2025.1016.184 97 1/16/2025
2025.1016.70 98 1/16/2025
2025.1016.6 100 1/16/2025
2025.1015.1438 100 1/16/2025
2025.1015.1437 95 1/16/2025
2025.1015.1411 96 1/15/2025
2025.1015.240 79 1/15/2025
2025.1015.223 76 1/15/2025
2025.1015.183 78 1/15/2025
2025.1014.1342 82 1/14/2025
2025.1014.273 94 1/14/2025
2025.1014.256 99 1/14/2025
2025.1012.440 112 1/12/2025
2025.1012.327 96 1/12/2025
2025.1012.279 103 1/12/2025
2025.1002.636 121 1/2/2025
2025.1001.1435 114 1/2/2025
2025.1001.1397 117 1/1/2025
2025.1001.770 126 1/1/2025
2025.1001.570 129 1/1/2025
2025.1001.558 115 1/1/2025
2025.1001.421 127 1/1/2025
2025.1001.390 123 1/1/2025
2025.1001.234 130 1/1/2025
2025.1001.123 123 1/1/2025
2024.1360.354 110 12/25/2024
2024.1360.60 108 12/25/2024
2024.1360.32 110 12/25/2024
2024.1358.450 116 12/23/2024
2024.1358.359 109 12/23/2024
2024.1358.312 115 12/23/2024
2024.1358.244 109 12/23/2024
2024.1358.120 123 12/23/2024
2024.1348.253 116 12/13/2024
2024.1345.1379 110 12/10/2024
2024.1345.506 111 12/10/2024
2024.1345.379 105 12/10/2024
2024.1345.145 103 12/10/2024
2024.1345.72 114 12/10/2024
2024.1345.69 102 12/10/2024
2024.1345.15 108 12/10/2024
2024.1344.1436 112 12/10/2024
2024.1344.600 122 12/9/2024
2024.1344.411 109 12/9/2024
2024.1340.379 115 12/5/2024
2024.1340.15 117 12/5/2024
2024.1338.786 112 12/3/2024
2024.1338.722 127 12/3/2024
2024.1338.697 122 12/3/2024
2024.1338.639 122 12/3/2024
2024.1338.541 117 12/3/2024
2024.1338.318 106 12/3/2024
2024.1338.298 112 12/3/2024
2024.1338.98 123 12/3/2024
2024.1337.756 120 12/2/2024
2024.1337.634 117 12/2/2024
2024.1337.625 116 12/2/2024
2024.1337.621 122 12/2/2024
2024.1337.594 116 12/2/2024
2024.1337.136 99 12/2/2024
2024.1336.793 120 12/1/2024
2024.1336.773 118 12/1/2024
2024.1336.305 115 12/1/2024
2024.1336.12 121 12/1/2024
2024.1335.1421 118 11/30/2024
2024.1335.1384 118 11/30/2024
2024.1334.1308 114 11/29/2024
2024.1334.764 116 11/29/2024
2024.1334.722 115 11/29/2024
2024.1330.185 114 11/25/2024
2024.1328.505 116 11/23/2024
2024.1328.470 116 11/23/2024
2024.1328.452 117 11/23/2024
2024.1323.910 113 11/18/2024
2024.1323.653 105 11/18/2024
2024.1323.185 118 11/18/2024
2024.1323.49 109 11/18/2024
2024.1322.714 116 11/17/2024
2024.1320.653 115 11/15/2024
2024.1320.619 105 11/15/2024
2024.1320.601 114 11/15/2024
2024.1320.159 109 11/15/2024
2024.1320.98 110 11/15/2024
2024.1320.2 106 11/15/2024
2024.1319.1431 115 11/15/2024
2024.1319.1335 109 11/14/2024
2024.1317.631 120 11/12/2024
2024.1316.330 130 11/11/2024
2024.1311.540 123 11/6/2024
2024.1306.225 120 11/1/2024
2024.1306.199 116 11/1/2024
2024.1306.171 113 11/1/2024
2024.1306.117 117 11/1/2024
2024.1305.506 109 10/31/2024
2024.1305.502 119 10/31/2024
2024.1305.465 113 10/31/2024
2024.1305.442 107 10/31/2024
2024.1305.399 122 10/31/2024
2024.1299.1070 106 10/25/2024
2024.1289.621 112 10/15/2024
2024.1289.338 111 10/15/2024
2024.1277.836 118 10/5/2024
2024.1277.711 111 10/3/2024
2024.1277.695 113 10/3/2024
2024.1270.409 124 9/26/2024
2024.1269.621 137 9/25/2024
2024.1269.619 122 9/25/2024
2024.1269.605 123 9/25/2024
2024.1242.282 132 8/29/2024
2024.1242.261 113 8/29/2024
2024.1242.233 137 8/29/2024
2024.1238.829 135 8/25/2024
2024.1238.327 154 8/25/2024
2024.1225.297 141 8/12/2024
2024.1205.140 98 7/23/2024
2024.1204.110 134 7/22/2024
2024.1204.62 102 7/22/2024
2024.1190.491 135 7/8/2024
2024.1177.305 139 6/25/2024
2024.1168.700 115 6/16/2024
2024.1168.649 132 6/16/2024
2024.1168.535 119 6/16/2024
2024.1167.643 125 6/15/2024
2024.1166.989 136 6/14/2024
2024.1166.818 109 6/14/2024
2024.1166.535 113 6/14/2024
2024.1166.422 133 6/14/2024
2024.1166.362 116 6/14/2024
2024.1166.360 114 6/14/2024
2024.1165.1212 123 6/13/2024
2024.1165.1160 112 6/13/2024
2024.1165.1019 126 6/13/2024
2024.1165.978 128 6/13/2024
2024.1165.920 124 6/13/2024
2024.1165.908 110 6/13/2024
2024.1165.873 110 6/13/2024
2024.1165.830 131 6/13/2024
2024.1165.806 138 6/13/2024
2024.1165.794 112 6/13/2024
2024.1165.792 124 6/13/2024
2024.1165.761 123 6/13/2024
2024.1165.743 126 6/13/2024
2024.1165.735 111 6/13/2024
2024.1165.713 132 6/13/2024
2024.1165.640 119 6/13/2024
2024.1165.574 128 6/13/2024
2024.1165.466 126 6/13/2024
2024.1165.417 144 6/13/2024
2024.1165.392 129 6/13/2024
2024.1164.341 101 6/12/2024
2024.1155.941 134 6/3/2024
2024.1140.783 135 5/19/2024
2024.1140.692 155 5/19/2024
2024.1140.673 117 5/19/2024
2024.1129.506 143 5/8/2024
2024.1128.831 153 5/7/2024
2024.1124.465 111 5/3/2024
2024.1123.1162 106 5/2/2024
2024.1123.1117 92 5/2/2024
2024.1123.1050 99 5/2/2024
2024.1122.352 138 5/1/2024
2024.1122.233 124 5/1/2024
2024.1115.1101 146 4/24/2024
2024.1115.1048 120 4/24/2024
2024.1115.932 128 4/24/2024
2024.1115.858 120 4/24/2024
2024.1115.665 125 4/24/2024
2024.1115.648 146 4/24/2024
2024.1115.591 122 4/24/2024
2024.1101.390 125 4/10/2024
2024.1100.741 148 4/9/2024
2024.1099.526 125 4/8/2024
2024.1099.466 128 4/8/2024
2024.1098.573 146 4/7/2024
2024.1095.977 129 4/4/2024
2024.1095.847 119 4/4/2024
2024.1095.604 128 4/4/2024
2024.1095.485 139 4/4/2024
2024.1094.930 122 4/3/2024
2024.1094.910 138 4/3/2024
2024.1094.387 137 4/3/2024
2024.1094.313 139 4/3/2024
2024.1093.520 136 4/2/2024
2024.1092.240 129 4/1/2024
2024.1089.1425 140 3/29/2024
2024.1089.983 127 3/29/2024
2024.1089.942 122 3/29/2024
2024.1089.2 128 3/29/2024
2024.1088.1343 149 3/28/2024
2024.1088.1139 144 3/28/2024
2024.1088.875 136 3/28/2024
2024.1088.700 157 3/28/2024
2024.1088.603 142 3/28/2024
2024.1088.590 117 3/28/2024
2024.1088.575 146 3/28/2024
2024.1088.561 152 3/28/2024
2024.1088.506 132 3/28/2024
2024.1088.18 126 3/28/2024
2024.1087.1181 158 3/27/2024
2024.1087.1173 130 3/27/2024
2024.1087.1143 147 3/27/2024
2024.1087.1108 135 3/27/2024
2024.1087.950 162 3/27/2024
2024.1087.939 138 3/27/2024
2024.1087.252 137 3/27/2024
2024.1070.736 159 3/10/2024
2024.1049.1437 168 2/19/2024
2024.1036.571 154 2/5/2024
2024.1036.508 117 2/5/2024
2024.1032.1204 130 2/1/2024
2024.1032.1133 117 2/1/2024
2024.1032.1122 133 2/1/2024
2024.1032.1071 116 2/1/2024
2024.1032.940 138 2/1/2024
2024.1031.912 131 1/31/2024
2024.1031.893 118 1/31/2024
2024.1031.851 134 1/31/2024
2024.1031.829 127 1/31/2024
2024.1031.386 144 1/31/2024
2024.1031.318 138 1/31/2024
2024.1017.460 145 1/17/2024
2024.1017.420 136 1/17/2024
2024.1017.163 133 1/17/2024
2024.1016.414 339 1/16/2024
2024.1012.167 154 1/12/2024
2024.1011.406 139 1/11/2024
2024.1010.315 143 1/10/2024
2023.1358.326 174 12/24/2023
2023.1351.473 165 12/17/2023
2023.1351.445 134 12/17/2023
2023.1351.432 154 12/17/2023
2023.1350.478 134 12/16/2023
2023.1344.600 145 12/10/2023
2023.1344.529 155 12/10/2023
2023.1339.582 173 12/5/2023
2023.1338.1072 143 12/4/2023
2023.1336.844 144 12/2/2023
2023.1335.378 151 12/1/2023
2023.1335.236 149 12/1/2023
2023.1335.203 145 12/1/2023
2023.1334.814 140 11/30/2023
2023.1332.652 134 11/28/2023
2023.1332.622 149 11/28/2023
2023.1332.524 164 11/28/2023
2023.1331.1073 128 11/27/2023
2023.1331.423 134 11/27/2023
2023.1328.513 146 11/24/2023
2023.1327.985 154 11/23/2023
2023.1325.593 146 11/21/2023
2023.1325.551 152 11/21/2023
2023.1325.529 137 11/21/2023