Textualize/trogon

Feature request: customize command name and help text

simonw opened this issue · 2 comments

These are currently hard-coded here:

trogon/trogon/trogon.py

Lines 288 to 294 in b9ddd90

if isinstance(app, click.Group):
app.command(name="tui", help="Open Textual TUI.")(wrapped_tui)
else:
new_group = click.Group()
new_group.add_command(app)
new_group.command(name="tui", help="Open Textual TUI.")(wrapped_tui)
return new_group

I'd like the option to customize them, for example like this:

@tui(name="ui", help="Interactive UI for this tool")
@click.group()
def cli():
    ...

Yeah, I concur. We probably also want to customize how the TUI is launched. Some might prefer a --tui option rather than a subcommand.

This was added in v0.5.0