https://github.com/Textualize/trogon Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Textualize / trogon Public * Notifications * Fork 2 * Star 447 Easily turn your Click CLI into a powerful terminal application 447 stars 2 forks Star Notifications * Code * Issues 6 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights Textualize/trogon This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/T] Use Git or checkout with SVN using the web URL. [gh repo clone Textua] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @willmcgugan willmcgugan Update README.md ... b9ddd90 May 21, 2023 Update README.md b9ddd90 Git stats * 133 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time dist changes, tweaks, fixes May 19, 2023 19:28 examples changes, tweaks, fixes May 19, 2023 19:28 tests changes, tweaks, fixes May 19, 2023 19:28 trogon fixes May 20, 2023 19:53 .gitignore gitignore May 20, 2023 17:10 README.md Update README.md May 21, 2023 12:31 poetry.lock tweaks and fixes May 18, 2023 16:32 pyproject.toml fixes May 20, 2023 19:53 View code [ ] Trogon How it works Screenshots Why? What does the name mean? Roadmap Installing Quickstart Follow this project README.md A picture of a trogon (bird) sitting on a laptop Discord Trogon Auto-generate friendly terminal user interfaces for command line apps. Video demonstration A quick tour of a Trogon app applied to sqlite-utils. Screen.Recording.2023-05-20.at.12.24.35.mov 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 Screenshot 2023-05-20 at 12 07 31 Screenshot 2023-05-20 at 12 08 21 Screenshot 2023-05-20 at 12 08 53 Screenshot 2023-05-20 at 12 09 47 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. What does the name mean? This project started life as a Textual experiement, which we have been giving give bird's names to. A Trogon is a beautiful bird I was lucky enough to photograph in 2017. See also Frogmouth, a Markdown browser for the terminal. Roadmap Trogon is usable now. It is only 2 lines (!) of code to add to an existing project. It is still in an early stage of development, and we have lots of improvements planned for it. Installing Trogon may be installed with PyPI. pip install trogon Quickstart 1. Import from trogon import tui 2. Add the @tui decorator above your click app. e.g. @tui() @click.group(...) def cli(): ... 3. Your click app will have a new tui command available. See also the examples folder for two example apps. Follow this project If this app interests you, you may want to join the Textual Discord server where you can talk to Textual developers / community. About Easily turn your Click CLI into a powerful terminal application Resources Readme Stars 447 stars Watchers 5 watching Forks 2 forks Report repository Releases No releases published Packages 0 No packages published Contributors 2 * @darrenburns darrenburns * @willmcgugan willmcgugan Will McGugan Languages * Python 95.1% * SCSS 4.9% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.