I dont know when it exactly started but I've heard and use this term at least 15 years. CLI != TUI. TUI is more like a "standard" window (GUI) but all text based.
Well... CLI is Command Line Interface, or a classic ./name --options reading output in a terminal and writing options, piping to other tools to tweak the output. It's good for some usages, and for scripting, but not much for event-loop based activities.
TUI, Textual User Interface today tend to be a 2D terminal graphic, from ncurses to framebuffer. Classically it's simply a 2D UI based on text, so for instance Plan 9 ACME editor is a TUI since it's graphic but you can write text anywhere creating and changing menus, toolbars etc.
I think there is no official Jargon File entry to clarify this, 99% of the time people name TUI an ncurses UI, witch is a debatable since it can be not really usable as text and so as Terminal User Interface, but a CLI is also a terminal user interface.
CLIs can be graphical too! One classic example is AutoCAD:
> The command line interface provides an important method for controlling AutoCAD. For many users, it is the primary input method. The command line is also used for displaying and selecting command options.
- GUI :: graphical UI, typically NOT easy to mold by the end users, mostly widget based UIs, as their main characteristic or the user of them is more a consumer than a producer of something;
- CLI :: a REPL, typically a terminal, but definitively not only that, their users enter commands, read responses as main characteristic;
- TUI :: a 2D UI (typically though it could probably be also a 3D and 4D one) easy to be mold by the end user, the user is both a producer and a consumer as their main characteristic. An WYSIWYG editor is a kind of TUI in that regard, an Emacs buffer is another since in both text can be entered somewhat freely and can became "active" like clickable links. The user read, or consume, but also write, or produce.
An ncurses UI should be TUI being text-based and 2D but still lack the user mold part so well... Still unsure how to classify the acronym...
I've also never heard this term. Back when text interfaces for mail were the default, but they started getting "fancy" like elm, pine and mutt in the 90s, they were always called curses or ncurses interfaces. When GUIs became a thing, the older things became called text-mode, but I've never encountered TUI before.
The only TUI that I'd heard of is the travel company.
But what does it actually stand for? Terminal user interface? Text user interface? I'm not complaining or saying it shouldn't be used, I'd just never seen it before and my initial searches for TUI were all overloaded with other things.