3 ms·
This is where GUI's shine, as opposed to command-line. Perhaps this is slightly off-topic, but my dream is an interface that combines the best of both worlds.
by crazygringo 6y ago
This is where GUI's shine, as opposed to command-line.
Perhaps this is slightly off-topic, but my dream is an interface that combines the best of both worlds.
Kind of an automated GUI-builder for command-line tools, that analyzes the combinations of options used most, breaks them down into workflows with options (that can be manually named), and you can thus execute one-off commands easily and quickly without having to hunt through man pages, but still export the command as a command-line incantation for reuse, to use in a script, etc.
- darzu 6y agoThis sounds great! Expanding on this a little: Seems like you'd need a universal CLI tool usage traverser and parser to figure out what's possible. Likely this would produce a decision tree of sorts with different modes and options excluding or including new options. We'd need a way to show all this, maybe nested tabs for modes and check boxes and other inputs at each appropriate level. Layer on this a way to optimize for the most common cases like you said. Further, if this becomes popular, CLI tools could emit some sort of standard description language that would optionally customize the GUI. The GUI's output should be both the text command it constructed and the ability to run that command directly. More future steps would be a way to reason about multiple commands, pipes, and other combinators. Adding this to my side projects backlog. Thanks for the idea!
- crazygringo 6y agoExactly that -- all of it. And I love the idea of CLI tools optionally emitting their own defaults for it too. I (selfishly) hope you build it, since I don't have the time!
- iib 6y agoIn the emacs world, there are textual interfaces like magit's [0] or dired's [1] interface, that tick many, perhaps most, boxes that you mention. Magit is basically that interface, but tailored to `git`, that also constructs the actual git command, should you want to see it. Dired is like that for ls, rm, cp, mv and other file utils. So, as a general design, they _may_ be of useful interest. A tool to automatically parse `man` pages or help prompts from tools would be a dream come true, basically. Apart from the possible commands, it may be useful for the GUI to also show some kind of state, for example filesize (akin to invoking `ls` before `ffmpeg`, as you would normally do on the CLI). Done with the right abstractions, command combinations should come almost for free. [0] https://magit.vc/ https://magit.vc/ [1] https://en.wikipedia.org/wiki/Dired https://en.wikipedia.org/wiki/Dired
- jonbo 6y agoI had a similar idea (if not the same), while learning about ffmpeg a year or two ago, and quickly put together a small prototype of it. At least, for the GUI command builder part of it. Here's the demo: https://jonbo.github.io/project/simply/ https://jonbo.github.io/project/simply/ There's also a small ffmpeg example. (If you click the fetch button, on the demo.) The schema "recipes" for it are just a basic JSON format and can be seen here https://gist.github.com/jonbo/c4067cd18e5fa687e896b2358aaf9e00 https://gist.github.com/jonbo/c4067cd18e5fa687e896b2358aaf9e... and https://github.com/jonbo/simply.recipes/blob/master/docs/README.md https://github.com/jonbo/simply.recipes/blob/master/docs/REA... I never did publish the (non-bundled) source code for the demo, since it was done in a hurry (spaghetti), but I might if there's interest. Maybe this will inspire somebody else to build something better!
- yesenadam 6y agoThat looks awesome, what a great idea. Then just have to turn man pages/help info into JSON..
- tambourine_man 6y agoThat's interesting, but I'm aiming for something much simpler. Sensible defaults (faststart, for instance) and easy arguments: ffmpeg mymovie.mov -w 720 mymovie.mp4 Should do what you expect
- paulcarroty 6y agoHere's probably the most popular GUI: https://github.com/WinFF/winff https://github.com/WinFF/winff