DeclarativeCommandLine 1.0.0-master-02061124
This is a prerelease version of DeclarativeCommandLine.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DeclarativeCommandLine --version 1.0.0-master-02061124
NuGet\Install-Package DeclarativeCommandLine -Version 1.0.0-master-02061124
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="DeclarativeCommandLine" Version="1.0.0-master-02061124" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DeclarativeCommandLine" Version="1.0.0-master-02061124" />
<PackageReference Include="DeclarativeCommandLine" />
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 DeclarativeCommandLine --version 1.0.0-master-02061124
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DeclarativeCommandLine, 1.0.0-master-02061124"
#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 DeclarativeCommandLine@1.0.0-master-02061124
#: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=DeclarativeCommandLine&version=1.0.0-master-02061124&prerelease
#tool nuget:?package=DeclarativeCommandLine&version=1.0.0-master-02061124&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Declarative Command Line
Attribute-driven layer on top of System.CommandLine to make the most common use cases easier to set up.
Minimalistic Example
The very smallest a command can be:
using DeclarativeCommandLine;
[Command<AppRootCommand>]
public class AddNumbersCommand
{
[Option]
public int NumberA { get; set; }
[Option]
public int NumberB { get; set; }
[CommandHandler]
public void Handle()
{
Console.WriteLine($"{NumberA} + {NumberB} = {NumberA + NumberB}");
}
}
Command Hierarchy
Generally, an app needs exactly 1 "root command", which handles the case where no explicit command is specified.
[RootCommand]
public class AppRootCommand
{
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- System.CommandLine (>= 2.0.0-beta4.22272.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on DeclarativeCommandLine:
| Repository | Stars |
|---|---|
|
flyingpie/windows-terminal-quake
Enable Quake-style dropdown for (almost) any application.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.10 | 730 | 1/29/2026 |
| 2.0.10-gf94ac20f39 | 117 | 1/29/2026 |
| 2.0.10-gf5cbe2fc62 | 128 | 3/14/2026 |
| 2.0.10-gf2159b44ed | 109 | 2/3/2026 |
| 2.0.10-gee07a7ff93 | 131 | 3/14/2026 |
| 2.0.10-ge5c1293418 | 121 | 3/14/2026 |
| 2.0.10-ga826f64463 | 103 | 2/26/2026 |
| 2.0.10-g7ff6e5e0f6 | 107 | 2/19/2026 |
| 2.0.10-g23e558af9b | 122 | 3/14/2026 |
| 2.0.10-g1dac4f80e9 | 128 | 3/14/2026 |
| 2.0.10-g15816f6ec1 | 119 | 3/14/2026 |
| 2.0.10-g0dd6dcf4ff | 128 | 3/14/2026 |
| 2.0.9 | 222 | 1/8/2026 |
| 2.0.9-geb2b5347ad | 109 | 1/20/2026 |
| 2.0.9-g9e9a184db8 | 120 | 1/8/2026 |
| 2.0.9-g9ca013ae77 | 111 | 1/20/2026 |
| 2.0.9-g6b20a2e36c | 116 | 1/20/2026 |
| 2.0.9-g5faf7a37a6 | 121 | 1/28/2026 |
| 2.0.9-g380f67a4e6 | 112 | 1/23/2026 |
| 1.0.0-master-02061124 | 355 | 2/6/2023 |
Loading failed
1.0.0 Initial release