cints.CmdStarter
1.0.0
Prefix Reserved
dotnet add package cints.CmdStarter --version 1.0.0
NuGet\Install-Package cints.CmdStarter -Version 1.0.0
<PackageReference Include="cints.CmdStarter" Version="1.0.0" />
<PackageVersion Include="cints.CmdStarter" Version="1.0.0" />
<PackageReference Include="cints.CmdStarter" />
paket add cints.CmdStarter --version 1.0.0
#r "nuget: cints.CmdStarter, 1.0.0"
#:package cints.CmdStarter@1.0.0
#addin nuget:?package=cints.CmdStarter&version=1.0.0
#tool nuget:?package=cints.CmdStarter&version=1.0.0
CmdStarter
CmdStarter turns plain C# code into a command-line interface built on System.CommandLine 2.0.14, the stable release of that library. Classes become commands and their public properties become options, or methods marked [Command] become commands. The library targets .NET 10 only, and supports Microsoft dependency injection in both models.
Features
- Two command models: classes (inheriting
StarterCommand, implementingIStarterCommand, or plain classes with no base class and no interface that carry[Command]) and[Command]methods. - Discovery by namespaces and class filters, or a command tree described in code with
Starter.UseTree. - Options and arguments deduced from the code.
- A Roslyn analyzer that reports definition errors at compile time.
- Global options.
- Validation attributes.
- Command filters.
- Microsoft dependency injection, with one scope per execution.
- A REPL with history and completion.
- Command sequences and text pipes.
- A remote REPL over a named pipe.
- Command states.
- Generic Host integration.
- Trimming and Native AOT, for an application that has the command catalog that the package generates.
- Readable error messages and consistent exit codes.
public sealed class Hello : StarterCommand
{
public string To { get; set; } = "World";
public override Delegate HandlingMethod => (Action)(() => Console.Out.WriteLine($"Hello, {To}!"));
}
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.14)
- System.CommandLine (>= 2.0.14)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on cints.CmdStarter:
| Package | Downloads |
|---|---|
|
cints.CmdStarter.Hosting
Generic Host (Microsoft.Extensions.Hosting) integration for CmdStarter. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 119 | 11/6/2026 |
| 0.9.0.3-beta4.22272.1 | 478 | 6/1/2023 |
| 0.9.0.2-beta4.22272.1 | 399 | 5/31/2023 |
| 0.9.0.1-beta4.22272.1 | 244 | 5/31/2023 |
| 0.9.0-beta4.22272.1 | 233 | 5/31/2023 |
1.0.0: rewrite on System.CommandLine 2.0 stable and .NET 10, with breaking changes. Migration guide: https://github.com/CyberInternauts/CmdStarter/blob/master/docs/migration/0.9-to-1.0.md