-
Notifications
You must be signed in to change notification settings - Fork 385
Home
Jon Sequeira edited this page Dec 19, 2018
·
30 revisions
Give your users a great experience with your .NET command line applications while letting you focus on the great application you're writing.
To do this, System.CommandLine
contains three pillars of functionality:
- Parsing. Parse command line input, validate it, and bind it to types beyond just strings.
- Middleware. A composable pipeline to provide features like suggestions, help, exception handling, and parse debugging.
- Rendering. Write code once that can render to multiple outputs (virtual terminal, Windows Console, and files or other redirected streams).
System.CommandLine
contains the base API which can support various application models to simplify working with the parser. You can also work directly with the the System.CommandLine
API. It contains the core functionality for parsing, binding input to your model, invoking your application logic, and providing shell completions based on your application's syntax.
The simplest way to create your parser is with the DragonFruit app model. This works well if you have a single layer of commands (no subcommands).