Senpai 2.0.0-beta.1.0
Additional Details
Package has moved to maid
This is a prerelease version of Senpai.
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 Senpai --version 2.0.0-beta.1.0
NuGet\Install-Package Senpai -Version 2.0.0-beta.1.0
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="Senpai" Version="2.0.0-beta.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Senpai --version 2.0.0-beta.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Senpai, 2.0.0-beta.1.0"
#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.
// Install Senpai as a Cake Addin #addin nuget:?package=Senpai&version=2.0.0-beta.1.0&prerelease // Install Senpai as a Cake Tool #tool nuget:?package=Senpai&version=2.0.0-beta.1.0&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
A declarative way of building .NET consoles.
Documentation
Getting started
using Senpai;
using Senpai.Token;
[Command(
Name: "do",
Description: "Do something."
)]
[Option<bool>(
Id: 2
Name: "--alt",
Description: "An option which alter something."
)]
[Argument<string>(
Id: 1
Name: "Input",
Arity = ArgumentArity.ExactlyOne
)]
public static void myMethod(string Input, bool Alter)
{
// my code
}
static void Main(string[] args)
{
Cli.Initialize(args, "This is my app's description.");
}
Under the hood
Senpai is able to simplify the process of building a cli by making use of the new generic attribute feature.
A little bit of reflection-ing and Senpai is able to dynamically build and initialize the System.CommandLine library to act as its command-line interpreter. But all of this comes at the price of some limitations and performance lost.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- System.CommandLine (>= 2.0.0-beta3.22114.1)
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 | |
---|---|---|---|
3.0.0-preview.1 | 129 | 1/27/2023 | |
3.0.0-alpha.2 | 125 | 1/20/2023 | |
3.0.0-alpha.1 | 119 | 1/19/2023 | |
2.0.0 | 470 | 11/5/2022 | |
2.0.0-beta.1.0 | 179 | 6/15/2022 | |
2.0.0-alpha.1.0 | 148 | 6/9/2022 | |
1.0.2 | 516 | 4/5/2022 | |
1.0.1 | 482 | 4/5/2022 | |
1.0.0 | 477 | 4/5/2022 |
The changelog can be found at https://github.com/imdying/senpai