I fell for the hype that Textual always gets on HN and actually used it for a mid-sized commercial app a few months ago. I figured it was a 'safe' choice, given all the developers here who seem to like it, and it was the only TUI library I could find with corporate backing. Here are my notes.<p>1. Considering it has actual paid developers working on it for quite a while and VC funding, it still lacks a great many features that I took for granted in all the non-commercial TUI libraries, e.g. menus and dialog boxes.<p>2. The async nature of the library is unpleasant. Can never be sure when/where your code will run.<p>3. Lots of 'magic' Python variables and methods that you have to override, but there's no way to discover them in your IDE through the type system.<p>4. Using CSS for laying out a TUI app makes no sense (unless you are a web developer and have Stockholm syndrome from using it for web apps?)<p>5. It seems to leak memory.<p>Eventually re-wrote the app from scratch using a different library that gets far less hype and spends no time marketing itself. The result was much better in every way.
Textual is fantastic, and with all the recent widget additions, provides functionality on-par with Go's Bubble Tea[0] / Bubbles[1] combo.<p>The Textual blog[2] is a great place to keep up with new features, along with interesting articles about problems encountered (and solved) during development.<p>Incidentally, Textual[3] is also the name of a very popular open-source[4] IRC client for macOS<p>[0] <a href="https://github.com/charmbracelet/bubbletea">https://github.com/charmbracelet/bubbletea</a>
[1] <a href="https://github.com/charmbracelet/bubbles">https://github.com/charmbracelet/bubbles</a>
[2] <a href="https://textual.textualize.io/blog/" rel="nofollow">https://textual.textualize.io/blog/</a>
[3] <a href="https://www.codeux.com/textual/" rel="nofollow">https://www.codeux.com/textual/</a>
[4] <a href="https://github.com/Codeux-Software/Textual">https://github.com/Codeux-Software/Textual</a>
Textual keeps coming up — a perennial favorite on Hacker News. But I have yet to encounter high-quality TUI applications that use it. Why is that? Maybe I've messed them and people can post their favorites.
Judging only by the screenshots it feels like this library is embracing the same "modern" design as mobile apps. Huge buttons, lots of whitespace everywhere.<p>I use terminal apps precisely because I want a lot of information density and responsiveness.<p>But perhaps the screenshots are not comprehensive enough to show what it can do.
I really like Textual. I'm very much the TUI type, and upon discovering it, I decided it would be my go-to for interfaces going forward, as - ideally - I'd be able to run the same apps on my desktop as my home server as my cloud servers.<p>Well on the latter two, I realized I had a huge uphill battle, as SSH apparently uses CRLF over LF, and I was finding myself having to rewrite half the library to accommodate that.*<p>And on the former, it occurred to me that I hate everything about Python's asyncio. I'm sure that'll anger some, but sorry, it's terrible, and it doesn't help that every major version deprecates something in favor of something new.<p>[*] Any advice here would be welcome. I can't find much literature on the subject.
I don't really know why this post is appearing now given textual is already at version 2 and not a new thing, but I love love looovve textual. Alongside rich (also from textualize) its one of those rare libraries that I can't find a single thing I'd change in it.
i invite you change my view: there is absolutely no reason to fetishize the terminal. it’s a shitty interactive window with needless constraints. anything you can do in a tui can be done better in an actual graphical window.
It's very nice that Textual has a text input widgets. Seems like many TUI libraries have widgets, but lack one to handle text input. So you have to implement this yourself over and over, often forgetting shortcuts people expect (e.g. ctrl+a/e).
i think its very cool but i have to ask a potentially very rude question that is not meant to be rude<p>was not turbo pascal circa 1993 kind of ... easier to use than the text uis we have now?
"Beautiful" is quite subjective... Especially in regard of terminal UI...<p>Or rather beautiful in what sense? Source code, architecture, or what?
According to its official website, Textual lets you get a dynamic layout up and running in minutes and refine the UI by tweaking a few lines. It separates the application logic from the presentation layer, making it easier to maintain and test your code. Textual supports UI elements such as buttons, text boxes, and menus.