Just realized that the post author submitted[0] it hours before I did, but it didn't come up in search because it was dead at the time.<p>This is sad because Will writes great posts[1] and great software[2], but somehow his submissions mentioning Rich tend to end up dead. Would it be a case of bad project name for HN titles?<p>[0] <a href="https://news.ycombinator.com/item?id=26147831" rel="nofollow">https://news.ycombinator.com/item?id=26147831</a><p>[1] <a href="https://www.willmcgugan.com/blog/tech/" rel="nofollow">https://www.willmcgugan.com/blog/tech/</a><p>[2] <a href="https://github.com/willmcgugan" rel="nofollow">https://github.com/willmcgugan</a>
I'm one of the developers of ghtop (along with Nat Friedman, who made the original version, and Hamel Husain), which, as mentioned in the post, kinda inspired this new direction for Rich. You can see screenshots of what we made here: <a href="https://ghtop.fast.ai/" rel="nofollow">https://ghtop.fast.ai/</a> .<p>Rich is really great. It didn't actually need us to add much to make it work as a terminal layout manager too - all the pieces were really there already for us to build on.<p>Let me know if you have any questions about our experiences with Rich and ghtop.
The future repeats the past. This looks much like the back-end systems I used to design on TurboPascal in the late 1980s / early 1990s.<p><a href="https://ilyabirman.net/meanwhile/pictures/tp-80.png" rel="nofollow">https://ilyabirman.net/meanwhile/pictures/tp-80.png</a>
And there's also Notcurses[0][1], which facilitates the creation of modern TUI programs, making full use of Unicode and 24-bit TrueColor. It presents an API similar to that of Curses, riding atop Terminfo. It's made in C, with C++, Python & Rust wrappers.<p>[0] <a href="https://notcurses.com/" rel="nofollow">https://notcurses.com/</a><p>[1] <a href="https://github.com/dankamongmen/notcurses" rel="nofollow">https://github.com/dankamongmen/notcurses</a>
The most productive tools I built for non-programmers were using text UI. They were fast, clean, obvious to use. Turbo Pascal made it especially easy with good support for menus and windows / panes.<p>Nowadays, terminals have no problem with mouse support, which everyone can test by starting htop in a terminal and clicking with a mouse on a column title to sort by it.
There's a slick little Haskell library that does something similar called reflex-vty:<p><a href="https://github.com/reflex-frp/reflex-vty#reflex-vty" rel="nofollow">https://github.com/reflex-frp/reflex-vty#reflex-vty</a><p>One thing neither of these libraries appear to have done yet that I would really like is create a more compact window rendering. Currently each window gets a 1-character border. What I would like is something that saves space by collapsing adjacent windows' borders into a single character instead of having two redundant borders next to each other. Of course I get why they do it the way they do, but terminals are often more constrained for space and with complex UIs you can lose a fair amount due to these unnecessary borders. That would be the next thing I'd hack on to improve these kinds of libraries. But alas...too many fun projects to hack on and not enough hours in the day.
I wrote a post about doing this in PowerShell <a href="https://blog.ironmansoftware.com/tui-powershell/" rel="nofollow">https://blog.ironmansoftware.com/tui-powershell/</a>
For C++ers, there’s ImTui <a href="https://github.com/ggerganov/imtui" rel="nofollow">https://github.com/ggerganov/imtui</a> an ncurses backend for ImGui <a href="https://github.com/ocornut/imgui" rel="nofollow">https://github.com/ocornut/imgui</a>
I like this as I find for <i>most</i> things a TUI is simpler to write and 95% as useful - especially for work small tools - where you are making something you might use a few times and just want to throw it in the toolbox and maybe just have a minor UI to guard against horrors.<p>Being this simple looks enticing
The Console and Layout api looks really simple for creating dashboards.<p>Another option for full-screen apps is Python Prompt Toolkit[1], which also handles keyboard and mouse input and can be used to implement editors[2].<p>[1] <a href="https://github.com/prompt-toolkit/python-prompt-toolkit" rel="nofollow">https://github.com/prompt-toolkit/python-prompt-toolkit</a><p>[2] <a href="https://github.com/prompt-toolkit/pyvim" rel="nofollow">https://github.com/prompt-toolkit/pyvim</a>
Does anyone know of a similar library for node which does this? I've decided to make my next app TUI first, and then only add in a GUI much later, but I haven't seen anything that looks nearly as good as rich.
Very nice! There is a certain appeal to having simple, versatile and robust systems such as a terminal emulator to build upon instead of complex APIs that require many many hours just to understand their asynchronous operation and complexities. Combined with Unicode, there seems to be a small renaissance in the area of what can be done in a terminal, which is both nostalgic and refreshing!<p>And, terminal emulators such as iTerm can nowadays display images. And vector or bitmapped graphics were actually a thing once. E.g. I believe xterm can still understand and display <a href="https://en.wikipedia.org/wiki/ReGIS" rel="nofollow">https://en.wikipedia.org/wiki/ReGIS</a> graphics. Surely there must be better and simpler alternatives that I may be missing. Having an empty canvas and drawing to it without too much hassle is reminiscent of the era when this was done with a few lines of BASIC.
This is really interesting! I've been thinking of creating a TUI version of a marketplace I'm running in the UK. The idea is that most of our time on marketplaces is spent on discovering the product we are looking for and that is much easier to do without all the bloat of modern apps. What do the people on HN think?
If you like terminal dashboards, Go Access has a nice one for web analytics.<p><a href="https://goaccess.io/" rel="nofollow">https://goaccess.io/</a>
Does anyone have a recommendation for implementing an equivalently flashy terminal dashboard in golang?<p><a href="https://github.com/gizak/termui" rel="nofollow">https://github.com/gizak/termui</a> ?<p><a href="https://github.com/mum4k/termdash" rel="nofollow">https://github.com/mum4k/termdash</a> ?
[Sorry for the spam]<p>If you want to create charts quickly there's also: <a href="https://github.com/FedericoCeratto/dashing" rel="nofollow">https://github.com/FedericoCeratto/dashing</a>
I don't want my terminal tools rely on a Python pip library. This Rich really looks cool and is nice, but nothing for (my) server use.<p>(Thanks to @joseluis who posted about notcurses here)
Reminds me of Window, which has keyboard input:
<a href="https://github.com/lukeb42/window" rel="nofollow">https://github.com/lukeb42/window</a>
<a href="https://github.com/lukeb42/emissary" rel="nofollow">https://github.com/lukeb42/emissary</a>
How does this compare to Urwid, in terms of features, which I've used in the past to build such interfaces? For simpler stuff I often use my own console package, which everyone should write once, haha.<p>Architecturally however, I think terminal primitives and widgets should be separate layers/packages.
Check out React Ink, it's pretty slow and probably not as polished/feature packed, but it does the job.<p>That being said, working in the CLI with a GUI does not work very well.<p>Having the option to search for strings logged in some pages ago is really handy.
It seems like Python and Node are not good choices for command line tools. Rust or Go make a lot more sense as your end users won’t have to install any libs or package managers. Single binary distribution ftw.