Table of Contents

Class TigerCliAppBuilder

Namespace
ItTiger.TigerCli.Commands
Assembly
ItTiger.TigerCli.dll
Fluent builder for a TigerCliApp, obtained from CreateBuilder(). Configures app metadata, commands and command groups, interaction/prompt modes, app contributions, providers, environment-variable help metadata, themes, cultures, and exit-code policy; call Build() to produce the immutable app. All configuration methods return this builder for chaining.
public sealed class TigerCliAppBuilder
Inheritance
TigerCliAppBuilder
Inherited Members

Methods

AddCommand(string, Action, string?)

Registers a parameterless delegate as a flat named command. Delegate commands are intended for tiny utilities, demos, smoke apps, and simple automation; use command handler and settings classes when the command needs binding, prompting, providers, or reusable behavior. A normally completed action resolves through the app's success exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Action handler, string? description = null)

Parameters

name string
handler Action
description string

Returns

TigerCliAppBuilder

AddCommand(string, Action<TigerCliSettings>, string?)

Registers a settings-aware action as a flat named delegate command. The action receives the framework-created TigerCliSettings instance and successful completion resolves through the app's success exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Action<TigerCliSettings> handler, string? description = null)

Parameters

name string
handler Action<TigerCliSettings>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<TigerCliExitKind>, string?)

Registers an exit-kind-returning delegate as a flat named command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Func<TigerCliExitKind> handler, string? description = null)

Parameters

name string
handler Func<TigerCliExitKind>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<TigerCliSettings, TigerCliExitKind>, string?)

Registers a settings-aware exit-kind-returning delegate as a flat named command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Func<TigerCliSettings, TigerCliExitKind> handler, string? description = null)

Parameters

name string
handler Func<TigerCliSettings, TigerCliExitKind>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<TigerCliSettings, int>, string?)

Registers a settings-aware raw-integer-returning delegate as a flat named command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddCommand(string name, Func<TigerCliSettings, int> handler, string? description = null)

Parameters

name string
handler Func<TigerCliSettings, int>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<TigerCliSettings, Task<TigerCliExitKind>>, string?)

Registers an asynchronous, settings-aware exit-kind-returning delegate as a flat named command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Func<TigerCliSettings, Task<TigerCliExitKind>> handler, string? description = null)

Parameters

name string
handler Func<TigerCliSettings, Task<TigerCliExitKind>>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<TigerCliSettings, Task<int>>, string?)

Registers an asynchronous, settings-aware raw-integer-returning delegate as a flat named command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddCommand(string name, Func<TigerCliSettings, Task<int>> handler, string? description = null)

Parameters

name string
handler Func<TigerCliSettings, Task<int>>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<int>, string?)

Registers a raw-integer-returning delegate as a flat named command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddCommand(string name, Func<int> handler, string? description = null)

Parameters

name string
handler Func<int>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<Task<TigerCliExitKind>>, string?)

Registers an asynchronous exit-kind-returning delegate as a flat named command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddCommand(string name, Func<Task<TigerCliExitKind>> handler, string? description = null)

Parameters

name string
handler Func<Task<TigerCliExitKind>>
description string

Returns

TigerCliAppBuilder

AddCommand(string, Func<Task<int>>, string?)

Registers an asynchronous raw-integer-returning delegate as a flat named command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddCommand(string name, Func<Task<int>> handler, string? description = null)

Parameters

name string
handler Func<Task<int>>
description string

Returns

TigerCliAppBuilder

AddCommandAlias(string, string, Action<TigerCliCommandAliasBuilder>?)

Registers a root-level alias: an alternate single-token entry point that maps to an existing command path (for example importcard ingest). Commands resolve first; aliases are consulted only when no command path matches. The alias owns no handler, settings, or providers — the target command owns parsing, prompting, validation, and execution. Through configure the alias may own its own description, help visibility, and command-menu opinion.
public TigerCliAppBuilder AddCommandAlias(string alias, string targetCommandPath, Action<TigerCliCommandAliasBuilder>? configure = null)

Parameters

