Introduction

edit

Meziantou.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=value or -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:

TypeContains
CommandLineParserThe parser and the arguments it read
CommandLineBuilderThe methods that quote and escape arguments for Windows programs and cmd.exe
PromptThe yes/no prompt

Next steps

  • Getting started: install the package and read the arguments of your application.