Skip to main content

TyperInfo

This class serves as a data container for storing configuration and metadata related to a Typer instance or command group. It encapsulates various settings such as command behavior, help text, and display options to facilitate the management of CLI structures. The class also supports specialized formatting options for integration with rich help panels.

Attributes

AttributeTypeDescription
typer_instance`TyperNone` = None
name`strNone` = None
cls`type[TyperGroup]None` = None
invoke_without_commandbool = FalseDetermines if the group callback should run even if no subcommand is provided.
no_args_is_helpbool = FalseIf set to True, the help screen is displayed automatically when the command is called without arguments.
subcommand_metavar`strNone` = None
chainbool = FalseEnables command chaining, allowing multiple subcommands to be executed in a single invocation.
result_callback`CallableNone` = None
context_settings`dictNone` = None
callback`CallableNone` = None
help`strNone` = None
epilog`strNone` = None
short_help`strNone` = None
options_metavarstr = "[OPTIONS]"The string used to represent options in the help text usage line.
add_help_optionbool = TrueControls whether the automatic help option (e.g., --help) is added to the command.
hiddenbool = FalseIf True, the command is excluded from the help output list while remaining executable.
deprecatedbool = FalseIf True, a deprecation warning is displayed when the command is used.
rich_help_panel`strNone` = None

Constructor

Signature

def TyperInfo(
typer_instance: Optional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None),
name: str | None = Default(None),
cls: type[[TyperGroup](../core/typergroup.md?sid=typer_core_typergroup)]| None = Default(None),
invoke_without_command: bool = Default(False),
no_args_is_help: bool = Default(False),
subcommand_metavar: str | None = Default(None),
chain: bool = Default(False),
result_callback: Callable[..., Any]| None = Default(None),
context_settings: dict[Any, Any]| None = Default(None),
callback: Callable[..., Any]| None = Default(None),
help: str | None = Default(None),
epilog: str | None = Default(None),
short_help: str | None = Default(None),
options_metavar: str = Default("[OPTIONS]"),
add_help_option: bool = Default(True),
hidden: bool = Default(False),
deprecated: bool = Default(False),
rich_help_panel: str | None = Default(None)
) - > null

Parameters

NameTypeDescription
typer_instanceOptional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None)An optional instance of Typer.
name`strNone` = Default(None)
cls`type[TyperGroup]None` = Default(None)
invoke_without_commandbool = Default(False)Whether to invoke the callback even if no subcommand is provided.
no_args_is_helpbool = Default(False)Whether to show help if no arguments are passed.
subcommand_metavar`strNone` = Default(None)
chainbool = Default(False)Whether to allow chaining multiple subcommands.
result_callback`Callable[..., Any]None` = Default(None)
context_settings`dict[Any, Any]None` = Default(None)
callback`Callable[..., Any]None` = Default(None)
help`strNone` = Default(None)
epilog`strNone` = Default(None)
short_help`strNone` = Default(None)
options_metavarstr = Default("[OPTIONS]")The metavar for options in help text.
add_help_optionbool = Default(True)Whether to automatically add a help option.
hiddenbool = Default(False)Whether to hide this command from help lists.
deprecatedbool = Default(False)Whether to mark this command as deprecated.
rich_help_panel`strNone` = Default(None)

Signature

def TyperInfo(
typer_instance: Optional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None),
name: str | None = Default(None),
cls: type[[TyperGroup](../core/typergroup.md?sid=typer_core_typergroup)]| None = Default(None),
invoke_without_command: bool = Default(False),
no_args_is_help: bool = Default(False),
subcommand_metavar: str | None = Default(None),
chain: bool = Default(False),
result_callback: Callable[..., Any]| None = Default(None),
context_settings: dict[Any, Any]| None = Default(None),
callback: Callable[..., Any]| None = Default(None),
help: str | None = Default(None),
epilog: str | None = Default(None),
short_help: str | None = Default(None),
options_metavar: str = Default("[OPTIONS]"),
add_help_option: bool = Default(True),
hidden: bool = Default(False),
deprecated: bool = Default(False),
rich_help_panel: str | None = Default(None)
) - > null

Parameters

NameTypeDescription
typer_instanceOptional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None)The Typer instance associated with this information object.
name`strNone` = Default(None)
cls`type[TyperGroup]None` = Default(None)
invoke_without_commandbool = Default(False)Whether to run the group callback even if no subcommand is provided.
no_args_is_helpbool = Default(False)Whether to display the help screen automatically if the command is called without arguments.
subcommand_metavar`strNone` = Default(None)
chainbool = Default(False)Whether to allow multiple subcommands to be chained together in a single execution.
result_callback`Callable[..., Any]None` = Default(None)
context_settings`dict[Any, Any]None` = Default(None)
callback`Callable[..., Any]None` = Default(None)
help`strNone` = Default(None)
epilog`strNone` = Default(None)
short_help`strNone` = Default(None)
options_metavarstr = Default("[OPTIONS]")The string used to represent options in the help text usage line.
add_help_optionbool = Default(True)Whether to automatically include the standard help option (-h, --help).
hiddenbool = Default(False)Whether to hide this command or group from the help output.
deprecatedbool = Default(False)Whether to mark this command as deprecated and show a warning in the help text.
rich_help_panel`strNone` = Default(None)