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.

Building Rich Terminal Dashboards

499 pointsby lumpaover 4 years ago

28 comments

lumpaover 4 years ago
Just realized that the post author submitted[0] it hours before I did, but it didn&#x27;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:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26147831" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26147831</a><p>[1] <a href="https:&#x2F;&#x2F;www.willmcgugan.com&#x2F;blog&#x2F;tech&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.willmcgugan.com&#x2F;blog&#x2F;tech&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;willmcgugan" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;willmcgugan</a>
评论 #26151843 未加载
评论 #26151232 未加载
jph00over 4 years ago
I&#x27;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:&#x2F;&#x2F;ghtop.fast.ai&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ghtop.fast.ai&#x2F;</a> .<p>Rich is really great. It didn&#x27;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.
rexreedover 4 years ago
The future repeats the past. This looks much like the back-end systems I used to design on TurboPascal in the late 1980s &#x2F; early 1990s.<p><a href="https:&#x2F;&#x2F;ilyabirman.net&#x2F;meanwhile&#x2F;pictures&#x2F;tp-80.png" rel="nofollow">https:&#x2F;&#x2F;ilyabirman.net&#x2F;meanwhile&#x2F;pictures&#x2F;tp-80.png</a>
评论 #26150102 未加载
评论 #26150274 未加载
评论 #26153240 未加载
评论 #26150182 未加载
评论 #26150423 未加载
评论 #26151690 未加载
评论 #26152784 未加载
评论 #26151854 未加载
joseluisover 4 years ago
And there&#x27;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&#x27;s made in C, with C++, Python &amp; Rust wrappers.<p>[0] <a href="https:&#x2F;&#x2F;notcurses.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;notcurses.com&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;dankamongmen&#x2F;notcurses" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dankamongmen&#x2F;notcurses</a>
评论 #26155238 未加载
评论 #26153248 未加载
评论 #26153661 未加载
krasinover 4 years ago
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 &#x2F; 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.
mightybyteover 4 years ago
There&#x27;s a slick little Haskell library that does something similar called reflex-vty:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;reflex-frp&#x2F;reflex-vty#reflex-vty" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reflex-frp&#x2F;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&#x27; 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&#x27;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.
l33t_d0nutover 4 years ago
I wrote a post about doing this in PowerShell <a href="https:&#x2F;&#x2F;blog.ironmansoftware.com&#x2F;tui-powershell&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.ironmansoftware.com&#x2F;tui-powershell&#x2F;</a>
评论 #26161615 未加载
willmover 4 years ago
Author of Rich here. Happy to answer any Rich related questions.
评论 #26155128 未加载
评论 #26152319 未加载
corysamaover 4 years ago
For C++ers, there’s ImTui <a href="https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;imtui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ggerganov&#x2F;imtui</a> an ncurses backend for ImGui <a href="https:&#x2F;&#x2F;github.com&#x2F;ocornut&#x2F;imgui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ocornut&#x2F;imgui</a>
评论 #26151181 未加载
lifeisstillgoodover 4 years ago
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
jdnierover 4 years ago
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:&#x2F;&#x2F;github.com&#x2F;prompt-toolkit&#x2F;python-prompt-toolkit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;prompt-toolkit&#x2F;python-prompt-toolkit</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;prompt-toolkit&#x2F;pyvim" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;prompt-toolkit&#x2F;pyvim</a>
评论 #26151356 未加载
pugioover 4 years ago
Does anyone know of a similar library for node which does this? I&#x27;ve decided to make my next app TUI first, and then only add in a GUI much later, but I haven&#x27;t seen anything that looks nearly as good as rich.
评论 #26149796 未加载
评论 #26150250 未加载
aduitsisover 4 years ago
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:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ReGIS" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;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.
dreamer7over 4 years ago
This is really interesting! I&#x27;ve been thinking of creating a TUI version of a marketplace I&#x27;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?
评论 #26151082 未加载
评论 #26153186 未加载
alberthover 4 years ago
If you like terminal dashboards, Go Access has a nice one for web analytics.<p><a href="https:&#x2F;&#x2F;goaccess.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;goaccess.io&#x2F;</a>
leg100over 4 years ago
Does anyone have a recommendation for implementing an equivalently flashy terminal dashboard in golang?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;gizak&#x2F;termui" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gizak&#x2F;termui</a> ?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mum4k&#x2F;termdash" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mum4k&#x2F;termdash</a> ?
itronitronover 4 years ago
Java devs might be interested in Lanterna &gt;&gt; <a href="https:&#x2F;&#x2F;github.com&#x2F;mabe02&#x2F;lanterna" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mabe02&#x2F;lanterna</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8042106" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8042106</a>
mraza007over 4 years ago
Looks pretty cool. As someone who uses commandline all the time I think this can be really useful to build TUIs
federico_cover 4 years ago
[Sorry for the spam]<p>If you want to create charts quickly there&#x27;s also: <a href="https:&#x2F;&#x2F;github.com&#x2F;FedericoCeratto&#x2F;dashing" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FedericoCeratto&#x2F;dashing</a>
评论 #26153842 未加载
评论 #26153171 未加载
Noxmilesover 4 years ago
I don&#x27;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)
LukeB42over 4 years ago
Reminds me of Window, which has keyboard input: <a href="https:&#x2F;&#x2F;github.com&#x2F;lukeb42&#x2F;window" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lukeb42&#x2F;window</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;lukeb42&#x2F;emissary" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lukeb42&#x2F;emissary</a>
mixmastamykover 4 years ago
How does this compare to Urwid, in terms of features, which I&#x27;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&#x2F;packages.
xx789over 4 years ago
I dont need menus or dialogs, just something simple like top. Would this be the right library to use?
评论 #26151515 未加载
dutzi_over 4 years ago
Check out React Ink, it&#x27;s pretty slow and probably not as polished&#x2F;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.
lddover 4 years ago
Is there something like this for node(javascript&#x2F;typescript)?
评论 #26151247 未加载
solosoyokazeover 4 years ago
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.
评论 #26150070 未加载
评论 #26152255 未加载
评论 #26149810 未加载
评论 #26149938 未加载
评论 #26149784 未加载
tra3over 4 years ago
Is this better than splitting panes up with Tmux or similar? You end up losing the ability to pipe things. What do you gain?
评论 #26151121 未加载
评论 #26150071 未加载
评论 #26149868 未加载
samorozcoover 4 years ago
Is it just me or does it seems like we&#x27;re going backwards with things like this?
评论 #26151447 未加载