Command Line Parser
The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support (by commandlineparser)
CommandLineUtils
Command line parsing and utilities for .NET (by natemcmaster)
Our great sponsors
Command Line Parser | CommandLineUtils | |
---|---|---|
17 | 9 | |
4,397 | 2,166 | |
1.7% | - | |
0.0 | 4.6 | |
about 2 months ago | 25 days ago | |
C# | C# | |
MIT License | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Command Line Parser
Posts with mentions or reviews of Command Line Parser.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-09.
-
Parse CLI arguments in .NET
So after some research I found the awesome NuGet-Package Command Line Parser Library. This package allows to define your options with Property-Attributes.
- Is it possible to pass variables from PHP to a C# console app?
- How to generate a CLI interface for CRUD operations?
-
Made this a while ago and forgot to share it here -- ArgSharp, a simple and capable CLI argument parser
seems very similar to command line parser, btw good job
-
having trouble understanding the new "method chaining" syntax
The URL of the library is at https://github.com/commandlineparser/commandline. This project page has samples for VB.Net, along with other languages too.
-
IS there any way to change string[] args to an object on the fly?
How about https://github.com/commandlineparser/commandline ?
-
Developing and installing your own CLI with dotnet tool and CliFx NuGet package
This lib looks way better than the seemingly most popular one: https://github.com/commandlineparser/commandline Which is just a nightmare with terrible docs
- What's your favorite command line arg parser?
- What is your preferred way to roll for stats?
-
Reverse Engineering Keyboard Driver: Part 2 (Decompiling .NET applications)
CommandLineParser
CommandLineUtils
Posts with mentions or reviews of CommandLineUtils.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-08-16.
-
Enforcing command line arguments with CommandLineUtils?
The library doesn't support that format, here you can see that MultipleValues means for example "-o value1 -o value2" Options Support options with multiple values · Issue #311 · natemcmaster/CommandLineUtils · GitHub
-
How do I run a single .class file in C#?
You could roll your own with some command-line argument processing. You could write that yourself and use reflection, or for an example from a library I've used, example.
- Best way to build a console app with command line parser and dependency injection?
- Parsing the command line in the .NET 6 new console format?
- What's your favorite command line arg parser?
-
Writing tests for CLI tool
I want to test how my tools generated files and folders in the destination with different arguments passed to the program. However, in my old code, I put all the logic of working with arguments in the static int main( string[] args) function. I could not use Interface and Dependency injection to mock the CLI tools because CommandLineUtils does not have an interface library. Luckily, I found this guidance from the owner of CommandLineUtils, and he advised that "Split the command-line argument parser and application execution into separate class structures" to test various options programmatically. It is a great suggestion, and I rewrote my program by adding class CommandLineOptions and adding logic to class Generator to make it works with CommandLineOptions. I can kill two birds with one stone by this change: code refactoring and writing better tests. Another problem I had was my folder structure. Before, I put the project's sln file, .git file , and src files in the root of the folder. However, when I added a new test project for Shinny-SSG, I had it outside my git folder, and it would be impossible to commit the change and put it in my remote repository. To resolve this, I had to change my folder structure to this:
- Help with quite weird idea
- C# equivalent to Pythons cmd module?
-
Automatic .NET Versioning Tool
Thanks to https://github.com/natemcmaster/CommandLineUtils for supplying a lot of the command structures. If you're interested in creating your own dotnet tool, this is highly recommended.
What are some alternatives?
When comparing Command Line Parser and CommandLineUtils you can also consider the following projects:
Fluent Command Line Parser - A simple, strongly typed .NET C# command line parser library using a fluent easy to use interface
spectre.console - A .NET library that makes it easier to create beautiful console applications.
Gui.cs - Cross Platform Terminal UI toolkit for .NET
Power Args - The ultimate .NET Standard command line argument parser
Cocona - Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.
JustCli - Just a quick way to create your own command line tool
CliWrap - Library for running command-line processes
Sieve - ⚗️ Clean & extensible Sorting, Filtering, and Pagination for ASP.NET Core
Colorful.Console - Style your .NET console output!
Command Line Parser vs Fluent Command Line Parser
CommandLineUtils vs spectre.console
Command Line Parser vs spectre.console
CommandLineUtils vs Gui.cs
Command Line Parser vs Power Args
CommandLineUtils vs Fluent Command Line Parser
Command Line Parser vs Cocona
CommandLineUtils vs JustCli
Command Line Parser vs CliWrap
CommandLineUtils vs Sieve
Command Line Parser vs Gui.cs
CommandLineUtils vs Colorful.Console