Help system - adambajguz/Typin GitHub Wiki

Out of the box, Typin provides a built-in help and version options (--help and --version).

You can type --help or <command name> --help to get either full help/default command help or help for a specific command. Also shorter -h and <command name> -h alias is also available.

Custom help writer

You can also configure a custom help writer with: CliApplicationBuilder.UseHelpWriter.

Example

dotnet InteractiveModeExample.dll> --help
InteractiveModeExample v3.0.1

DESCRIPTION
  Default Command Description

USAGE
  dotnet InteractiveModeExample.dll [directives] [command] <values...> [options]

PARAMETERS
* values

OPTIONS
  -h|--help             Shows help text.
  --version             Shows version information.

SUPPORTED MODES
  Typin.Modes.DirectMode
  Typin.Modes.InteractiveMode

TIP: Commands and directives marked with @ cannot be executed in every mode in the app.

COMMANDS
  book                  List all books in the library.
  BOOK                  List all books in the library.
  ex                    Throws exception that cannot be handled.
  exi                   Throws exception with inner exception that cannot be handled.
@ interactive           Starts an interactive mode.
  long                  A long command.
  pipeline              Prints a middleware pipeline structure in application.
  plot xy               Prints a middleware pipeline structure in application.
  plot xyz
@ quit                  Quits the interactive mode
  services              Prints a list of registered services in application.
  test                  Test command.

TIP: You can run `[command] --help` to show help on a specific command.

DIRECTIVES
  [!]                   Executes a root or scoped command.
@ [.]                   Removes one command from the scope.
@ [..]                  Resets the scope to default value.
@ [>]                   Sets a scope to command(s).
@ [custom-interactive]  Custom interactive only directive.
  [debug]               Starts a debugging mode. Application will wait for debugger to be attached before proceeding.
@ [interactive]         Executs a command, then starts an interactive mode.
  [preview]             The app will short-circuit by printing consumed command line arguments as they were parsed.

MANUAL
  Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  Integer euismod nunc lorem, vitae cursus sem facilisis ut. Cras et nibh justo. Mauris eu elit lectus.

dotnet InteractiveModeExample.dll>
⚠️ **GitHub.com Fallback** ⚠️