Skip to content

bigloudjeff/EntryPoint

This branch is 3 commits behind Nick-Lucas/EntryPoint:master.

Folders and files

NameName
Last commit message
Last commit date
Mar 26, 2017
Mar 26, 2017
Dec 21, 2017
Oct 7, 2018
Dec 30, 2016
Dec 23, 2016
Mar 24, 2017
Dec 23, 2016
Dec 27, 2016
Jan 24, 2017
Mar 25, 2017

Repository files navigation

Build status NuGet MIT License

EntryPoint

Composable CLI Argument Parser for all modern .Net platforms

Parses arguments in the form UtilityName [command] [-o | --options] [operands]

Supports:

  • .Net Standard 1.6+ (.Net Core and all future .Net releases are built on this)
  • .Net Framework 4.5+

Follows the IEEE Standard closely, but does include common adblibs such as fully named --option style options.

Installation

EntryPoint is available on NuGet:

PM> Install-Package EntryPoint

Pull requests and suggestions are welcome, and some small tasks are already in the Issues.

Documentation

As simple as...

Parse your application's Command Line Arguments into a declarative POCO, in one line.

Arguments are defined as declarative POCOs using Attributes.

var arguments = Cli.Parse<CliArguments>(args);
if (arguments.Option) {
  // ...
};
public class CliArguments : BaseCliArguments {
    public CliArguments() : base("MyApplication") { }

    [Option(ShortName: 'o',
            LongName: "option-1")]
    public bool Option { get; set; }
}

Commands have a dedicated API:

Cli.Execute<CliCommands>(args);
public class CliCommands : BaseCliCommands {
    [Command("primary")]
    public void Primary(string[] args) {
    	// Arguments Parsing and Command Code...
    }
}

About

Composable CLI Argument Parser for all modern .Net platforms.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 50.8%
  • CSS 35.4%
  • JavaScript 13.7%
  • Shell 0.1%