Automatically generate a Textual TUI for your Click CLI
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install trogon
Trogon
Auto-generate friendly terminal user interfaces for command line apps.
🎬 Video demonstration
A quick tour of a Trogon app applied to sqlite-utils.
https://github.com/Textualize/trogon/assets/554369/c9e5dabb-5624-45cb-8612-f6ecfde70362
Trogon works with the popular Click library for Python, but will support other libraries and languages in the future.
How it works
Trogon inspects your (command line) app and extracts a schema which describes the options / switches / help etc. It then uses that information to build a Textual UI you can use to edit and run the command.
Ultimately we would like to formalize this schema and a protocol to extract or expose it from apps. This which would allow Trogon to build TUIs for any CLI app, regardless of how it was built. If you are familiar with Swagger, think Swagger for CLIs.
Screenshots
|
|
|
|
|
|
Why?
Command line apps reward repeated use, but they lack in discoverability. If you don't use a CLI app frequently, or there are too many options to commit to memory, a Trogon TUI interface can help you (re)discover options and switches.