Class TigerCliAppBuilder
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
Returns
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
namestringhandlerAction<TigerCliSettings>descriptionstring
Returns
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
namestringhandlerFunc<TigerCliExitKind>descriptionstring
Returns
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
namestringhandlerFunc<TigerCliSettings, TigerCliExitKind>descriptionstring
Returns
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
namestringhandlerFunc<TigerCliSettings, int>descriptionstring
Returns
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
namestringhandlerFunc<TigerCliSettings, Task<TigerCliExitKind>>descriptionstring
Returns
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
Returns
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
Returns
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
namestringhandlerFunc<Task<TigerCliExitKind>>descriptionstring
Returns
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
Returns
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
import → card 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
aliasstring- The single-token alias name. Multi-token aliases are not supported, and
tokens must not start with
-. targetCommandPathstring- 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. configureAction<TigerCliCommandAliasBuilder>- Optional alias presentation configuration.
Returns
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
namestringconfigureAction<TigerCliCommandGroupBuilder>
Returns
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
namestringconfigureAction<TigerCliCommandBuilder>descriptionstringdescriptionResourceKeystring
Returns
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
namestringfactoryFunc<THandler>configureAction<TigerCliCommandBuilder>descriptionstringdescriptionResourceKeystring
Returns
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
Returns
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
Returns
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
contributionITigerCliAppContribution- The reusable contribution the host app chooses to enable.
Returns
- TigerCliAppBuilder
- This builder for chaining.
Exceptions
- ArgumentNullException
contributionisnull.
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
copyrightstring
Returns
Exceptions
- ArgumentException
copyrightis 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
Returns
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
handlerAction<TigerCliSettings>descriptionstring
Returns
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
handlerFunc<TigerCliExitKind>descriptionstring
Returns
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
handlerFunc<TigerCliSettings, TigerCliExitKind>descriptionstring
Returns
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
handlerFunc<TigerCliSettings, int>descriptionstring
Returns
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
handlerFunc<TigerCliSettings, Task<TigerCliExitKind>>descriptionstring
Returns
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
handlerFunc<TigerCliSettings, Task<int>>descriptionstring
Returns
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
Returns
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
handlerFunc<Task<TigerCliExitKind>>descriptionstring
Returns
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
Returns
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
descriptionstring- 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.
resourceKeystring- 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
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
urlstring
Returns
Exceptions
- ArgumentException
urlis 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
namestring- The environment variable name.
descriptionstring- The help description. TigerCli markup is supported.
Returns
- TigerCliAppBuilder
- This builder for chaining.
Exceptions
- ArgumentException
nameordescriptionis null, empty, or whitespace, ornamecontains whitespace.- InvalidOperationException
nameduplicates another app-wide environment variable.
AddLink(string, string)
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
Returns
Exceptions
- ArgumentException
labelorurlis 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
urlstring
Returns
Exceptions
- ArgumentException
urlis 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
urlstring
Returns
Exceptions
- ArgumentException
urlis 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
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
configureAction<TigerCliPromptConfiguration<TSettings>>
Returns
Type Parameters
TSettings
Exceptions
- ArgumentNullException
configureisnull.
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
configureAction<TigerCliProviderConfiguration>
Returns
Exceptions
- ArgumentNullException
configureisnull.
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
configureAction<TigerThemeConfiguration>
Returns
DisableCultureOption()
Disables the framework-owned
--culture option. By default, the
option is available and selects among configured supported cultures.public TigerCliAppBuilder DisableCultureOption()
Returns
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
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
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
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
categoryTigerCliExitCategoryexitCodeint
Returns
ExitCategory<TExitCode>(TigerCliExitCategory, TExitCode)
Enum-backed overload of ExitCategory(TigerCliExitCategory, int).
public TigerCliAppBuilder ExitCategory<TExitCode>(TigerCliExitCategory category, TExitCode exitCode) where TExitCode : struct, Enum
Parameters
categoryTigerCliExitCategoryexitCodeTExitCode
Returns
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
kindTigerCliExitKindexitCodeint
Returns
ExitKind<TExitCode>(TigerCliExitKind, TExitCode)
Enum-backed overload of ExitKind(TigerCliExitKind, int).
public TigerCliAppBuilder ExitKind<TExitCode>(TigerCliExitKind kind, TExitCode exitCode) where TExitCode : struct, Enum
Parameters
kindTigerCliExitKindexitCodeTExitCode
Returns
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
startTigerCliExitKindendTigerCliExitKindfirstExitCodeint
Returns
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
startTigerCliExitKindendTigerCliExitKindfirstExitCodeTExitCode
Returns
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
namestring
Returns
Exceptions
- ArgumentNullException
nameisnull.
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
modeCliColorMode
Returns
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
Returns
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
modeTigerCliPromptMode
Returns
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
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
factoryFunc<THandler>
Returns
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
cultureNamestring
Returns
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
detailsCliTableStylePresetlistCliTableStylePresettableCliTableStylePreset?
Returns
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
modeTigerCliPromptMode
Returns
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
displayNamestring
Returns
Exceptions
- ArgumentException
displayNameis 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
Returns
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
cultureNamesstring[]
Returns
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
versionstring- The short version shown by
--version; must not be null/empty/whitespace. productVersionstring- Optional full version shown by
--version-full; defaults toversion.
Returns
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
resourceManagerResourceManager
Returns
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
enableVersionbool
Returns
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
Returns
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
assemblyisnull.
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
enableVersionbool
Returns
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
modeCommandMenuMode- 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).
commandNamestring- 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.
descriptionstring- Optional help/description text for a named menu command.
descriptionResourceKeystring- Optional resource key for
description.
Returns
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
Returns
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
successCodeTExitCodeerrorCodeTExitCode
Returns
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
folderBrowserIFolderBrowser
Returns
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()