Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Auto-generate friendly terminal user interfaces for command line apps.
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.
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.
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.
This project started life as a Textual experiment, which we have been giving birds' 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.
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.
Trogon may be installed with PyPI.
pip install trogon
from trogon import tui
@tui
decorator above your click app, e.g.
from trogon import tui
@tui()
@click.group(...)
def cli():
...
tui
command available.from trogon.typer import init_tui
init_tui
function, e.g.
cli = typer.Typer(...)
init_tui(cli)
tui
command available.See also the examples
folder for two example apps.
By default the command added will be called tui
and the help text for it will be Open Textual TUI.
You can customize one or both of these using the command=
and help=
parameters:
@tui(command="ui", help="Open terminal UI")
@click.group(...)
def cli():
...
If this app interests you, you may want to join the Textual Discord server where you can talk to Textual developers / community.
FAQs
Automatically generate a Textual TUI for your Click CLI
We found that trogon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.