alias string
The single-token alias name. Multi-token aliases are not supported, and tokens must not start with -.
targetCommandPath string
The existing command path the alias maps to, such as card ingest. Validated against the resolved command tree at Build() time; it must name a command, not a command group.
configure Action<TigerCliCommandAliasBuilder>
Optional alias presentation configuration.

Returns

TigerCliAppBuilder

AddCommandGroup(string, Action<TigerCliCommandGroupBuilder>)

Adds a command group: a command-path prefix that owns a set of child commands. The name is the group prefix and is chosen by the consuming app. Commands added through configure behave like normal commands whose path begins with that prefix, so parsing, binding, help and execution stay on the same pipeline. Top-level help lists the group as a single entry; the group's own help lists its child commands and any nested subgroups registered via AddCommandGroup(string, Action<TigerCliCommandGroupBuilder>).
public TigerCliAppBuilder AddCommandGroup(string name, Action<TigerCliCommandGroupBuilder> configure)

Parameters

name string
configure Action<TigerCliCommandGroupBuilder>

Returns

TigerCliAppBuilder

AddCommand<THandler>(string, Action<TigerCliCommandBuilder>?, string?, string?)

Registers a named command and configures metadata for that registration.
public TigerCliAppBuilder AddCommand<THandler>(string name, Action<TigerCliCommandBuilder>? configure, string? description = null, string? descriptionResourceKey = null) where THandler : class, new()

Parameters

name string
configure Action<TigerCliCommandBuilder>
description string
descriptionResourceKey string

Returns

TigerCliAppBuilder

Type Parameters

THandler

AddCommand<THandler>(string, Func<THandler>, Action<TigerCliCommandBuilder>?, string?, string?)

Registers a named command created by factory and configures metadata for that registration.
public TigerCliAppBuilder AddCommand<THandler>(string name, Func<THandler> factory, Action<TigerCliCommandBuilder>? configure, string? description = null, string? descriptionResourceKey = null) where THandler : class

Parameters

name string
factory Func<THandler>
configure Action<TigerCliCommandBuilder>
description string
descriptionResourceKey string

Returns

TigerCliAppBuilder

Type Parameters

THandler

AddCommand<THandler>(string, Func<THandler>, string?, string?)

Registers a named command created by factory. Command factories let a top-level command receive constructor dependencies without a DI container, mirroring the command-group factory overload. The non-factory overloads keep the parameterless-constructor model.
public TigerCliAppBuilder AddCommand<THandler>(string name, Func<THandler> factory, string? description = null, string? descriptionResourceKey = null) where THandler : class

Parameters

name string
factory Func<THandler>
description string
descriptionResourceKey string

Returns

TigerCliAppBuilder

Type Parameters

THandler

AddCommand<THandler>(string, string?, string?)

Registers a named command. description is the fallback help text; descriptionResourceKey, when provided and registered via UseAppResources(ResourceManager), is resolved against the active run culture at help-render time. Missing keys silently fall back to description.
public TigerCliAppBuilder AddCommand<THandler>(string name, string? description = null, string? descriptionResourceKey = null) where THandler : class, new()

Parameters

name string
description string
descriptionResourceKey string

Returns

TigerCliAppBuilder

Type Parameters

THandler

AddContribution(ITigerCliAppContribution)

Registers reusable app-wide configuration supplied by contribution. The contribution is configured when Build() runs, so invalid, duplicate, reserved, or conflicting contributed global option or environment-variable names fail during app construction.
public TigerCliAppBuilder AddContribution(ITigerCliAppContribution contribution)

Parameters

contribution ITigerCliAppContribution
The reusable contribution the host app chooses to enable.

Returns

TigerCliAppBuilder
This builder for chaining.

Exceptions

ArgumentNullException
contribution is null.

AddCopyright(string)

Overrides the copyright text shown in the help footer. For a normal app, prefer the project's Copyright property via UseAssemblyMetadata(Assembly, bool); use this override only when the footer copyright must differ, or in tests and small examples.
public TigerCliAppBuilder AddCopyright(string copyright)

Parameters

copyright string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
copyright is null, empty, or whitespace.

