14 comments

[ 1.6 ms ] story [ 42.4 ms ] thread
What's the point of implementing something like this completely in Javascript? Isn't this a good example of something that should be developed in a lower-level, faster language?
Personally, I avoid languages that require a runtime when developing CLIs. Nothing worse than telling your users "just make sure that you're running the right version of Ruby/Python/Node."
This and other JS CLI libraries are typically used by JS projects that have tooling. Like when create-react-app scaffolds a project and asks you questions to customize it, etc. it's using libraries like this one. For a JS project it's just an easy npm install away as a dependency, and you know your users will have nodejs anyways.

Speed rarely matters for imperative user-facing tools. You're going to be waiting for a user to type and respond far, far longer than making some system calls to write to the shell.

Ink is a more interesting and maintained library to consider though: https://github.com/vadimdemedes/ink It lets you write react-like apps that output to the terminal instead of HTML.

As the other response pointed out it’s not a big deal. Needing a runtime is a small bummer though node is easily installable everywhere now.

What I really like about blessed was it’s api. At one point I made my own fork and was going to try to maintain it. Then I thought I’d try to port it to nim. These days I just use one of the excellent text ui libs in go which is great mostly because of the ecosystem.

That's interesting. I see a runtime like this as a dealbreaker, but different strokes for different folks I suppose.
> the excellent text ui libs in go

I'm working on a go cli project now and I'm looking for a good one, which one are you using?

Nice looking CLI are great.

However I don't think that CLI should mimic GUI, with boxes, transparent windows, shadows, pop-up menus etc. This is way too much bloat...

Why not simply write a GUI if that's what you want?

The point is this gives you a GUI, but is communicated over a terminal. So if you want a GUI from some Docker instance this is a lot easier to fiddle with on the CLI than x-forwarding.
I think that today if you want a remote GUI the simpler solution is to embed a web server.