TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Textual is a beautiful Terminal User Interface library in Python

210 pointsby joss82about 2 years ago

12 comments

billyjobobabout 2 years ago
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 &#x27;safe&#x27; 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&#x2F;where your code will run.<p>3. Lots of &#x27;magic&#x27; Python variables and methods that you have to override, but there&#x27;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.
评论 #35128592 未加载
评论 #35127077 未加载
评论 #35127166 未加载
评论 #35128422 未加载
评论 #35125909 未加载
评论 #35126694 未加载
评论 #35126739 未加载
评论 #35130309 未加载
评论 #35125950 未加载
评论 #35126007 未加载
评论 #35127844 未加载
评论 #35130574 未加载
评论 #35126037 未加载
eddygabout 2 years ago
Textual is fantastic, and with all the recent widget additions, provides functionality on-par with Go&#x27;s Bubble Tea[0] &#x2F; 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:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea">https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbletea</a> [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbles">https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;bubbles</a> [2] <a href="https:&#x2F;&#x2F;textual.textualize.io&#x2F;blog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;textual.textualize.io&#x2F;blog&#x2F;</a> [3] <a href="https:&#x2F;&#x2F;www.codeux.com&#x2F;textual&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.codeux.com&#x2F;textual&#x2F;</a> [4] <a href="https:&#x2F;&#x2F;github.com&#x2F;Codeux-Software&#x2F;Textual">https:&#x2F;&#x2F;github.com&#x2F;Codeux-Software&#x2F;Textual</a>
lazzlazzlazzabout 2 years ago
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&#x27;ve messed them and people can post their favorites.
评论 #35128576 未加载
评论 #35130364 未加载
wkat4242about 2 years ago
Judging only by the screenshots it feels like this library is embracing the same &quot;modern&quot; 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.
评论 #35129695 未加载
z3c0about 2 years ago
I really like Textual. I&#x27;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&#x27;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&#x27;s asyncio. I&#x27;m sure that&#x27;ll anger some, but sorry, it&#x27;s terrible, and it doesn&#x27;t help that every major version deprecates something in favor of something new.<p>[*] Any advice here would be welcome. I can&#x27;t find much literature on the subject.
评论 #35127099 未加载
评论 #35124857 未加载
评论 #35125532 未加载
benrutterabout 2 years ago
I don&#x27;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&#x27;t find a single thing I&#x27;d change in it.
评论 #35128787 未加载
BaculumMeumEstabout 2 years ago
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.
评论 #35127312 未加载
评论 #35126458 未加载
评论 #35129291 未加载
评论 #35129357 未加载
评论 #35126394 未加载
评论 #35126750 未加载
评论 #35126093 未加载
评论 #35126816 未加载
评论 #35129481 未加载
评论 #35126356 未加载
guitarbillabout 2 years ago
It&#x27;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&#x2F;e).
评论 #35126082 未加载
fatneckbeardabout 2 years ago
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?
c-smileabout 2 years ago
&quot;Beautiful&quot; is quite subjective... Especially in regard of terminal UI...<p>Or rather beautiful in what sense? Source code, architecture, or what?
coltensabout 2 years ago
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.
fnordpigletabout 2 years ago
Wish it had rust bindings
评论 #35126346 未加载