AddDefaultCommand(Action, string?)

Registers a parameterless delegate as the default command. Delegate commands are intended for tiny utilities, demos, smoke apps, and simple automation; use command handler and settings classes when the command needs binding, prompting, providers, or reusable behavior. A normally completed action resolves through the app's success exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Action handler, string? description = null)

Parameters

handler Action
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Action<TigerCliSettings>, string?)

Registers a settings-aware action as the default delegate command. The action receives the framework-created TigerCliSettings instance and successful completion resolves through the app's success exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Action<TigerCliSettings> handler, string? description = null)

Parameters

handler Action<TigerCliSettings>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<TigerCliExitKind>, string?)

Registers an exit-kind-returning delegate as the default command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Func<TigerCliExitKind> handler, string? description = null)

Parameters

handler Func<TigerCliExitKind>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<TigerCliSettings, TigerCliExitKind>, string?)

Registers a settings-aware exit-kind-returning delegate as the default command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Func<TigerCliSettings, TigerCliExitKind> handler, string? description = null)

Parameters

handler Func<TigerCliSettings, TigerCliExitKind>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<TigerCliSettings, int>, string?)

Registers a settings-aware raw-integer-returning delegate as the default command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddDefaultCommand(Func<TigerCliSettings, int> handler, string? description = null)

Parameters

handler Func<TigerCliSettings, int>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<TigerCliSettings, Task<TigerCliExitKind>>, string?)

Registers an asynchronous, settings-aware exit-kind-returning delegate as the default command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Func<TigerCliSettings, Task<TigerCliExitKind>> handler, string? description = null)

Parameters

handler Func<TigerCliSettings, Task<TigerCliExitKind>>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<TigerCliSettings, Task<int>>, string?)

Registers an asynchronous, settings-aware raw-integer-returning delegate as the default command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddDefaultCommand(Func<TigerCliSettings, Task<int>> handler, string? description = null)

Parameters

handler Func<TigerCliSettings, Task<int>>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<int>, string?)

Registers a raw-integer-returning delegate as the default command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddDefaultCommand(Func<int> handler, string? description = null)

Parameters

handler Func<int>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<Task<TigerCliExitKind>>, string?)

Registers an asynchronous exit-kind-returning delegate as the default command. The returned TigerCliExitKind is resolved through the app's exit-code policy.
public TigerCliAppBuilder AddDefaultCommand(Func<Task<TigerCliExitKind>> handler, string? description = null)

Parameters

handler Func<Task<TigerCliExitKind>>
description string

Returns

TigerCliAppBuilder

AddDefaultCommand(Func<Task<int>>, string?)

Registers an asynchronous raw-integer-returning delegate as the default command. The returned integer is used as the process exit code without exit-policy remapping.
public TigerCliAppBuilder AddDefaultCommand(Func<Task<int>> handler, string? description = null)

Parameters

handler Func<Task<int>>
description string

Returns

TigerCliAppBuilder

AddDescription(string, string?)

Sets an optional description for the application, displayed in help output. The description may contain TigerCli markup.
public TigerCliAppBuilder AddDescription(string description, string? resourceKey = null)

Parameters

description string
Fallback description used when no resource key is provided, when no ResourceManager is registered via UseAppResources(ResourceManager), or when the resource key fails to resolve.
resourceKey string
Optional resource key resolved through the registered app ResourceManager against the active run culture. Missing keys silently fall back to description; the raw key is never shown.

Returns

TigerCliAppBuilder

AddDocumentation(string)

Adds or replaces the standard help-footer documentation link, using the localized framework label "Documentation". For a normal app, prefer the project's PackageProjectUrl (surfaced as a Documentation or PackageProjectUrl AssemblyMetadataAttribute) via UseAssemblyMetadata(Assembly, bool); use this override to set or replace the link explicitly. This overrides any documentation/project URL read from assembly metadata.
public TigerCliAppBuilder AddDocumentation(string url)

Parameters

url string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
url is null, empty, or whitespace.

AddEnvironmentVariable(string, string)

