diff --git a/examples/typer.py b/examples/typer.py new file mode 100644 index 0000000..ad4d883 --- /dev/null +++ b/examples/typer.py @@ -0,0 +1,19 @@ +from typing import Annotated + +import typer +from trogon.typer import init_tui + + +app = typer.Typer() + + +@app.command() +def hello(name: Annotated[str, typer.Argument(help="The person to greet")]): + typer.echo(f"Hello, {name}!") + + +init_tui(app) + + +if __name__ == "__main__": + app()