API reference
Generated from the XML documentation of the four packages. Every public type and member is listed; this page says which namespace to open for what.
Ploch.CommandLine.Spectre
The core package, in five namespaces:
Ploch.CommandLine.Spectre— the entry point.AppBuilderwraps the host andSpectre.Console.Cli;ConfigureCommandAppreturns theICommandAppExecutorthat runs the application.ConsoleAppInfoandEnvironmentSettingsdescribe the application and the environment it runs in.Ploch.CommandLine.Spectre.Commands— what a command derives from and returns:AppCommand<TSettings>,AsyncAppCommand<TSettings>,ExitCode,IExceptionHandlerand the settings-processing pipeline (CommandArgumentsRootProcessor,TokensArgumentsProcessorand[SupportsTokens]).Ploch.CommandLine.Spectre.Output— the output pipeline:IOutput, the message formatters and writers behind it, and theAddMessageWriter/AddMessageFormatterregistration extensions.Ploch.CommandLine.Spectre.Configuration— the services bundles the builder registers by default.Ploch.CommandLine.Spectre.DependencyInjection— the Spectre type registrar and resolver backed byMicrosoft.Extensions.DependencyInjection, and the lifetime rules they apply.
Ploch.CommandLine.Spectre.Serilog
Ploch.CommandLine.Spectre.Serilog — opt-in Serilog logging:
UseSerilog on the builder,
AddSerilog on a service collection, the SerilogConfigurationBundle behind both, and
ConfigureSerilog for a LoggerConfiguration of your own.
Ploch.CommandLine.Spectre.FluentValidation
Ploch.CommandLine.Spectre.FluentValidation —
AddCommandLineSettingsFluentValidation, which registers
FluentCommandSettingsValidator<TSettings>
as the validator the command base classes call, and the services bundle it is built on.
Ploch.CommandLine.UseCases
Ploch.CommandLine.UseCases —
IUseCase<TRequest, TResponse>,
IResultUseCase<TRequest, TResponse> and
UseCaseAsyncCommand<...>, the command base
class that runs a result use case and maps its Ardalis.Result to output and an exit code.