Adds app-wide help metadata for an environment variable recognized by the application. TigerCli displays the name and description in root, group, and command --help-env output; it does not read, parse, or apply the variable.
public TigerCliAppBuilder AddEnvironmentVariable(string name, string description)

Parameters

name string
The environment variable name.
description string
The help description. TigerCli markup is supported.

Returns

TigerCliAppBuilder
This builder for chaining.

Exceptions

ArgumentException
name or description is null, empty, or whitespace, or name contains whitespace.
InvalidOperationException
name duplicates another app-wide environment variable.
Adds a help-footer link with an app-owned label and a visible/copyable url, rendered with TigerCli link styling.
public TigerCliAppBuilder AddLink(string label, string url)

Parameters

label string
url string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
label or url is null, empty, or whitespace.

AddRepository(string)

Adds or replaces the standard help-footer source-code link, using the localized framework label "Source code". For a normal app, prefer the project's RepositoryUrl (surfaced as a RepositoryUrl AssemblyMetadataAttribute) via UseAssemblyMetadata(Assembly, bool); use this override to set or replace the link explicitly. This overrides any repository/source-code link read from assembly metadata.
public TigerCliAppBuilder AddRepository(string url)

Parameters

url string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
url is null, empty, or whitespace.

AddWebsite(string)

Adds or replaces the standard help-footer website link, using the localized framework label "Website". For a normal app, prefer emitting the URL as assembly metadata (for example a Website AssemblyMetadataAttribute) and calling UseAssemblyMetadata(Assembly, bool); use this override to set or replace the link explicitly. This overrides any website link read from assembly metadata.
public TigerCliAppBuilder AddWebsite(string url)

Parameters

url string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
url is null, empty, or whitespace.

Build()

Validates the configuration and produces the immutable TigerCliApp. Cross-cutting registration conflicts are detected here rather than at registration time — e.g. a default command menu combined with a default command, a command-menu name colliding with a command path, an alias whose path conflicts with commands/groups/aliases or whose target does not name an existing command, or duplicate environment-variable metadata in an effective help scope.
public TigerCliApp Build()

Returns

TigerCliApp

Exceptions

InvalidOperationException
The configuration contains conflicting or unresolved registrations.

ConfigurePrompts<TSettings>(Action<TigerCliPromptConfiguration<TSettings>>)

Compatibility surface for older property-targeted provider-backed prompt registration. Prefer ConfigureProviders(Action<TigerCliProviderConfiguration>) or the group/command AddProvider / AddAsyncProvider registrations for new code.
public TigerCliAppBuilder ConfigurePrompts<TSettings>(Action<TigerCliPromptConfiguration<TSettings>> configure) where TSettings : TigerCliSettings

Parameters

configure Action<TigerCliPromptConfiguration<TSettings>>

Returns

TigerCliAppBuilder

Type Parameters

TSettings

Exceptions

ArgumentNullException
configure is null.

ConfigureProviders(Action<TigerCliProviderConfiguration>)

Configures app-level named dynamic value providers, used by provider-backed prompts and by validation of supplied provider-backed values. See TigerCliProviderConfiguration for the registration surface. May be called multiple times; registrations accumulate.
public TigerCliAppBuilder ConfigureProviders(Action<TigerCliProviderConfiguration> configure)

Parameters

configure Action<TigerCliProviderConfiguration>

Returns

TigerCliAppBuilder

Exceptions

ArgumentNullException
configure is null.

ConfigureThemes(Action<TigerThemeConfiguration>)

Configures the app's theme/style/colour-alias policy: add custom themes, disable framework themes, register raw colour aliases, and register custom semantic styles. The application owns this policy; opt-in theme/style libraries expose their own extension methods on TigerThemeConfiguration, and nothing is registered unless invoked here. May be called multiple times; each call further configures the same app-scoped registry.
public TigerCliAppBuilder ConfigureThemes(Action<TigerThemeConfiguration> configure)

Parameters

configure Action<TigerThemeConfiguration>

Returns

TigerCliAppBuilder

DisableCultureOption()

