Skip to content

Features#

Feature
Commands
   Define commands as methods docs ✔️
      Parameter Resolvers
         Inject console and other contexts as a parameter:
         IConsole, CommandContext, CancellationToken & IPrompter by default.
docs ✔️
   Infinite nesting of subcommands docs ✔️
      Nested classes ✔️
      Composed classes ✔️
   Command interception
      interceptors for subcommands
      middleware for all commands
✔️
   Method interception
      CommandContext.InvocationPipeline to access method and params
✔️
Arguments
   Positional (Operands) docs ✔️
   Named (Options) docs ✔️
      short and long names: -h or --help, not /help ✔️
      flags: -a instead of -a true docs ✔️
      bundling/clubbing: -a -b -c or -abc docs ✔️
      value assignments: -a one, -a=one & -a:one docs ✔️
   Define arguments as parameters in methods docs ✔️
   Define arguments as properties in POCOs docs ✔️
Data Types
   Primitives, Enums & Nullable< T > docs ✔️
   Collections docs ✔️
   Dictionaries #251
   Password: mask value in logs and output with ***** docs ✔️
   Any type with a string constructor docs ✔️
   Any type with a TypeConverter docs ✔️
   Custom Type Descriptors
      Customize parsing and the type name shown in help and
docs ✔️
   Define allowed values by type
      Allowed values are shown in help and will soon be used for suggestions
docs ✔️
Argument Values
   Response Files docs ✔️
   Piped Input docs ✔️
      Streaming docs ✔️
   Prompts docs ✔️
      Hide passwords docs ✔️
      Multi-entry for collections docs ✔️
      Auto prompt for missing arguments (optional) docs ✔️
   Default from EnvVar docs ✔️
   Default from AppSetting docs ✔️
Validation
   FluentValidation for argument models docs ✔️
   Data Annotations #253
Help
   Autocomplete #48
   Typo suggestions docs ✔️
   Auto generated help
      Aliases: -? -h --help
docs ✔️
   Custom help generators docs ✔️
Diagnostics
   App Version
      _-v or --version
docs ✔️
   [debug] directive
      step into debugger
docs ✔️
   [parse] directive docs ✔️
      show final values ✔️
      show inputs and source
         original source of value, including response file paths
✔️
      show defaults and source
         including key if from EnvVar or AppSetting
✔️
   Command logging
      show parse output and optionally system info and app config
docs ✔️
Testing docs
   BDD Framework
      Test an app as if run from the console
✔️
   Supports parallel test
      the whole framework avoids static state to support parallel test runs
✔️
   TestConsole ✔️
   TestDependencyResolver
      new TestDependencyResolver{ dbSvc, httpSvc }
✔️
   TempFiles helper
      create and cleanup files used for tests
✔️
   Capture State
      Capture state within a run to help test custom middleware components
✔️
Dependency Injection docs
   MicrosoftDependencyInjection ✔️
   Autofac ✔️
   SimpleInjector ✔️
   Test injector docs ✔️
   Custom ✔️
Other
   Ctrl+C docs ✔️
   Name casing
      consistent name casing via Humanizer
docs ✔️
Extensibility
   Custom middleware docs ✔️
   Custom directives docs ✔️
   Custom token transformations docs ✔️
   Custom parameter resolvers docs ✔️