All Projects → bartoszgolek → NFlags

bartoszgolek / NFlags

Licence: MIT license
Simple yet powerfull library to made parsing CLI arguments easy. Library also allow to print usage help "out of box".

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to NFlags

Ansible Aur
Ansible module to manage packages from the AUR
Stars: ✭ 149 (+238.64%)
Mutual labels:  helper
alog
Update: use loguru instead. Simple straight logging your Python code
Stars: ✭ 38 (-13.64%)
Mutual labels:  helper
yellowpages-scraper
Yellowpages.com Web Scraper written in Python and LXML to extract business details available based on a particular category and location.
Stars: ✭ 56 (+27.27%)
Mutual labels:  parsing
Dynamicswebapi
DynamicsWebApi is a Microsoft Dynamics 365 / Microsoft Dataverse (formerly known as Common Data Service) Web API helper library for JavaScript
Stars: ✭ 165 (+275%)
Mutual labels:  helper
Jd Helper
🐑 京东日常小助手, 省时省力, 京东萌宠, 免费水果 [暂停更新]
Stars: ✭ 199 (+352.27%)
Mutual labels:  helper
autumn
A Java parser combinator library written with an unmatched feature set.
Stars: ✭ 112 (+154.55%)
Mutual labels:  parsing
Trackable
Trackable is a simple analytics integration helper library. It’s especially designed for easy and comfortable integration with existing projects.
Stars: ✭ 143 (+225%)
Mutual labels:  helper
masci-tools
Tools, utility, parsers useful in daily material science work
Stars: ✭ 18 (-59.09%)
Mutual labels:  parsing
Laravelmetatags
The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project
Stars: ✭ 226 (+413.64%)
Mutual labels:  helper
postcss-jsx
PostCSS syntax for parsing CSS in JS literals
Stars: ✭ 73 (+65.91%)
Mutual labels:  parsing
Handlebars Helpers
Related projects
Stars: ✭ 2,024 (+4500%)
Mutual labels:  helper
Loco Answers
Open Source Android App for answers in TRIVIA GAMES
Stars: ✭ 180 (+309.09%)
Mutual labels:  helper
DotGrok
Parse text with pattern. Inspired by grok filter.
Stars: ✭ 26 (-40.91%)
Mutual labels:  parsing
Tinyconsole
📱💬🚦 TinyConsole is a micro-console that can help you log and display information inside an iOS application, where having a connection to a development computer is not possible.
Stars: ✭ 1,929 (+4284.09%)
Mutual labels:  helper
advancedPermissionHandler
This Android library is for handle running time permissions in simplest way!
Stars: ✭ 13 (-70.45%)
Mutual labels:  helper
Has Parameters
A trait that allows you to pass arguments to Laravel middleware in a more PHP'ish way.
Stars: ✭ 149 (+238.64%)
Mutual labels:  helper
MVPHelper
Base classes for quick and easy implementation of MVP for Android applications.
Stars: ✭ 17 (-61.36%)
Mutual labels:  helper
libimobiledevice-glue
A library with common code used by libraries and tools around the libimobiledevice project
Stars: ✭ 46 (+4.55%)
Mutual labels:  helper
AirPodsDesktop
☄️ AirPods desktop user experience enhancement program, for Windows and Linux (WIP)
Stars: ✭ 462 (+950%)
Mutual labels:  helper
CaptCC
A tiny C compiler written purely in JavaScript.
Stars: ✭ 175 (+297.73%)
Mutual labels:  parsing

NFlags

Build Status NuGet License

Simple yet powerfull library to made parsing CLI arguments easy. Library also allow to print usage help and application version "out of box".

For example of usage check Examples directory.

QuickStart

  1. Install NFLags from NuGet.
  2. Start new console project.
  3. Configure NFLags:
Cli.Configure(configure => configure
    .SetDialect(Dialect.Gnu)
    .SetName("QuickStart")
    .SetDescription("This is NFlags")
    .EnableVersionOption()
)
.Root(rc => rc
    .RegisterFlag("flag1", "f", "Flag description", false)
    .RegisterOption("option", "o", "Option description", "optionDefaultValue")
    .RegisterParameter("param", "Param description", "ParamDefaultValue")
    .RegisterCommand("subcommand", "Subcommand Description", sc => sc
            .SetExecute((commandArgs, output) => output.WriteLine("This is subcommand: " + commandArgs.GetParameter<string>("SubParameter")))
            .RegisterParameter("SubParameter", "SubParameter description", "SubParameterValue")
    )
    .RegisterParamSeries("paramSeries", "paramSeriesDescription")
    .SetExecute((commandArgs, output) => output.WriteLine("This is root command: " + commandArgs.GetParameter<string>("param")))
).
Run(args);

Run application and enjoy:

$> dotnet NFlags.QuickStart.dll
This is root command: ParamDefaultValue%
$> dotnet NFlags.QuickStart.dll xxx
This is root command: xxx
$> dotnet NFlags.QuickStart.dll --help
Usage:
        QuickStart [COMMAND] [OPTIONS]... [PARAMETERS]...

This is NFlags

        Commands:
        command Sub command Description

        Parameters:
        <param> Param description (Default: 'ParamDefaultValue')
        <paramSeries...>        paramSeriesDescription

        Options:
        --flag1, -f     Flag description
        --option <option>, -o <option>  Option description (Default: 'optionDefaultValue')
        --help, -h      Prints this help
        --version, -v      Prints application version



$> dotnet NFlags.QuickStart.dll subcommand
This is subcommand: SubParameterValue
$> dotnet NFlags.QuickStart.dll subcommand yyy
This is subcommand: yyy
$> dotnet NFlags.QuickStart.dll command --help
Usage:
        QuickStart command [OPTIONS]... [PARAMETERS]...

This is NFlags

        Parameters:
        <Parameter>     Sub parameter description (Default: 'SubParameterValue')

        Options:
        --help, -h      Prints this help
        --version, -v      Prints application version

$> 

Documentation

See details on NFlags GitHub pages

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].