Disables the framework-owned --culture option. By default, the option is available and selects among configured supported cultures.
public TigerCliAppBuilder DisableCultureOption()

Returns

TigerCliAppBuilder

DisableProcessCancellation()

Disables TigerCli-managed process/system cancellation handling. By default TigerCli registers cooperative handlers for Ctrl-C / SIGINT, SIGTERM, and (where supported) SIGQUIT at run start, in both interaction modes, so those signals surface as SystemCancel through the prompt/modal pipeline, reach headless activity execution, and are observable by the handler through CancellationToken — letting the run end with an app-defined exit code instead of abrupt termination. A second signal escalates to default termination so a non-cooperative process stays killable. Call this when the host owns signal handling itself; CancellationToken then carries only the caller's RunAsync token.
public TigerCliAppBuilder DisableProcessCancellation()

Returns

TigerCliAppBuilder

DisableSpinnerTitlePrefix()

Disables prepending active SpinnerTicker frames to the terminal window title. The base app/command title is still written unless terminal title management is disabled.
public TigerCliAppBuilder DisableSpinnerTitlePrefix()

Returns

TigerCliAppBuilder

DisableTerminalTitleManagement()

Disables TigerCli-managed terminal window title updates for the app run. When disabled, app titles, command title metadata, and spinner title prefixing are all skipped.
public TigerCliAppBuilder DisableTerminalTitleManagement()

Returns

TigerCliAppBuilder

ExitCategory(TigerCliExitCategory, int)

Overrides the exit code for every framework kind in category. Beats the outcome baseline; loses to ExitRange(TigerCliExitKind, TigerCliExitKind, int) and ExitKind(TigerCliExitKind, int). Refines the current exit-code policy (the framework default baseline when UseExitCodes has not been called).
public TigerCliAppBuilder ExitCategory(TigerCliExitCategory category, int exitCode)

Parameters

category TigerCliExitCategory
exitCode int

Returns

TigerCliAppBuilder

ExitCategory<TExitCode>(TigerCliExitCategory, TExitCode)

public TigerCliAppBuilder ExitCategory<TExitCode>(TigerCliExitCategory category, TExitCode exitCode) where TExitCode : struct, Enum

Parameters

category TigerCliExitCategory
exitCode TExitCode

Returns

TigerCliAppBuilder

Type Parameters

TExitCode

ExitKind(TigerCliExitKind, int)

Overrides the exit code for a single framework kind. Beats range, category, and baseline.
public TigerCliAppBuilder ExitKind(TigerCliExitKind kind, int exitCode)

Parameters

kind TigerCliExitKind
exitCode int

Returns

TigerCliAppBuilder

ExitKind<TExitCode>(TigerCliExitKind, TExitCode)

Enum-backed overload of ExitKind(TigerCliExitKind, int).
public TigerCliAppBuilder ExitKind<TExitCode>(TigerCliExitKind kind, TExitCode exitCode) where TExitCode : struct, Enum

Parameters

kind TigerCliExitKind
exitCode TExitCode

Returns

TigerCliAppBuilder

Type Parameters

TExitCode

ExitRange(TigerCliExitKind, TigerCliExitKind, int)

Maps the inclusive band of framework kinds [start, end] (by declared value) to consecutive exit codes starting at firstExitCode. Beats category and baseline; loses to ExitKind(TigerCliExitKind, int). The band is bounded strictly by the explicit start and end; throws when start comes after end or either is undefined.
public TigerCliAppBuilder ExitRange(TigerCliExitKind start, TigerCliExitKind end, int firstExitCode)

Parameters

start TigerCliExitKind
end TigerCliExitKind
firstExitCode int

Returns

TigerCliAppBuilder

ExitRange<TExitCode>(TigerCliExitKind, TigerCliExitKind, TExitCode)

Enum-backed overload of ExitRange(TigerCliExitKind, TigerCliExitKind, int). Each following kind maps to the next underlying enum value (firstExitCode + 1, + 2, …); the offsets are arithmetic on the underlying value and need not be defined members of TExitCode.
public TigerCliAppBuilder ExitRange<TExitCode>(TigerCliExitKind start, TigerCliExitKind end, TExitCode firstExitCode) where TExitCode : struct, Enum

