System.CommandLine Namespace

Provides types for defining commands, options, arguments, and their relationships in command-line applications.

Classes

Name Description
AliasedSet<T>
Argument

A symbol defining a value that can be passed on the command line to a command or option.

Argument<T>

A symbol defining a value that can be passed on the command line to a command or option.

ArgumentResult
ArgumentResultExtensions
ArgumentValidation

Provides extension methods for Argument.

Command

Represents a specific action that the application performs.

CommandExtensions
CommandLineConfiguration
CommandResult
CommandResultExtensions
CompletionSourceExtensions

Provides extension methods for working with completion sources.

DefaultHelpText
DefaultHelpText.AdditionalArguments
DefaultHelpText.Arguments
DefaultHelpText.Commands
DefaultHelpText.Options
DefaultHelpText.Usage
DiagramDirective

Enables the use of the [diagram] directive, which when specified on the command line will short circuit normal command handling and display a diagram explaining the parse result for the command line input.

Directive

Provides cross-cutting functionality that can apply across command-line apps.

EnvironmentVariablesDirective

Enables the use of the [env:key=value] directive, allowing environment variables to be set from the command line during invocation.

HelpBuilder
HelpBuilder.HelpItem
InvocationConfiguration
Option

A symbol defining a named parameter and a value for that parameter.

Option<T>

A symbol defining a named parameter and a value for that parameter.

OptionExtensions
OptionResult
OptionResultExtensions
OptionValidation

Provides extension methods for Option.

ParseError
Parser
ParserConfiguration

Represents the configuration used by the CommandLineParser.

ParseResult

Describes the results of parsing a command line input based on a specific parser configuration.

ParseResultExtensions
ParserExtensions
RootCommand

Represents the main action that the application performs.

StandardStreamWriter
StringExtensions
SuggestionSource
Symbol

Defines a named symbol that resides in a hierarchy with parent and child symbols.

SymbolCannotContainDelimiterArgumentException
SymbolResult
SymbolResultSet
SymbolSet
SystemConsole
TestConsole
Token
TokenizeError
TokenizeResult
ValidationMessages
VersionOption

Represents a standard option that indicates that version information should be displayed for the app.

Structs

Name Description
ArgumentArity

Defines the arity of an option or argument.

Interfaces

Name Description
IArgument
IArgumentArity
ICommand
IConsole
IDirectiveCollection
IHelpBuilder
IOption
IStandardError
IStandardIn
IStandardOut
IStandardStream
IStandardStreamReader
IStandardStreamWriter
ISuggestionSource
ISymbol
ISymbolSet

Enums

Name Description
ResponseFileHandling
TokenType

Delegates

Name Description
Suggest
TryConvertArgument
TryConvertArgument<T>
ValidateSymbol<T>