Introduction
editMeziantou.Framework.CommandLine contains three small helpers for console applications. It is not a framework for command-line applications: there are no commands, no type conversion and no generated help. Use it when you need to read a few arguments, or build a command line for another program, without adding more structure to your application.
What you can do with it
- Read arguments: named arguments such as
/name=valueor-verbose, positional arguments, and the standard help switches. See Parsing arguments. - Quote arguments for Windows: build a command line that a Windows program, or
cmd.exe, splits back into the original arguments, whatever characters they contain. See Quoting arguments. - Ask yes/no questions in the console, with an optional default answer. See Prompts.
Namespace
All the types are in the Meziantou.Framework namespace:
| Type | Contains |
|---|---|
| CommandLineParser | The parser and the arguments it read |
| CommandLineBuilder | The methods that quote and escape arguments for Windows programs and cmd.exe |
| Prompt | The yes/no prompt |
Next steps
- Getting started: install the package and read the arguments of your application.