Parameters

start TigerCliExitKind
end TigerCliExitKind
firstExitCode TExitCode

Returns

TigerCliAppBuilder

Type Parameters

TExitCode

SetApplicationName(string)

Overrides the command/executable name used in usage output. For a normal executable app, prefer setting the project's AssemblyName and calling UseAssemblyMetadata(Assembly, bool): the assembly name is the natural source for the command name and also controls the produced executable name, so setting the name here as well risks drifting from the real executable. Use this override only when the CLI command name must intentionally differ from the assembly name, or in tests and small synthetic examples.
public TigerCliAppBuilder SetApplicationName(string name)

Parameters

name string

Returns

TigerCliAppBuilder

Exceptions

ArgumentNullException
name is null.

SetColorMode(CliColorMode)

Sets the default CliColorMode for the app. Applied to ColorMode at run time unless overridden by the framework --color / --no-color option. Defaults to Auto.
public TigerCliAppBuilder SetColorMode(CliColorMode mode)

Parameters

mode CliColorMode

Returns

TigerCliAppBuilder

SetCommandInteractionMode<THandler>(TigerCliInteractionMode)

Configures a command-level interaction mode override for the command handled by THandler, taking precedence over the app-level mode.
public TigerCliAppBuilder SetCommandInteractionMode<THandler>(TigerCliInteractionMode mode) where THandler : class, new()

Parameters

mode TigerCliInteractionMode

Returns

TigerCliAppBuilder

Type Parameters

THandler

SetCommandPromptMode<THandler>(TigerCliPromptMode)

Configures a type-level prompt mode override for the command handled by THandler, taking precedence over group- and app-level prompt modes.
public TigerCliAppBuilder SetCommandPromptMode<THandler>(TigerCliPromptMode mode) where THandler : class

Parameters

mode TigerCliPromptMode

Returns

TigerCliAppBuilder

Type Parameters

THandler

SetDefaultCommand<THandler>()

Registers the default command — the handler that runs when no command name is supplied. The handler is created with its parameterless constructor; use the factory overload for constructor dependencies.
public TigerCliAppBuilder SetDefaultCommand<THandler>() where THandler : class, new()

Returns

TigerCliAppBuilder

Type Parameters

THandler

SetDefaultCommand<THandler>(Func<THandler>)

Registers the default command created by factory. This mirrors the command-group factory overload for the app's default/top-level command, letting a default command receive constructor dependencies without a DI container. The parameterless overload SetDefaultCommand<THandler>() keeps the new-constructor model.
public TigerCliAppBuilder SetDefaultCommand<THandler>(Func<THandler> factory) where THandler : class

Parameters

factory Func<THandler>

Returns

TigerCliAppBuilder

Type Parameters

THandler

SetDefaultCulture(string)

Sets the default UI culture for framework-owned strings. The default culture is always implicitly part of the supported set.
public TigerCliAppBuilder SetDefaultCulture(string cultureName)

Parameters

cultureName string

Returns

TigerCliAppBuilder

SetDefaultOutputPresets(CliTableStylePreset, CliTableStylePreset, CliTableStylePreset?)

Sets app-level default table style presets for structured output builders. These defaults are used only during this app's run, and only when an individual CliDetails, CliList<T>, or direct CliTable has not applied its own preset/style.
public TigerCliAppBuilder SetDefaultOutputPresets(CliTableStylePreset details, CliTableStylePreset list, CliTableStylePreset? table = null)

Parameters

details CliTableStylePreset
list CliTableStylePreset
table CliTableStylePreset?

Returns

TigerCliAppBuilder

SetDefaultPromptMode(TigerCliPromptMode)

Configures the app-level default prompt mode, which decides which missing values are prompted for. The framework default is RequiredOnly.
public TigerCliAppBuilder SetDefaultPromptMode(TigerCliPromptMode mode)

Parameters

mode TigerCliPromptMode

Returns

TigerCliAppBuilder

SetDisplayName(string)

