NFlags 1.6.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NFlags --version 1.6.0
NuGet\Install-Package NFlags -Version 1.6.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NFlags" Version="1.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NFlags --version 1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NFlags, 1.6.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NFlags as a Cake Addin #addin nuget:?package=NFlags&version=1.6.0 // Install NFlags as a Cake Tool #tool nuget:?package=NFlags&version=1.6.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NFlags
Simple yet powerfull library to made parsing CLI arguments easy. Library also allow to print usage help "out of box".
For example of usage check Examples directory.
QuickStart
- Install NFLags from NuGet.
- Start new console project.
- Configure NFLags:
NFlags.Configure(configure => configure
.SetDialect(Dialect.Gnu)
.SetName("QuickStart")
.SetDescription("This is NFlags")
)
.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] [FLAGS]... [OPTIONS]... [PARAMETERS]...
This is NFlags
Commands:
subcommand Subcommand Description
Flags:
--flag1, -f Flag description
--help, -h Prints this help
Options:
--option <option>, -o <option> Option description
Parameters:
<param> Param description
<paramSeries...> paramSeriesDescription
$> dotnet NFlags.QuickStart.dll subcommand
This is subcommand: SubParameterValue
$> dotnet NFlags.QuickStart.dll subcommand yyy
This is subcommand: yyy
$> dotnet NFlags.QuickStart.dll subcommand --help
Usage:
QuickStart [FLAGS]... [PARAMETERS]...
This is NFlags
Flags:
--help, -h Prints this help
Parameters:
<SubParameter> SubParameter description
$>
Documentation
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. net7.0-android was computed. 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. net8.0 was computed. net8.0-android was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (7)
Showing the top 5 NuGet packages that depend on NFlags:
Package | Downloads |
---|---|
NetMicro.RabbitMQ.NFlags
Package Description |
|
NetMicro.MongoDB.NFlags
Package Description |
|
NetMicro.Monitoring.Prometheus.NFlags
Package Description |
|
NetMicro.Auth.Jwt.NFlags
Package Description |
|
NetMicro.Consul.NFlags
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.10.0 | 1,093 | 12/20/2021 |
1.9.0 | 482 | 11/15/2020 |
1.8.0 | 697 | 3/15/2020 |
1.7.2 | 2,011 | 11/3/2019 |
1.7.1 | 5,424 | 6/27/2019 |
1.7.0 | 723 | 4/7/2019 |
1.6.0 | 757 | 2/18/2019 |
1.5.0 | 779 | 2/2/2019 |
1.4.0.1 | 833 | 11/16/2018 |
1.4.0 | 820 | 11/14/2018 |
1.3.1 | 844 | 11/9/2018 |
1.3.0 | 817 | 11/2/2018 |
1.2.1 | 876 | 8/22/2018 |
1.1.1 | 1,158 | 12/15/2017 |
1.1.0-rc | 1,356 | 11/3/2017 |
1.0.0 | 1,338 | 11/1/2017 |