Trogon

Dev tools

terminal ui generator

SHOW HN2023

248points
70comments
#197of 3,109 in 2023
Top 7%of 2023 by points

How HN took it

MixedNo clear lean

14 positive, 13 neutral or asking, 0 mixed, 4 critical, out of 31 comments about the project. Thread score +0.23.

Idea: 5 for, 1 againstExecution: 4 for, 1 againstDesign: 2 for, 2 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful idea and clean UX

    From 3 comments
    • I've used the python library gooey which seems to do the same thing. I like the ux of trogon
      mkoubaa on HN
    • Does anyone know what terminal is being used in the demo? It looks really clean.
      eiiot on HN
    • This is really fun. I have an experimental branch of my sqlite-utils CLI tool (which has dozens of sub-commands) running with this now and it really did only take 6 lines of code…
      simonw on HN
  • Easy integration into existing Click apps

    From 2 comments
    • This is really fun. I have an experimental branch of my sqlite-utils CLI tool (which has dozens of sub-commands) running with this now and it really did only take 6 lines of code…
      simonw on HN
    • Thanks Simon, I can't believe I looked twice to make sure I wasn't calling it wrong, and still didn't see it. That did, indeed, fix it!
      stavros on HN

Objections

  • Manual docs and man pages may be faster than a form

    From 1 comment
    • I don't understand why is it more effective than the manual lookup... If a certain cli tool has hundreds of arguments from which I need certain 2, I would rather open…
      gloosx on HN
  • Only works with Python and Click so far

    From 2 comments
    • This looks interesting, I love Textual so I tried this with one of the apps I wrote: https://gitlab.com/stavros/parachute Unfortunately, it doesn't seem to work, failing to find…
      stavros on HN
    • For various reasons, I use the stdlib argparse library. Will this work with that?
      david2ndaccount on HN

Requests

  • Support for unannotated CLI programs via help or man pages

    From 2 comments
    • Significantly harder problem, but what would be of most interest for me is for a program to offer this interface to an unannotated program (which will always be the majority).…
      fbdab103 on HN
    • That is a tricky problem indeed. I’m thinking a lot could be extracted from help and man pages. But maybe for some apps we could just write it by hand, or partially by hand.…
      willm on HN
  • Support for argparse

    From 2 comments
    • For various reasons, I use the stdlib argparse library. Will this work with that?
      david2ndaccount on HN
    • This is exactly my current experiment on a personal project I'm working on, though I'm trying to create a Textual UI on a dynamic Python argparse CLI. Creating a Textual UI is…
      linsomniac on HN
  • Support for default system commands like ls

    From 2 comments
    • Looks very nice! Does it also support default "apps" like, e.g., ls?
      dr_kiszonka on HN
    • Not currently, but I think it will in the future.
      willm on HN

Questions

  • Does it generate shell completion scripts?

    From 1 comment
    • Can it generate bash completion scripts? eg: ``` $ . <(fab --print-completion-script zsh) ``` to enable autocomplete for fab in zsh shell.
      d0mine on HN
  • Does it work with typer?

    From 1 comment
    • How easy is it to get this to compose nicely with typer, which also sits on top of click? like, if i expose the command group to the decorator or something, will that work?
      hprotagonist on HN

Alternatives named

  • Gooey

    From 1 comment
    • I've used the python library gooey which seems to do the same thing. I like the ux of trogon
      mkoubaa on HN
  • Typer autocompletion

    From 1 comment
    • No idea about Trogon but Typer[0], which is based on the Click library that Trogon leverages, does provide autocompletion. [0]: https://typer.tiangolo.com/
      codethief on HN
  • tldr and cheat.sh

    From 2 comments
    • You should check out https://tldr.sh/ It gives you practical examples for common use cases.
      underwater on HN
    • Also https://github.com/chubin/cheat.sh (https://cht.sh). Actually using it quite often!
      hxii on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/36020717)