Overrides the human/product name used by display-oriented framework output such as --version. Falls back to the application name when neither this call nor assembly metadata supplies one. For a normal app, prefer the project's Product (or Title) property via UseAssemblyMetadata(Assembly, bool); use this override only when the display name must differ from the assembly product, or in tests and small examples.
public TigerCliAppBuilder SetDisplayName(string displayName)

Parameters

displayName string

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
displayName is null, empty, or whitespace.

SetInteractionMode(TigerCliInteractionMode)

Configures the app-level default interaction mode, which decides whether TigerCli may prompt or show TUI controls. The default is SemiInteractive.
public TigerCliAppBuilder SetInteractionMode(TigerCliInteractionMode mode)

Parameters

mode TigerCliInteractionMode

Returns

TigerCliAppBuilder

SetSupportedCultures(params string[])

Sets the supported UI cultures. If no default culture is configured, the first supported culture becomes the default. The default culture (whether explicit or implicit) is always included in the supported set.
public TigerCliAppBuilder SetSupportedCultures(params string[] cultureNames)

Parameters

cultureNames string[]

Returns

TigerCliAppBuilder

SetVersion(string, string?)

Overrides the short user-facing version, sets the product/informational version to productVersion ?? version, and enables the built-in global --version / --version-full options. For a normal app, prefer the project's Version / InformationalVersion via UseAssemblyMetadata(Assembly, bool) so the app and its assembly report one version; use this override only when the CLI version must differ, or in tests and small examples.
public TigerCliAppBuilder SetVersion(string version, string? productVersion = null)

Parameters

version string
The short version shown by --version; must not be null/empty/whitespace.
productVersion string
Optional full version shown by --version-full; defaults to version.

Returns

TigerCliAppBuilder

Exceptions

ArgumentException
A supplied value is null, empty, or whitespace.

UseAppResources(ResourceManager)

Registers an application-owned ResourceManager used to resolve TigerTextAttribute.ResourceKey / DescriptionResourceKey values on enum types and members. Lookups always pass the run's resolved CultureInfo; the framework never mutates CurrentUICulture for these.
public TigerCliAppBuilder UseAppResources(ResourceManager resourceManager)

Parameters

resourceManager ResourceManager

Returns

TigerCliAppBuilder

UseAssemblyMetadata(bool)

The recommended way for a normal executable app to supply its identity and product metadata: define it once in the project file (for example AssemblyName, Product, Description, Version, Copyright, RepositoryUrl, PackageProjectUrl) and import it here, instead of duplicating it with the manual builder setters. Reads default app metadata (application name, display name, description, version, copyright, and well-known links) from the entry assembly, falling back to TigerCli's own assembly when no entry assembly is available. Assembly metadata acts as defaults: explicit builder calls such as SetApplicationName(string) or SetVersion(string, string?) override assembly-provided values. enableVersion (default true) also enables the built-in --version / --version-full; passing false reads the version value without enabling the options.
public TigerCliAppBuilder UseAssemblyMetadata(bool enableVersion = true)

Parameters

enableVersion bool

Returns

TigerCliAppBuilder

Remarks

The assembly name supplies the application name. Display name comes from AssemblyProductAttribute then AssemblyTitleAttribute. Description comes from AssemblyDescriptionAttribute. Version comes from the simple part of AssemblyInformationalVersionAttribute InformationalVersion when possible, then the assembly name version, then unknown; product version uses the full informational version and falls back to the short version. Copyright comes from AssemblyCopyrightAttribute.

UseAssemblyMetadata(Assembly, bool)

Reads default app metadata from the provided assembly. See UseAssemblyMetadata(bool) for what is read and how explicit calls override it.
public TigerCliAppBuilder UseAssemblyMetadata(Assembly assembly, bool enableVersion = true)

Parameters

assembly Assembly
enableVersion bool

Returns

TigerCliAppBuilder

Remarks

Well-known AssemblyMetadataAttribute link keys are also read: Website as a website link; Documentation, ProjectUrl, and PackageProjectUrl as a documentation link; and Repository, RepositoryUrl, SourceCode, and SourceCodeUrl as a source-code link. Explicit calls to AddWebsite(string), AddDocumentation(string), and AddRepository(string) replace the corresponding assembly-derived standard link.

