You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://gitter.im/gsscoder/commandline?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
6
7
-
Command Line Parser Library for CLR and NetStandard
8
-
===
7
+
# Command Line Parser Library for CLR and NetStandard
9
8
10
-
**Note:** the API surface has changed since 1.9.x and earlier. If you are looking for documentation on 1.9.x, please see [this branch](https://github.com/gsscoder/commandline/tree/stable-1.9.71.2)
9
+
**Note:** the API surface has changed since v1.9.x and earlier. If you are looking for documentation on v1.9.x, please see [stable-1.9.71.2](https://github.com/gsscoder/commandline/tree/stable-1.9.71.2)
11
10
12
11
The Command Line Parser Library offers CLR applications a clean and concise API for manipulating command line arguments and related tasks, such as defining switches, options and verb commands. It allows you to display a help screen with a high degree of customization and a simple way to report syntax errors to the end user.
13
12
14
13
```
15
14
C:\Project> Nuget Install CommandLineParser
15
+
```
16
16
17
17
or
18
18
19
+
```
19
20
C:\Project> paket install CommandLineParser
20
21
```
21
22
22
-
Everything that is boring and repetitive about parsing command line arguments is delegated to the library, letting developers concentrate on core logic. It's written in **C#** and doesn't depend on other packages.
23
-
24
23
__This library provides _hassle free_ command line parsing with a constantly updated API since 2005.__
25
24
26
25
Compatibility:
27
-
---
28
26
- .NET Framework 4.0+
29
27
- Mono 2.1+ Profile
30
28
- .Net Core
31
29
32
-
Current Release:
33
-
---
34
-
- For documentation please read appropriate [wiki section](https://github.com/gsscoder/commandline/wiki/Latest-Version).
35
-
- From version **2.0.x-pre+** parsing kernel was rewritten and public API simplified.
30
+
# At a glance:
36
31
37
-
At glance:
38
-
---
39
-
- One line parsing using default singleton: `CommandLine.Parser.Default.ParseArguments(...)`.
40
-
- Automatic or one line help screen generator: `HelpText.AutoBuild(...)`.
41
-
- Supports `--help`, `--version`, `version` and `help [verb]` by default.
42
-
- Map to sequences (`IEnumerable<T>`) or scalar types, including enum and `Nullable<T>`.
43
-
- You can also map to every type with a constructor that accepts a string (like `System.Uri`).
44
-
-__Plug-In friendly__ architecture as explained [here](https://github.com/gsscoder/commandline/wiki/Plug-in-Friendly-Architecture).
45
-
- Define [verb commands](https://github.com/gsscoder/commandline/wiki/Latest-Version#verbs) as `git commit -a`.
You can utilize the parser library in several ways:
66
50
67
-
To build:
68
-
---
69
-
-[FAKE](http://fsharp.github.io/FAKE/) Script
70
-
- MS Visual Studio
71
-
- Xamarin Studio
51
+
- Install via Nuget/Paket
52
+
- Integrate directly into your project by copying the .cs files into your project.
53
+
- ILMerge during your build process.
72
54
73
-
Public API:
74
-
---
75
-
Latest changes are recorded from Version 1.9.4.91, please refer to [this document](https://github.com/commandlineparser/commandline/blob/master/docs/PublicAPI.md).
55
+
See more details in the [wiki for direct integrations](https://github.com/gsscoder/commandline/wiki/Direct_Integrations)
76
56
77
-
Used by:
78
-
---
79
-
-[FSharp.Formatting](https://github.com/tpetricek/FSharp.Formatting) by @tpetricek.
80
-
-[MiniDumper](https://github.com/goldshtn/minidumper) by @goldshtn.
81
-
-[Google APIs Client Library for .NET](https://github.com/google/google-api-dotnet-client) by Google.
82
-
-[FSpec](https://github.com/PeteProgrammer/fspec) by @PeteProgrammer.
83
-
- Various commercial products.
57
+
## Quick Start Examples
84
58
85
-
Notes:
86
-
---
87
-
The project is well suited to be included in your application. If you don't merge it to your project tree, you must reference `CommandLine.dll` and import `CommandLine` and `CommandLine.Text` namespaces (or install via NuGet). The help text builder and support types are in the `CommandLine.Text` namespace that is loosely coupled with the parser. It is good to know that the `HelpText` class will avoid a lot of repetitive coding.
59
+
1. Create a class to define valid options, and to receive the parsed options.
60
+
2. Call ParseArguments with the args string array.
Thanks to JetBrains for providing an open source license for [ReSharper](http://www.jetbrains.com/resharper/).
242
223
243
-
Main Contributors (alphabetical order):
224
+
# Contibutors
225
+
First off, _Thank you!_ All contributions are welcome.
226
+
227
+
Please consider sticking with the GNU getopt standard for command line parsing.
228
+
229
+
Additionally, for easiest diff compares, please follow the project's tabs settings. Utilizing the EditorConfig extension for Visual Studio/your favorite IDE is recommended.
230
+
231
+
For more info, see the [wiki for details about contributing](https://github.com/gsscoder/commandline/wiki/Building_the_library) and for building the project.
0 commit comments