PrettyCommandLine 1.0.0.1
See the version list below for details.
dotnet add package PrettyCommandLine --version 1.0.0.1
NuGet\Install-Package PrettyCommandLine -Version 1.0.0.1
<PackageReference Include="PrettyCommandLine" Version="1.0.0.1" />
paket add PrettyCommandLine --version 1.0.0.1
#r "nuget: PrettyCommandLine, 1.0.0.1"
// Install PrettyCommandLine as a Cake Addin
#addin nuget:?package=PrettyCommandLine&version=1.0.0.1
// Install PrettyCommandLine as a Cake Tool
#tool nuget:?package=PrettyCommandLine&version=1.0.0.1
PrettyCommandLine is a versatile console command line handler designed to streamline command-line interactions with ease and clarity. With this NuGet package, users can effortlessly create and manage commands, modes, and subcommands, assigning distinct actions to each.
Key features include:
Flexible Command Structure: Easily add, organize, and customize commands, modes, and subcommands according to your application's requirements.
Validation Support: Seamlessly integrate variable checking and validation methods for precise command execution and error handling.
Multi-Mode Functionality: Enable commands to bind to multiple modes, allowing for dynamic behavior and increased versatility.
Custom Color Schemes: Enhance user experience and visual clarity by assigning unique color schemes to different modes, ensuring clear differentiation and intuitive navigation.
With PrettyCommandLine, developers can create intuitive, user-friendly command-line interfaces for their applications, enhancing usability and efficiency. Whether you're building a simple script or a complex application, PrettyCommandLine empowers you to handle command-line interactions with elegance and precision.
CommandLineBind commandLine = new CommandLineBind();
Modes mode1 = new Modes { Name = "Global", isDefault = true };
Modes mode2 = new Modes { Name = "Config", isDefault = true, Color = ConsoleColor.Gray };
Modes mode3 = new Modes { Name = "Service", isDefault = true, Color = ConsoleColor.White };
commandLine.AddMode(mode1);
commandLine.AddMode(mode2);
commandLine.AddMode(mode3);
Commands Print = new Commands(CommandsBase.CommandTypes.Command) { Command = "Today is" };
Print.AddToMode(mode1);
Print.Executable += delegate { Console.WriteLine("Today Is " + DateTime.Now.DayOfWeek); };
commandLine.AddCommand(Print);
Commands age = new Commands(CommandsBase.CommandTypes.Command) { Command = "my age is" };
age.Variables.Add(new Variable(typeof(int)) { Name = "Age" });
age.Executable += delegate (object sender, CommandExecuteEventArgs e) { Console.WriteLine("Your age is " + e.Variables[0].Value); };
commandLine.AddCommand(age);
Commands test1 = new Commands(CommandsBase.CommandTypes.Command) { Command = "who" };
test1.AddToMode(mode1);
test1.Executable += delegate { Console.WriteLine("Who what?"); };
Commands test11 = new Commands(CommandsBase.CommandTypes.Command) { Command = "am" };
test11.AddToMode(mode1);
test11.Executable += delegate { Console.WriteLine("Who am I?"); };
Commands test12 = new Commands(CommandsBase.CommandTypes.Command) { Command = "i" };
test12.AddToMode(mode1);
test12.Executable += delegate { Console.WriteLine("You are C#"); };
Commands test13 = new Commands(CommandsBase.CommandTypes.Command) { Command = "are" };
test13.AddToMode(mode1);
test13.IsExecutable = true;
test13.Variables.Add(new Variable(typeof(int)) { Name = "Name" , Required = false});
test13.Executable +=
delegate (object sender, CommandExecuteEventArgs e) {
if (e.Variables.Count == 0)
Console.WriteLine("Who are you?");
else
Console.WriteLine("Who are these " + e.Variables[0].Value +" Guys?");
};
Commands test14 = new Commands(CommandsBase.CommandTypes.Command) { Command = "you" };
test14.AddToMode(mode1);
test14.Executable += delegate (object sender, CommandExecuteEventArgs e) {
if(e.Variables.Count==0 )
Console.WriteLine("I'm C#");
else
Console.WriteLine("I'm " + e.Variables[0].Value);
};
test14.Variables.Add(new Variable(typeof(string)) { Name = "Name" ,Required = true});
test1.AddSubCommand(test11);
test11.AddSubCommand(test12);
test1.AddSubCommand(test13);
test13.AddSubCommand(test14);
commandLine.AddCommand(test1);
commandLine.Start();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net5.0-windows7.0 is compatible. net6.0 is compatible. 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 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. 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. net7.0-windows7.0 is compatible. net8.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. 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. net8.0-windows7.0 is compatible. |
.NET Core | netcoreapp1.1 is compatible. netcoreapp2.0 is compatible. netcoreapp2.1 is compatible. netcoreapp2.2 is compatible. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 is compatible. |
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. |
-
.NETCoreApp 1.1
- Microsoft.NETCore.App (>= 1.1.2)
-
.NETCoreApp 2.0
- No dependencies.
-
.NETCoreApp 2.1
- No dependencies.
-
.NETCoreApp 2.2
- No dependencies.
-
.NETCoreApp 3.0
- No dependencies.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETFramework 4.8.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net5.0
- No dependencies.
-
net5.0-windows7.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net7.0-android33.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net8.0-android34.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.