Exceptions

ArgumentNullException
assembly is null.

UseAssemblyMetadata<TMarker>(bool)

Reads default app metadata from typeof(TMarker).Assembly. Use the UseAssemblyMetadata(Assembly, bool) overload for static marker/factory classes, which cannot be type arguments.
public TigerCliAppBuilder UseAssemblyMetadata<TMarker>(bool enableVersion = true)

Parameters

enableVersion bool

Returns

TigerCliAppBuilder

Type Parameters

TMarker

UseCommandMenu(CommandMenuMode, string?, string?, string?)

Enables the discoverable command menu: a picker that lists eligible commands, lets the user choose one, then runs it through the normal parse/bind/prompt/validate/execute pipeline. The menu is a UX layer above prompting (the user knows the app and TigerCli helps choose the command); it is not a separate execution system.
public TigerCliAppBuilder UseCommandMenu(CommandMenuMode mode = CommandMenuMode.Enabled, string? commandName = null, string? description = null, string? descriptionResourceKey = null)

Parameters

mode CommandMenuMode
The app-level node in the eligibility chain. Enabled opts every command in (unless overridden below); Inherit turns the menu surface on but lists only commands/groups that opt in themselves; Disabled registers no menu command (the mode is still recorded for resolution).
commandName string
When null, the menu becomes the app's default/root command. When non-null, a root-level command with that name opens the menu. This API registers either a default or a named menu command, never both, and the null form conflicts with a configured default command.
description string
Optional help/description text for a named menu command.
descriptionResourceKey string
Optional resource key for description.

Returns

TigerCliAppBuilder

UseExitCodes(int, int)

Configures the raw-integer exit-code policy with its mandatory outcome baseline: every success outcome maps to successCode and every error outcome to errorCode. Refine with ExitCategory(TigerCliExitCategory, int), ExitRange(TigerCliExitKind, TigerCliExitKind, int), and ExitKind(TigerCliExitKind, int) directly on the builder chain. Resolution picks the most specific configured layer (kind → range → category → baseline), independent of configuration order.
public TigerCliAppBuilder UseExitCodes(int successCode, int errorCode)

Parameters

successCode int
errorCode int

Returns

TigerCliAppBuilder

UseExitCodes<TExitCode>(TExitCode, TExitCode)

Configures the enum-backed exit-code policy with its mandatory outcome baseline: every success outcome maps to successCode and every error outcome to errorCode. TExitCode is also registered as the documented exit-code enum for --help-errors. Refine with the enum-backed ExitCategory/ExitRange/ExitKind overloads directly on the builder chain.
public TigerCliAppBuilder UseExitCodes<TExitCode>(TExitCode successCode, TExitCode errorCode) where TExitCode : struct, Enum

Parameters

successCode TExitCode
errorCode TExitCode

Returns

TigerCliAppBuilder

Type Parameters

TExitCode

UseFolderBrowser(IFolderBrowser)

Overrides the filesystem source used by folder-picker prompts (options marked with TigerCliFolderSelectAttribute). Defaults to a real FileSystemFolderBrowser when not set. Primarily useful for tests or for sandboxing folder navigation to a controlled tree.
public TigerCliAppBuilder UseFolderBrowser(IFolderBrowser folderBrowser)

Parameters

folderBrowser IFolderBrowser

Returns

TigerCliAppBuilder

UseTigerCliExitKindExitCodes()

Uses each declared TigerCliExitKind numeric value directly as the process exit code and documents TigerCliExitKind through --help-errors. This compact policy is intended for small apps that do not need an app-specific exit enum. In particular, Success maps to 0 and HelpShown maps to 1. Later ExitCategory(TigerCliExitCategory, int), ExitRange(TigerCliExitKind, TigerCliExitKind, int), and ExitKind(TigerCliExitKind, int) calls may refine the policy normally.
public TigerCliAppBuilder UseTigerCliExitKindExitCodes()

Returns

TigerCliAppBuilder