fastapi/typer ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python library called Typer that makes it really easy to turn normal Python functions into friendly terminal commands.
I want a developer to be able to write a simple function with type hints, then run it as a command line app without writing a bunch of argument parsing code. It should automatically create help screens, show clear errors when required values are missing, support options and arguments, and let people create multiple commands like hello and goodbye in one app.
Also include a small typer command that can run a Python script and treat its main function like a CLI, even if the script was not written with Typer in mind. Please make the terminal output polished and readable, and include support for shell completion where it makes sense.
Add a few simple examples, good tests, and clear docs so someone new can understand how to install it and build their first CLI quickly. Look up current Python CLI docs online if needed.
Are you gonna build this?
make sure you review the code using coderabbit