Giter Site home page Giter Site logo

justinhachemeister / entrypoint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nick-lucas/entrypoint

0.0 0.0 0.0 802 KB

Composable CLI Argument Parser for all modern .Net platforms.

Home Page: https://nick-lucas.github.io/EntryPoint/

License: MIT License

C# 50.74% CSS 35.44% Shell 0.08% JavaScript 13.74%

entrypoint's Introduction

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...
    }
}

entrypoint's People

Contributors

bovorasr avatar nick-lucas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.