7 ms·
CLUI: Building a Graphical Command Line (2020)
- hprotagonist 6y agoThe animations in this post remind me of nothing more than a Symbolics LISP Machine: https://www.youtube.com/watch?v=o4-YnLpLgtk https://www.youtube.com/watch?v=o4-YnLpLgtk which also had semantically driven clickable data structures one could use to build up a command line invocation. In about 1982.
- oblio 6y agoI wish all of these initiatives luck, but for the basic Unix utilities they couldn't even agree on some sort of common format to allow for introspection (i.e. the tool itself would allow for the extraction of its parameter names, parameter types, etc.). I somehow feel that all these boil-the-oceans approaches regarding rich CLIs aren't going to make it very far. Which is really unfortunate :-(
- laumars 6y agoYou don’t need to cover every parameter and use case of every command. You just need to cover the most common use cases and give them priority over the more esoteric flags. So beginners get help but power users can still use the shell. I say “just” but obvious even that is still a big task. As for covering every flag for every tool, some shells already parse man pages and —-help output to provide meaningful autocompletions automatically. Murex does this (https://murex.rocks https://murex.rocks) as does fish (https://fishshell.com https://fishshell.com)
- donio 6y agozsh supports extracting options from the command's --help output and it even recognizes when FILE or DIR is specified as the argument for an option. There is probably something like that for bash too.
- lurkerasdfh8 6y agooff-topic: went to comment on the article there, but replit comment section is already overtaken by spam :( i guess that is a sign of success?
- amasad 6y agoWe have a comment section?
- ykdojo 6y agoI think they're talking about the whole blog's Explore page.
- lurkerasdfh8 6y agoapparently you do :) click "edit on replit" at the article and you go to: https://replit.com/@util/replit-blog?fileName=posts/clui.md https://replit.com/@util/replit-blog?fileName=posts/clui.md it shows: > 70 Reactions > 47 comments
- amasad 6y agoGreat to see this on HN again, since we posted this article we started building CLUI into our product with great success. I posted some videos on Twitter on how we use it in our app. Basically any place where you can image a lot of UI bloat, it's replaced by a CLUI bar: https://twitter.com/amasad/status/1390005374741143554 https://twitter.com/amasad/status/1390005374741143554
- sigmonsays 6y agoNot to be critical but this doesn't seem to be much different than a drop down menu. The implementation seems to be missing the point of the cli, scripting. If there is not a primitive way to combine and chain commands and reduce repetition, then this doesn't look like enough by itself to sway a userbase.
- smoochy 6y agoI'm wrapping my head around what's the purpose of this.
- iso1631 6y agoTake something like a log file Mangle it with sed, grep, awk, cut, sort, perl, wc, whatever Get the result you want Dump the instructions in a script Optionally stick echo -e "Content-Type: text/plain\n\n" at the top of the script, chmod 755 and host Beautiful, job done, problem solved, move on.
- slver 6y agoSo all they need to do is add a pipe operator, and we're in business...
- dreary_dugong 6y agoGreat to see the progress on this. It seems my fears have been assuaged and the CLUI keeps all the power of a command prompt while adding discoverability. I still think the average user will stop reading the drop-downs after awhile and just treat it like a normal command prompt once they've memorized everything, but up until that point this seems like a better way to get newbies to learn than telling them to read the man pages. That said, I do still think it's unfair to say that this is equally as approachable and a GUI for the average person. Certainly it's better than a standard CLI, but it's more of an in-between I think.
- dsr_ 6y ago"Terminals, the primary platform for command-lines, are intimidating and feel like a black box to non-technical people." That's learned helplessness. My mother, who is a distinctly non-technical person, learned to use IRC when she was 60. Why? Because her friends were already using it. She wrote down a series of commands that her friends sent her in email, carried them out, and then spent years happily chatting with them. Humans are very good at learning complex things when they see something they want at the end of it.
- deleted 6y ago[deleted]
- zokier 6y agoTerminals specifically feel like a black boxes even to technical people. And that is even after reading things like https://www.linusakesson.net/programming/tty/ https://www.linusakesson.net/programming/tty/ Terminals are something I find lot of people take for granted, and don't really stop to think how they actually work. Very much a black box.
- slver 6y agoIRC can go a long way to modernizing the experience without changing the underlying nature of the "terminal". I mean what is a terminal. It's chat with a bot we call "the terminal". We can look at chat apps and see how we can integrate graphics and commands into the chat without it looking like obscure 80s thing.
- Y_Y 6y agoIs she friends with a crew of 90s hackers, or are there just some elderly ladies who recognise the brilliance of IRC that's missed by most modern techies?
- dsr_ 6y agoThere are in fact (or were, I haven't checked in on this in a few years) a bunch of middle-aged to elderly ladies who keep in touch via IRC.
- 6y ago
- tfsh 6y agoI think there is a great potential for highly interactive predictive suggestions like shown under section 2 "discoverability" in the wider Unix ecosystem, however discoverability is the key issue, and a massive problem space. Command line programs are black boxes (they could be pure bash, a compiled C++ binary, an npm package, etc), which means there is no programmatic standard for extracting the command set. The most backwards compatible format to achieving this would be a interface like abstraction on top of regular binaries (similar to the concept of TS interfaces adding type completion to JS) which describe a list of parameters/flags and their valid values/data types with an associated description. I think a system similar to this gives an intuitive and extensible suggestion system without requiring inconceivable redesigns to existing systems whilst maintaining the familiarity and ease of use of the regular command line.
- mschrage 6y agoThe TS/JS analogy is perfect. This is exactly the approach we took with Fig. We defined a declarative standard that lets you describe the structure of any CLI tool. Fig then uses these to provide VSCode-style autocomplete in the terminal! Currently specs are manually contributed by the community, but we are planning to integrate with CLI libraries (cobra, commander, click, etc) so they can be generated automatically! You can see some examples here: https://github.com/withfig/autocomplete https://github.com/withfig/autocomplete
- michael_fine 6y agoWoah, that's really cool. This seems to check the first two of the article's points, approachability and discoverability. Are there any plans to implement the third point, interactivity, where you have small, dynamic guis embedded in the terminal?
- mschrage 6y agoThe core focus right now is autocomplete, but this is definitely an area that we want to explore more in the future!
- 6y ago
- travbrack 6y agoI think Cisco's context-sensitive CLI really nails this problem. If you've never used it before, pressing "?" at any point in your command will show you a big list of all the possible inputs, and a brief description of what they do. Here's a video of it: https://www.youtube.com/watch?v=Mb7k5eo3lJw https://www.youtube.com/watch?v=Mb7k5eo3lJw
- classichasclass 6y agoThis is one thing that TempleOS, and before it things like OpenGenera, did well. You could type commands, but an interface backed the CLI, and you could interact with the output they generated, like a clickable listing of files.
- Y_Y 6y agoI would dearly love to use a system that worked like these, and also modern stuff that I have to use, like web browsers and device drivers. There's an awesome public domain fork of TempleOS called Shrine[0] that has networking and a normal shell. When is someone going to throw some chrome and polish on top of that and sell it as the OS of the future? I'll back your kickstarter or whatever. [0] https://shrine.systems/ https://shrine.systems/
- lakecresva 6y agoI'm glad you guys are still doing stuff with this, I thought the demo was really promising. Even though it's specific to your thing it seems like a good test case for how this can best be applied in the general case. Putting this in something like extraterm would be HN's nightmare, but I would be very interested to see whether there's a future in a cli base that actively takes advantage of the fact that it's not emulating 40 year old hardware.
- jayd16 6y agoPowershell solved all this, Intellisense, introspection, apis for compiled apps (although I think .NET is only), typed output. Still hasn't caught fire though, even for me. I respect it but I still reach for bash. I'm not really sure why except perhaps momentum.
- geocar 6y agoThere are advantages to text. Some of my favourites: 1. Humans can understand text too! 2. Text can travel over every transport. 3. Text is benign. 4. Large text is large and small text is small, but all objects look the same size.
- airstrike 6y agoNot sure how much of this still applies, but I remember reading this a while back when I also realized PS just didn't click for me https://medium.com/@octskyward/the-woes-of-powershell-8737e5346b1 https://medium.com/@octskyward/the-woes-of-powershell-8737e5...
- godtoldmetodoit 6y agoGot about a quarter of the way through and none of it applied to modern Powershell.
- _carbyau_ 6y agoReading that link, even back when it was written it feels like an article of first impressions with the bias of someone comfortable with many hours of use of a Unix shell. 1. Powershell isn't a complete greenfield and exists in a context, which explains many of the complaints. 2. any new tech use requires learning. I could address each point but most galling was the conclusion: "At this point we realise the truth — PowerShell is not designed to be an actual shell for users" Because wget did not output to a file by default?!? Really?!? IMO, this article failed to hit the mark back in 2014 when it was written let alone now. Edit: conciseness
- robenkleene 6y agoI love this piece, but this part is hilariously wrong: > Command line interfaces. Once that was all we had. Then they disappeared, replaced by what we thought was a great advance: GUIs. The CLI is still incredibly relevant, it’s core to this day to single most important task you can perform with a computer: Programming. There’s only a few applications that can safely be considered more important: the browser, the spreadsheet, the word processor, maybe the email client. After that you start to get to things similar in relevance to the terminal. That’s not “disappearing”, that’s having enduring importance that makes it a monumental achievement deserving of a place in the software pantheon. The CLI only gets punished because it was once even more important, before the GUI. We should all be striving to create software with the enduring importance of the terminal.
- slver 6y agoSorry but what programmers use is not relevant here. The trick is to bring it to mainstream audience in a way that's not awkward. The closest thing I've seen to mainstream terminal is the JavaScript console in browsers but... that's again for programmers (albeit also casual ones). In professional apps like premiere, the closest thing to a terminal is a search box that's smarter than just looking up words in the documentation. And that is preeeeeeetty shit. We can do better.
- mikepurvis 6y agoApplications like AutoCAD have long had a terminal window where you can perform one-off scripting, introspection of state, and so on. Blender has something similar with a built-in Python REPL: https://docs.blender.org/manual/en/latest/editors/python_console.html https://docs.blender.org/manual/en/latest/editors/python_con...
- slver 6y agoThey do, yeah, good catch there. I gotta say 3D modeling/rendering/animation is pretty intertwined with scripting/programming these days. But I still don't find this very mainstream. It's a bit like the JS console in browsers.
- slver 6y agoI like this because it's trying to be more than a classic terminal. And I hate it for the same reason, it repeats everything a classic terminal has, including the awkward syntax like a line that begins with ">" and parameters that are preceded by "--". Sure, it's second nature to us, but habit is a terrible way to tell what's right and what isn't. We need to go back to first principles.
- Siira 6y agoThese are not features of the terminal at all. “>” is a customizable prompt of your shell, and “-“ is a convention used by most (but not all) binaries. It’s also a very useful convention; How else are you going to tell arguments apart from options?
- slver 6y agoYou'd think the very purpose of calling it a "Graphical Command Line" would be that you're not restricted to a literal line of text. Just because it should be convenient to type and navigate with a keyboard doesn't mean the command line can't have structure beyond just the characters on it. I can fill in a webform just the keyboard. Tab, type, tab, type, tab, type, tab to the submit button, hit enter. Done. So I didn't have to type "--" anywhere. I didn't have to type the field names at all actually. Not saying I want them fixed per se, but "telling them apart" shouldn't be a real question in a graphical terminal UI. Likewise we should never escape strings or quote strings in a Graphical Terminal IMHO. They should just be text fields integrated seamlessly into the line, with visible boundaries. If you copy the line and paste it in a text editor, then sure, maybe show all this ghastly encoding happening underneath. But in the GUI Terminal... nah I don't accept it. EDIT: While we're at it, I don't think we should use monospace fonts in a GUI terminal. Certainly a font with distinct letters like lI1 and 0O, but not monospaced.
- jrm4 6y agoWould you good people know about any efforts in this direction that are not so "top-down?" Seems to me that there a few "addons" to the classic terminal that could go a hugely long way. Offhand, image-et-al preview still feels like a mess, a million ways of doing it and none are that good. Also, I dream about something like "fzf, but with a very clearly delineated out-of-the-current-shell window,perhaps like rofi" or something?
- Siira 6y agofzf-tmux with the new tmux window popup?
- nocommandline 6y agoOne of the arguments in the article against GUIs is GUI density i.e. you have a lot of features that it becomes difficult to discover them in UI. I believe this is a valid issue but I don't see how CLUI is better at solving this problem. CLUI is employing search to figure out what you might be trying to do when you type a command. This works if your seed command (the command you typed in) makes sense to the search engine. This same search technique is employed by GUIs which have lots of features i.e. you type in what you want to do in the help box and it tries to understand your intent and returns documentation explaining the exact steps to take. At the end of the day, I think GUIs & CLIs are targeted for different people and folks should pick which works for them.
- mschrage 6y agoWe were inspired by this idea while building early prototypes of Fig (https://withfig.com https://withfig.com) and wanted to bring rich interactivity/discoverability to existing terminals. The goal is to layer on a CLUI style interface to all of the CLI commands you already use!
- zokier 6y agoFeels bit overselling as something radically novel, when PowerShell has most of the stuff also even if slightly different form. You have both advanced autocomplete (based on introspection), automatic form building (in ISE), and prompting of missing parameters in PowerShell. Still, this replit "clui" might be pretty good execution of the idea, so I'm not dismissing it completely. Might be interesting experiment to plug it into powershell backend to see how well it works with more real-world stuff.
- monoideism 6y agoNot just PowerShell, but also zsh and even (tricked-out) bash to some extent. Not to mention REPLs such as ipython and others.
- MaysonL 6y agoSee the Oberon system for hints as to how to do it.
- monoideism 6y agoWhile I appreciate any experiments in making CLI more approachable to the public, I do disagree with the author's assertion that CLI has "low" discoverability and interactivity. Many modern CLI environments have excellent discoverability and interactivity: shells such as PowerShell and zsh, and REPLs such as ipython all come to mind. Even bash can be customized to do fairly well.
- alex_smart 6y agoErm, compared to GUI interfaces, shells really do have very low discoverability. Someone really new to the shell could stare at their terminal emulator for months before they would even come up with "ls". Yes, shells can be made more interactive, but that requires setup and prior-experience and know-how. How would someone new know to install zsh and something like ohmyzsh?
- chubot 6y agoDiscussion in March last year: https://news.ycombinator.com/item?id=22498665 https://news.ycombinator.com/item?id=22498665
- twobitshifter 6y agoThe interactive ui shown is funny: the command allows you to type everything out except for the user name which is in a new box. This could have easily been on the same line. Something like a color or date picker would make more sense.
- FpUser 6y agoThis approach I think fails to address the real problem: I do not particularly care how I've reached 1/2/3/4 command. The problem comes when command 4 has many options. When you display those in a GUI with default values it is more or less easy for even uninitiated to get a grip. Not that much with CLI or this CLUI. Best tools with complex logic like CAD software usually combine CLI, CLUI and GUI to be ergonomic.