synth_cleo
Class info¶
🛈 DocStrings¶
Module for generating Cleo CLI implementations from CommandInfo objects.
create_app
¶
create_app(cmd_info: CommandInfo, handler: Handler | None = None) -> Application
Create a Cleo Application from a CommandInfo object.
Nested subcommands are registered with space-separated names ("group sub").
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cmd_info
|
CommandInfo
|
The CommandInfo object to convert |
required |
handler
|
Handler | None
|
Called with the invoked command's info and its parsed values. An integer return value is used as exit code. |
None
|
Returns:
| Type | Description |
|---|---|
Application
|
A Cleo Application with all commands and subcommands |