this post was submitted on 14 Jul 2024
54 points (83.8% liked)
Linux
46775 readers
1659 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Congratulations you just reinvented the GUI while trying to get away from it at the same time.
Perhaps something a little more "in-between" the two might be a GUI that allows running arbitrary programs... something smarter than a launcher but more generic than a purpose-built function-limited interface... if such a thing can even exist.
There are already libraries like clap that allow the developer to specify all their arguments including short and long variants and description strings. I think some of them will automatically generate --help based on the specified options. I could imagine a library that takes the same specifications and makes an interactive menu or a tui form out of them. It's an interesting idea.
What kind of GUI allows you to launch CLIs with certain configurability?
I don't think there is one yet... it would need some kind of way to understand the possible options and parameters for any given CLI program, and without a standardized interface for that, error-prone scraping of
--help
or just hard-coding popular options is probably the best you could do. Hopefully it wouldn't end up looking something like the Scratch programming IDE though.This reminds of jc which is kindof the opposite where it scrapes the output of common commands to present a more unified (JSON) syntax for other programs to consume and automate better.
Hmm, --help parsing can be screwy, I guess. Maybe there is a way through autocompletion machinery.