Ask HN: Interesting TUIs (text user interfaces), maybe forgotten ones?

322 points by perihelions ↗ HN
I use relatively few TUI's, and don't know much about them—about what good, convenient UX flows in TUI's can look like. I want to write some in Emacs. Do you have particularly nice examples of TUI's that deserve to be known and imitated? I know there's a lot of abandoned programs from the pre-GUI era that refined TUI's to a high level.

(I'm only familiar with a handful of modern ones in Emacs—Magit, the SLIME inspector, dired, as well as the terminal TUI from the Linux tool perf).

298 comments

[ 5.0 ms ] story [ 331 ms ] thread
Midnight Commander immediately comes to mind, but also Borland's C++ compiler.
I believe Norton Commander was the original product (for MS DOS), Midnight Commander is its open-source cross-platform clone. FAR Manager is another notable TUI clone of NC.

Windows Commander/Total Commander are also NC clones, but implemented as GUI instead of TUI.

NC was one of the most convenient UIs for managing files, it’s a pity none of the major operating systems adopted this style for their default file managers.

Volkov Commander should get an honorable mention here, it is a tiny reimplementation of the NC interface. On the FAR Manager level of complexity DOS Navigator is also notable.
(comment deleted)
I recently built a TUI for exploring and developing CUE, JSON, Yaml.

Large inspiration for the overall UX comes from the Bloomberg terminal, where every function is reachable with four letter shortcut from the command box. It was really the command box that I liked. I've also built a sort of "flex" panel component for the layout so you can create as many panels as you like.

https://docs.hofstadter.io/getting-started/hof-tui/

https://github.com/hofstadter-io/hof/tree/_dev/lib/tui

This was built on the tview/tcell stack in Go. There is also the Charm.sh stack that takes a different approach but is generally prettier and more polished (having a company behind it)

The text interface into AutoCAD was pretty amazing...and like Emacs, backed by a Lisp. We'd run it on dual displays, one SVGA and one Hercules just for commands. The experience was very 'lingustic.'
In stark contrast to most GNU/*nix tools, I really liked MS-DOS's edit.com text editor. Unlike emacs or vim or even nano, it didn't have a bunch of invisible shortcut keys, just a Windows-like drop-down menu system (but rendered in DOS).

You could easily browse through the menu hierarchy, but still memorize certain shortcuts that you often use (just like Windows). In later versions you could even use the mouse to select things if you wanted to. It didn't try to force any one particular method onto you, but let you use the input you're most comfortable with.

So many CLI tools are incredibly idiomatic and require you to do something in a very particular way with no on screen hints. Even the help screen is normally hidden behind some key combo. TUI or not, that seems unnecessarily elitist.

I think some of the old telnet MUDs or BBS games are nice to learn from, whether they used helpful text prompts (you are here, this is what you can do) or just rendered graphical menus in ASCII with colors. For some reason I still don't quite understand, games still seem to have more UI focus than productivity apps. Maybe cuz they tend to target the general public instead of B2B users?

Another pattern I really like: In more modern GUI IDEs and editors like Sublime or Jetbrains or VScode, you can usually launch a floating command input bar that will search through available files, commands, settings, etc. That lets you quickly find the thing you want without knowing the key combo for it (like format code, or forking a branch, or turning off word wrap). It would be cool to have a LLM layer in there that could parse natural language (instead of a basic keyword search) and execute commands based on that.

Not only that, I found it much easier to create TUIs on DOS than on a UN*X system. I still have a hard time with curses. Zortech c on DOS had a small set of screen functions, disp_*().

These are enhanced printf(), scanf(), getc() type functions by adding cursor positioning on an 80x25 screen. Pretty basic but you could create nice applications with these basic functions in Zortech c.

Granted, on DOS the screen size did not change as it does in UN*X, making TUIs easier.

On the systems (minis) I worked on decades ago, TUIs were far easier then anything I have seen since.

> I still have a hard time with curses.

FWIW, _everybody_ has a hard time with curses. That's why it's (aptly) named "curses!"

haha never put 1 and 2 together. i guess these days its either something CSS or curses. cursed style sheets? :') maybe someone can do everyone a solid and make a GUI to design TUIs ? hahah
> "easier to create TUIs on DOS than on a UN*X system"

That's because DOS (well, the IBM PC really) had a memory-mapped text mode display buffer instead of terminal emulation.

So much easier to fill a screen rapidly and do partial updates, scrolling, moving windows etc. when you can just do pointer arithmetic and memcpy.

MS-DOS also supported the 80x43 or 80x50 screen modes for extra information density. On later hardware you would have SVGA-based or VESA-based text modes with even more density, though by that time DOS itself had mostly fallen out of use.
I seem to remember one 132 wide, but since the resolution didn’t change (much?) it was near unreadable.
I still run my (Unix) terminals sized to 80x43 by default.
If you loaded ANSI.SYS in your config.sys, then the procedure is exactly the same.

I think this will demonstrate color with ANSI.SYS and/or VT-color:

  $ cat rgbdemo.sh
  #!/bin/sh

  alias p=printf

   N=$(p \\033) N="$N[" x=30

   for a in Bl R G Y B M C W  # Black Red Green Yellow Blue Magenta Cyan White
   do eval $a='$N'"'"$((     x))"m'" \
          b$a='$N'"'"$((60 + x))"m'" \
       ${a}bg='$N'"'"$((10 + x))"m'" \
      b${a}bg='$N'"'"$((70 + x))"m'" # bX=bright Xbg=background bXbg=brgt bgnd
      x=$(( x + 1 ))
   done                       # https://en.wikipedia.org/wiki/ANSI_escape_code

   N=$N'0m'

  echo "I am $Wbg$R red, $G green, $B and blue $N on a white background."
> Unlike emacs or vim or even nano, it didn't have a bunch of invisible shortcut keys, just a Windows-like drop-down menu system (but rendered in DOS).

You might like "joe", which was inspired by WordStar: <https://joe-editor.sourceforge.io/>

Also Midnight Commander's integrated editor: `mc -e`.
I'm still using joe on Linux (and macOS) 30 years later!
Fun fact: EDIT.COM and HELP.COM are secretly QBASIC.EXE: https://en.wikipedia.org/wiki/QBasic#Contents
qbasic.exe :D hah. never knew. but that takes me right back haha thx
I can't think about QBasic without thinking about that game with primates throwing bananas across a city at each other. Like a simpler version of Scorched Earth.

https://en.wikipedia.org/wiki/Gorillas_(video_game)

also Money, and REMLINE

No love for NIBBLES.BAS? I played that way more than Gorillas. And Scorched Earth -- that's a name I haven't heard for a long time.
Modding that game was my first experience with programming (and introducing bugs, but I repeat myself)
Doesn't get more integrated as far as integrated development environments go when your editor is your language interpreter.
I'm also a fan of the TUI from Qbasic, it also appeared in Microsoft Works for DOS, Microsoft Word for DOS and probably other places.

The UI was refered to as COW character oriented windows. It would be good if it could be open sourced, for historical reference.

There were other interesting TUIs, the one in Defrag in DOS, and the Antivirus would change characters on the fly to generate a mouse cursor.

The TUI in DOSSHELL.exe would use customise some characters to draw icons.

Maybe Scott Hanselman could be persuaded to work on open sourcing all the COW apps.

(Honarable mention for EDIT in DOS7, which appears to be a rewrite, supporting long filenames).

In the modern era, there is YEdit from the author of YCmd, which implements a similar looking UI, in Windows http://www.malsmith.net/edit/

Some other TUIs of note included the ones in Wordperfect, Norton Utilities, and of course TurboVision (though the last has implementations in modern environments).

> In stark contrast to most GNU/*nix tools

That's ridiculous! The only invisible things in Emacs deserve to be so. For everything else, there is a menu bar which is also visible in terminal `emacs -nw` mode. Just add `(xterm-mouse-mode t)` to ~/.emacs to make sure the mouse works properly. Very pointy, very clicky, and nice pretty menus that tell you the shortcut of each function.

To enable the helpful mouse interface, run with this mode and add this to your hidden config file. What's a mode? How do I edit the config file until I fix my editor? This is such a unix answer.
To be fair if you're trying to start Emacs in a terminal instead of letting Emacs control its output on its own you've already gone off the beaten path.

The thing you want (the helpful mouse interface) is the Emacs default. The funny command-line flag is what makes it weird. Just don't use that flag.

But then it's not a TUI anymore, which is the whole point of this exercise.
"TUI" is "text(ual) user interface", not "terminal user interface". If the UI is (primarily?) made of text (which it is in Emacs' GUI mode) then it doesn't need to be in the terminal.
I really wish edit.com still existed for Windows and was built in. Every now and then I need to do some stuff on a Windows machine and find myself wishing for a simple terminal editor.
A Microsoft employee recently (~6 months) opened a Github issue to discuss a command line editor for Windows: https://github.com/microsoft/terminal/discussions/16440

> "Thank you so much to everyone for engaging with this feature exploration! Your passion has generated a ton of excitement in our own team, and I’m happy to share our proposed direction, which is that we will work with Malcolm Smith (malxau), the maintainer of Yedit, to ship Edit in Windows! We plan to do this by forking the Yedit code to a new OSS repo on GitHub, under Microsoft (like terminal or powertoys)."

YEdit being an MIT licensed open-source recreation of the MS-DOS 5 editor, by a Microsoft employee: http://www.malsmith.net/edit/

That's great news! Thanks!
To me, Borland Turbo Pascal / Turbo C are the apex of IDEs.
really? the apex? that's an interesting perspective, to me.

there have been lots and lots of advancements in IDEs since then, are none of those advancements useful to you? not everyone needs or wants a lot of those things, i'm sure, but they have utility which the Turbo* console IDEs lacked.

Not really, considering the tradeoffs in intrusiveness/speed they carry.
Yeah, the Unix tools' unfriendliness comes from their history of being developed for a literal teletype, i.e. the computer's output would come out on a roll of paper, not a screen. In that environment you want to be very conservative with your output and can't really show a help screen. At least Vim tells you a couple of basic commands to get started with on its splash screen - ":q" to exit, ":help" for help. It still suffers from really poor discoverability and the fact that if you don't get you have to type a colon first, but interpret it as part of the help phrase and just press "q" on its own, you enter macro recording mode. Or bring up the history with "q:". Thinking about it, it should be pretty easy to add a menu bar showing the GUI entries, but experienced users obviously have zero incentive to do that.
WordPerfect is an interesting example: https://lock.cmpxchg8b.com/wordperfect.html

WordStar is another one, used by George RR Martin et al: https://arstechnica.com/information-technology/2017/03/words...

I used the TUI WordPerfect for SCO Unix/Xenix on various serial terminals and telnet/ssh connections for years. I still miss it for heads-down cranking out text.
Ah, yes. "WordPerfect 1.0 for UNIX" was the primary use of my upper school's 45 orange-plasma Wyse dumb-terminals! Not too shabby.

Sometimes a terminal would desync while you were typing up a storm, spewing control codes onto the screen. Many re-re-learned the need for frequent saves.

The WordPerfect spellchecker's short list of suggestions was typical of word processors, even decades later. A few of us knew to press the magic key to drop into a shell and use the mini's speller, which appeared to dump the whole wordlist, instantly sorted by similarity, one screen at a time. We could usually hop back into WordPerfect before anyone in charge asked why we weren't either at the system login screen or using WP. I never found another speller that worked like that.

They never did get the upgrade cards for those terminals, to turn them into smart-terminals. PC 386s with Win3.11 were the next big investment.

The other day I found many TUI tools on a site called Terminal Trove:

https://terminaltrove.com/

And it also features a great list of them here that many might not have heard of.

https://terminaltrove.com/list/

For example trippy and nvtop look very nice for TUIs and other 'top' based tools they have listed there.

https://terminaltrove.com/categories/top/

https://terminaltrove.com/trippy/

https://terminaltrove.com/nvtop/

There's screenshots and install instructions that's also convenient.

The extra convenient part is that the default installation instructions are for everyone's favourite, snap.
I would add another site to the list: https://inconsolation.wordpress.com/

You can find reviews of hundreds of CLI And TUI programs, some great, others barely known and clearly forgotten. The last review is from 2015. Some reviews are very short, others are more involved.

The site is a blog with a tagline "Adventures with lightweight and minimalist software for Linux". The author K.Mandla is opinionated and has certain preferences for such programs like [1].

I have not looked at the site in years, but if you are willing to explore, this could be a fun option to find a variety of these tools.

[1]: https://inconsolation.wordpress.com/2015/01/19/wpe-and-we-so...

In the same TUI spirit:

https://github.com/cosmos72/twin

A text mode environment and window manager, with terminal emulation, VNC-style sessions and viewers, and networked clients.

Disclaimer: I'm the author

If you want more Emacs examples, Org-mode and Spacemacs (especially in Evil-mode) have a ton of functionality
https://github.com/jonas/tig is one of the first things I install on a new dev machine. It's a really nice UI for staging files or hunks. Since it's just a companion to the git CLI, it feels much more focused than full-blown git GUIs, and doesn't do anything magical.
yes I do too. I do wish its ui navigation was a bit more 'humane'. more often than not I end up switching to next commit instead of next page.
Absolutely one of the best TUIs for sure.
It's hard to not mention ColorForth here as a primarily-text-based UI, although it ran in graphical mode and did its own text rendering. There were a few language-based innovations that tied closely in to the UI, including the use of color tags on pre-tokenized source code to both select display color, but also to select semantic category of the symbol (e.g. execute at compile time like a macro, execute at run time like a function call, define a new symbol). Probably more interesting is its use of a modified dvorak keyboard layout (later with qwerty support as well), with a consistent onscreen display of the keyboard mapping, indicating what each press will do at any time. I can see this concept generalizing to something like vi where the key-to-meaning mapping is equally dynamic and modal. Lots of other info at https://www.greenarraychips.com/home/documents/greg/cf-humin... and elsewhere.
As someone who writes software for moderately boring business operations, I've been wondering making terminal-based apps with lots of keyboard shortcuts would lead to a more productive end user than writing a web app.

I've been looking at https://github.com/gui-cs/Terminal.Gui but haven't tried it yet.

I'm old enough to have used green screen CICS apps in a bank. The things that really helped productivity were:

* Information dense screens (despite having only 80x25 characters)

* Responsiveness

* Reliable type-ahead when the responsiveness wasn't quite good enough

Those used to be common features of websites until 5-10 years ago too. And I'm assuming that you mean 'responsiveness' in the sense of 'application responds immediately to user input' rather than the misnomer usage common in web development.
The "htop" app, an alternative to the conventional "top," is a nice example of a TUI: <https://htop.dev/>
htop is great, but I've migrated to bottom which has a very similar interface with "btm --basic".

[1] https://github.com/ClementTsang/bottom

interesting. could you share the advantages of "btm --basic" over htop?
Not the OP, but the graphs over time are a nice touch.
btm --basic doesn't show graphs. but that is the point because when i saw the graphs i felt that while that is nice, that's not a replacement for top/htop. it's something different. btm --basic however looks very similar to htop. so similar that i didn't see the benefit.
Well you have the MS-DOS era Borland tools.

Someone took the time to rewrite it as a cross-platform open source library: https://github.com/magiblot/tvision

Edit: Not a rewrite, but a port. See comments below.

TurboVision was distributed as source with some of the Borland tools, and later open-sourced, I think. So it's not a rewrite, just a port to non-DOS terminals.
Yes, that's mentioned in the README.
this has very strong nostalgia vibes. that's where i learned pascal and C programming.

what i would like to see is a gui layer that wraps turbo vision such that i can have apps that work in the terminal and in a GUI. ideally so that the app binaries directly work in both without any recompile or change of code.

> Someone took the time to rewrite [port] it as a cross-platform open source library: https://github.com/magiblot/tvision

I just now came across the following related to Turbo Vision:

> TuiCss is a library focused to create web applications using an interface based on ASCII table, like the old MS-DOS applications. ...... The base of this project is Turbo Vision Framework, but some other frameworks were also checked to introduce some features to TuiCss, like curses, ncurses, Newt, etc.

https://www.npmjs.com/package/tuicss

Qmodem was written in Turbo Pascal. It felt futuristic.
QuickBASIC or even Visual Basic 1 immediately come to mind. They have good, discoverable navigation and documentation.

I have no idea where you'd be able to find it since it's a proprietary product but InfoLease 9 had one of my favorites TUIs from a long gone era. You could navigate through and edit complicated contract information extremely quickly through a series of fixed number based menus and views. Once I got the hang of it I could blaze through entering tons and tons of data without any effort. I suppose a lot of BBSes had a kind-of similar interface but without the field validation and documentation (you could write ? virtually anywhere to get quick documentation about what you were editing or what something was intended for, and fields were validated in this really "perfect" way where it never felt like you lost time if you fat-fingered something).

QuickBASIC's modernity was just popping out of those 80x25 character cells. It was as promising of the future as Windows 95.
Visual Basic for DOS is AWESOME. I briefly used it last year to make a Wordle clone for Dos.

The 3D buttons in a TUI, event-based programming in DOS, the rich help system… just awesome.

An interface that UI designers of today should pay closer attention to. Same for Delphi in GUI land.
These certainly aren't forgotten, but I like:

* `ranger` file manager: https://ranger.github.io/

* `ncdu` for visualising disk usage: https://dev.yorhel.nl/ncdu

* `htop` process monitor: https://htop.dev/

I just find them very intuitive, and information-dense while not being overwhelming.

`ncdu` is the single best tool I've ever found for tracking down high-disk-usage directories deep in the filesystem. Run it with the `-x` flag to prevent it from crossing mounts.
Better than the kdirstat/windirstat family?
Wow, thanks for the pointer, finding it super useful right now to see what's taking so much space in my backups
Last few weekends I worked on a FPGA based Linux VT subset compatible tty display implementation for my HW projects.

Something that can be used to present some simple TUI on a largish LCD based on a simple 1-wire UART interface in a semi-standardized, performant and cheap way (good quality IPS displays are ~ 6-10 EUR, and tang nano is 10-20 EUR, depending on model).

https://megous.com/dl/tmp/tty-fpga.mp4

It also implements an efficient "scrolling" output mode, so it can simply be connected to anything that produces debug output on UART, too. Use cases are pretty flexible. Smallest Microchip PIC MCU can easily present a reasonably nice UI. :)

It can also accept input over the Tang Nano's USB UART directly from the connected PC (which is what's on the video).

At 3 Mbaud, it's possible to keep updating the content of whole screen at 50 FPS from a simple MCU, over a single wire at easily manageable interface frequencies. Anyhting less, like incremental changes to subset of screen content via ANSI escape sequences pretty much runs at 60FPS/display's refresh rate.

It's based on Tang Nano 9k currently, but it should fit even Tang Nano 1k, which is a bit cheaper.

quite a few great examples on this thread. I'll add lazygit (https://github.com/jesseduffield/lazygit) for doing git stuff, and fx (https://github.com/antonmedv/fx) for working with JSONs.
lazydocker [0] is by the same author as lazygit. I'm thoroughly familiar with the Docker CLI, but sometimes it's just easier to use a GUI or TUI for some things. In particular, I use lazydocker for cleaning up volumes or images that may no longer be needed.

[0] https://github.com/jesseduffield/lazydocker

IBM ISPF suite is gorgeous.
The whole IBM 3270/5250 family is interesting evolutionary line in the sense that it is completely separate from the VT100 style UNIX terminals.
lazygit is excellent imo. every ui with keyboard shortcuts needs an action menu showing the keyboard shortcuts. You can execute commands from this menu, but it teaches you the keyboard shortcuts over time too. especially important for a tui, where it’s mostly/completely keyboard controls.

This one is more a layer 8 issue perhaps, but ideally there is some sort of guard rail that makes it so that if I accidentally start typing a message I think is going into slack, but I still have the tui focused, doesn’t execute a ton of very hard to reverse actions. Perhaps a good undo/redo stack is enough here, but some sort of vim like modality could work even better. It doesn’t happen often, but if it’s something like k9s the blast radius is… pretty big!

Not particularly high-level, but representing common TUI designs and usage patterns on Unix: Slrn, Mutt, Ncdu.

https://en.wikipedia.org/wiki/Slrn

https://en.wikipedia.org/wiki/Mutt_(email_client)

https://en.wikipedia.org/wiki/Ncdu

For those who are familiar with using the *nix du command, ncdu is like a nice step up. Finding what is using your disk space naturally requires repeatedly descending into directories and checking what is using up most space. So having TUI for it makes a lot of sense.

Thanks for listing it.

and despite having learned about it years ago i still can't remember to use it.
du -h|sort -h goes a really long way
ncdu is the next step when you've got as far as you can with `du -h | sort -n`
ncdu also has the really cool feature of being able to dump its internal scan state to stdout and having a flag to load that state, which means you can pipe SSH output from ncdu on a server into a local file. Then you can inspect what's taking up space on a VPS without having to log in on it.

It's especially great if the server is out of disk space and/or the server is under too heavy a load to keep an SSH connection going; you can investigate what's clogging up space (usually logfiles gone awry) and clean up accordingly.

It's one of the default utilities I have installed on my servers for a very good reason and it's helped out countless times over the past few years for hobby servers of mine (aka the ones where "scaling it up" isn't an option because the budget is constrained by it being a hobby).

I miss Borland TurboC++. loved the simple drop down based TUI. the only thing I wish it has today would be good integrated symbol browsing and debugger. pair that with a tmux session and you are golden.
I don't know if it "deserves to be known" but I made debase to make git editing easier: https://toaster.llc/debase
that looks amazing actually. of course it deserves to be known.

i like the conflict resolver, but one thing i didn't see is the ability to outright edit a commit. that is something i'd like to use occasionally

I am using lazygit, which I find really easy to use once you get the hang of it. Debase may not be as powerful as lazygit, but looks much more easier to get started. Great work.
That looks great! Also, the site is excellent. I love how the animated examples change as you scroll down the site.
+1 Rare to see a modern looking website that actually works well. Increases trust in the actual tool and makes me want to try it out.
I love this. Perhaps consider updating the GitHub repo with links, gifs, tags, and a README. It might get some more exposure.