SimpleLine an open source library that targets to simplify command line interaction.
Allows you to define new commands without having to think about getting values, type conversion,
calling a specific type, and a lot of other troubles.
It s written in C# language.
SimpleLine library makes it easy to write command-line applications
- Facilitates development
- Fairly easy to use
- Easy enough to embed
- Does not affect the testability of the system
.NET CLI
> dotnet add package SimpleLine --version 0.2.1-betaPackage Manager
PM> NuGet\Install-Package SimpleLine -Version 0.2.1-betaPackage Reference
<PackageReference Include="SimpleLine" Version="0.2.1-beta" />Required .NET SDK 6.0+
To use the library, you need to complete several steps
using SimpleLineLibrary.Setup;
[CommandDefinitions]
public class Example
{
[Command("example")]
public void Foo(int x)
{
Console.WriteLine($"result: {x * 2}");
}
}using SimpleLineLibrary;
internal class Program
{
static void Main(string[] args)
{
var conf = Configuration.Default(typeof(Program).Assembly);
SimpleLine.Run(args, conf);
}
}C:\> dotnet program.dll example -x 10
result: 20You can find fully documentation about project docs link