Live data from Hacker News

Building Rich Terminal Dashboards

willmcgugan.com

11–20 of 123 posts

Re: Building Rich Terminal Dashboards

#11
post #9

Is this better than splitting panes up with Tmux or similar? You end up losing the ability to pipe things. What do you gain?

Looks like its powerful because you can have a loop and update metrics you can get via python.

I've always wanted to create something like vtop but for network and disk io, this might finally let me do it myself.

Re: Building Rich Terminal Dashboards

#12
post #8
post #5

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.

There's `blessed` [0], a plain JS lib similar to `ncurses`. There's also `react-blessed` [1], which is a React renderer that targets `blessed` as the display layer, and `ink` [2], which is also a text-based React renderer but using its own display layer. [0] https://github.com/chjj/blessed [1] https://github.com/Yomguithereal/react-blessed [2] https://github.com/vadimdemedes/ink

If you plan on using blessed, there’s also blessed-contrib, which is a library of widgets for blessed.

https://github.com/yaronn/blessed-contrib

Re: Building Rich Terminal Dashboards

#13

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.

pip is installed by default on mac and linux. For non posix experienced users, pip installing packages is actually easier than figuring out how to put a binary on the path. Not to mention, updates are just a command, you dont have to go find the url, redownload, and replace the binary.

Re: Building Rich Terminal Dashboards

#14
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: https://ghtop.fast.ai/ .

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.

Let me know if you have any questions about our experiences with Rich and ghtop.

Re: Building Rich Terminal Dashboards

#15

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.

pip is installed by default on mac and linux. For non posix experienced users, pip installing packages is actually easier than figuring out how to put a binary on the path. Not to mention, updates are just a command, you dont have to go find the url, redownload, and replace the binary.

Realistically speaking people will most likely install cli tools with brew on mac. People shouldn’t be pip installing things without virtualenv anyway.

Re: Building Rich Terminal Dashboards

#16

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.

As someone who really only knows Python (I'm not a developer), I was thinking the same thing. I think this would be really useful for me to use for some personal projects. Or for libraries for someone who already uses Python. I guess that's enough for it to be useful, but I wish I could package it up better to let someone who doesn't know a thing about Python use what I made.

It looks like a great library! Definitely useful for internal tools, personal scripts...

As a user I’m just encouraging people not to use an interpreted language to build tools you plan to distribute.

Re: Building Rich Terminal Dashboards

#18

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.

Except you can bake apps into a single stand-alone binary executable for both Node.JS[1] and Python[2]

[1] https://www.npmjs.com/package/pkg [2] https://github.com/marcelotduarte/cx_Freeze

Re: Building Rich Terminal Dashboards

#19
post #9

Is this better than splitting panes up with Tmux or similar? You end up losing the ability to pipe things. What do you gain?

The ability to wrap up arbitrary data sources into an attractive, easy-to-parse TUI. If you have a bunch of things you look at via watch or something similar, wrapping them in this seems like a natural.

Re: Building Rich Terminal Dashboards

#20
post #17

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. https://ilyabirman.net/meanwhile/pictures/tp-80.png

I miss the simplicity and utility of textual UIs. Nothing unneeded, and everything you need. No filler. No giant gaps between elements or wasted pixels. No fads which do silly things like hide scrollbars or other interactive elements.

Except for CAD applications and some games, almost everything we do online today could be accomplished via textual UI. Almost the entire internet could be replaced with TUIs and a lot of things would be better and more straightforward, and nearly everyone would be able to do what they need to do online.

TUIs are fast, they are light, they are ultra responsive and ... Yeah. They're definitely underrated. They're probably a lot easier for screen-readers, too.

I'm not suggesting that we undo everything and make a TUI web, but I do want to point out that we do a hell of a lot on today's UIs that we don't need to do, solely because some designer who wants to make pretty things that function poorly said so.

Post reply on HN