← Back to context

Comment by firesteelrain

5 days ago

Can you explain TUI? I have never heard this before

Terminal User Interface, contrasting with a Graphical User Interface (GUI). Most often applied to programs that use the terminal as a pseudo-graphical canvas that they draw on with characters to provide an interactive page that can be navigated around with the keyboard.

Really, they're just a GUI drawn with Unicode instead of drawing primitives.

Like many restrictions, limiting oneself to just a fixed grid of colored Unicode characters for drawing lends itself to more creative solutions to problems. Some people prefer such UIs, some people don't.

  • I prefer tui's for two reasons. 1. Very used to vi keybindings 2. I like low resources software. I love the ability to open the software in less than a second in a second do what I needed using vi motions. And close it less than a second.

    Some people will be like you save two seconds trying to do something simple. You lose more time building the tool than you will use it in your life.

    It's not about saving time. It's about eliminating the mental toll from having to context switch(i know it sounds ai, reading so much ai text has gotten to me)

    • That’s an excellent way to explain it. I’m already in the shell doing stuff. Whenever I can stay there without sacrificing usability, it’s a big boost.

    • "It's not about saving time, it's about eliminating the mental toll from having to context switch"

      This broke my brain! Woah!

    • Yet another benefit is that it is buffered, so you don't need to wait for the program to catch up, before you can type the next key.

  • > an interactive page that can be navigated around with the keyboard

    Or mouse / trackpad.

    I really haven't seen anything better for making TUIs than Borland's Turbo Vision framework from 35ish years ago.

Eg: lazygit https://github.com/jesseduffield/lazygit?tab=readme-ov-file#... https://github.com/sxyazi/yazi https://github.com/darrenburns/posting or I guess Vim would be a prominent example.

Peoples definitions will be on a gradient, but its somewhere between CLI (type into a terminal to use) and GUI (use your mouse in a windowing system), TUI runs in your terminal like a CLI but probably supports "graphical widgets" like buttons, bars, hotkeys, panes, etc.

  • So the acronym is for Terrible User Interface? ;)

    • TUI is peak UI, anyone who disagrees just don't get it. Every program listens to the same keybindings, looks the same and are composable to work together. You don't get that clicking buttons with the mouse. It's built to get the work done not look pretty.

It's definitely an acronym that got popular in the last year or so, though I'm sure there are people out there who will pretend otherwise. I've been in the industry 15+ years now and never heard it before. Previously it was just UI, GUI, or CLI.

  • It's gotten more popular for sure, but it's definitely been around a long time. Even just on HN there have been conversation about gdb tui ever since I've been here (starting browsing HN around 2011). For anyone who works in embedded systems it's a very common term and has been since I got into it in 2008-ish. I would guess it was much more of a linux/unix user thing until recently though, so people on windows and mac probably rarely if ever intersected with the term, so that's definitely a change. Just my observations.

  • As someone who came up using Borland's Turbo Pascal, Turbo C, and Turbo Vision (their OOP UI framework), it was called CUI (character-based user interface) to distinguish from GUI, which became relevant as Windows became dominant.

    I never heard "TUI" until the last few years, but it may be due to my background being Microsoft-oriented.

    One of the only references I can find is the PC Magazine encyclopedia: https://www.pcmag.com/encyclopedia/term/cui

  • My friends and I have been actively in the "CLI/TUI" since middle school. Anyone tinkering on linux that used tiling window managers is already very familiar with the domain.

Terminal UI.

  • Textual / Text-based UI used to be more common.

    Makes more sense, too: Although you run TUI apps in it, the terminal itself is inherently more of a CLI than a TUI. Makes "terminal" rather misleading, IMO.

[flagged]

  • They aren’t the same thing. TUI refers to interactive ncurses-like interfaces. Vim has a TUI, ls does not

    I’m fairly certain this terminology has been around since at least the early aughts.

  • I don't know when the term became widespread for gui-style terminal programs, but the wikipedia entry has existed for more than 20 years so I think it is an older term than you imply.

    https://en.wikipedia.org/w/index.php?title=Text-based_user_i...

    • Yeah, but I see your link is to "Text-based_user_interface", not "Terminal_user_interface". (Personally, I recall seeing "Textual" at least as often as "Text-based".)

      The styling "Terminal" is new to me; I'm not sure I've even ever seen it before this thread. That's the "new-fangled bit for gen-Z", as others in this sub-thread have bemoaned, AFAICS.

      And I must admit I rather agree with those bemoaners: It's stupid. Sure, you do run your TUI apps in the terminal, but the terminal itself is really a CLI, not a TUI. This makes the term rather misleading.

      So "Text[ual|-based] User Interface" is a far better reading of "TUI" than "Terminal User Interface", IM(ns)HO.

  • Sorry, but this 65 yo grey-beard disagrees. A TUI to me, back in the 80s/90s, was something that ran in the terminal and was almost always ncurses-based. This was back when I was still using ADM-3A serial terminals, none of that new-fangled PCs stuff.

    • Exactly. A CLI is a single line - like edlin. A TUI takes over all or most of the screen, like edit or vi or emacs.

      Norton Commander (or Midnight Commander) is probably the quintessential example of a powerful TUI; it can do things that would be quite hard to replicate as easily in a CLI.