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
| Attribute | Type | Description |
|---|---|---|
| typer_instance | `Typer | None` = None |
| name | `str | None` = None |
| cls | `type[TyperGroup] | None` = None |
| invoke_without_command | bool = False | Determines if the group callback should run even if no subcommand is provided. |
| no_args_is_help | bool = False | If set to True, the help screen is displayed automatically when the command is called without arguments. |
| subcommand_metavar | `str | None` = None |
| chain | bool = False | Enables command chaining, allowing multiple subcommands to be executed in a single invocation. |
| result_callback | `Callable | None` = None |
| context_settings | `dict | None` = None |
| callback | `Callable | None` = None |
| help | `str | None` = None |
| epilog | `str | None` = None |
| short_help | `str | None` = None |
| options_metavar | str = "[OPTIONS]" | The string used to represent options in the help text usage line. |
| add_help_option | bool = True | Controls whether the automatic help option (e.g., --help) is added to the command. |
| hidden | bool = False | If True, the command is excluded from the help output list while remaining executable. |
| deprecated | bool = False | If True, a deprecation warning is displayed when the command is used. |
| rich_help_panel | `str | None` = 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
| Name | Type | Description |
|---|---|---|
| typer_instance | Optional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None) | An optional instance of Typer. |
| name | `str | None` = Default(None) |
| cls | `type[TyperGroup] | None` = Default(None) |
| invoke_without_command | bool = Default(False) | Whether to invoke the callback even if no subcommand is provided. |
| no_args_is_help | bool = Default(False) | Whether to show help if no arguments are passed. |
| subcommand_metavar | `str | None` = Default(None) |
| chain | bool = 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 | `str | None` = Default(None) |
| epilog | `str | None` = Default(None) |
| short_help | `str | None` = Default(None) |
| options_metavar | str = Default("[OPTIONS]") | The metavar for options in help text. |
| add_help_option | bool = Default(True) | Whether to automatically add a help option. |
| hidden | bool = Default(False) | Whether to hide this command from help lists. |
| deprecated | bool = Default(False) | Whether to mark this command as deprecated. |
| rich_help_panel | `str | None` = 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
| Name | Type | Description |
|---|---|---|
| typer_instance | Optional[[Typer](../main/typer.md?sid=typer_main_typer)] = Default(None) | The Typer instance associated with this information object. |
| name | `str | None` = Default(None) |
| cls | `type[TyperGroup] | None` = Default(None) |
| invoke_without_command | bool = Default(False) | Whether to run the group callback even if no subcommand is provided. |
| no_args_is_help | bool = Default(False) | Whether to display the help screen automatically if the command is called without arguments. |
| subcommand_metavar | `str | None` = Default(None) |
| chain | bool = 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 | `str | None` = Default(None) |
| epilog | `str | None` = Default(None) |
| short_help | `str | None` = Default(None) |
| options_metavar | str = Default("[OPTIONS]") | The string used to represent options in the help text usage line. |
| add_help_option | bool = Default(True) | Whether to automatically include the standard help option (-h, --help). |
| hidden | bool = Default(False) | Whether to hide this command or group from the help output. |
| deprecated | bool = Default(False) | Whether to mark this command as deprecated and show a warning in the help text. |
| rich_help_panel | `str | None` = Default(None) |