
Show HN: Promptui – Rich UI elements for cli prompts in Go - MayBeColin
https://github.com/manifoldco/promptui
======
fimdomeio
I've been dreaming with a sci-fi world where at some point the web get's so
awful, that a small group splits to an alternate hypertext reality that is
only text based.

~~~
pavlov
Some people keep Gopher alive, apparently -- so maybe that's where survivors
will take refuge after the JavaScript ad tracking apocalypse finally comes.

~~~
digi_owl
Not sure if gopher is the right fit.

~~~
pavlov
In the post-JavaScript apocalyptic nightmare, the few remaining working
terminals will be green-on-black CRTs with nuclear launch instructions burned
in the screens. Gopher is a good fit.

~~~
j_s
> green-on-black CRTs

Any source for something like this that is usable on a modern computer? I did
a bit of eBay-ing and everything was ancient/incompatible and megabucks.

------
hammerandtongs
The single screencast is pretty compelling, I'd suggest just screencasting
everything from the examples and adding to your landing page.

Don't have an immediate use but I like it.

~~~
jeffandersen
Truth be told we did actually screencap a bunch of scenarios for a blog post
[https://blog.manifold.co/promptui-get-user-input-in-your-
cli...](https://blog.manifold.co/promptui-get-user-input-in-your-
cli-72eb6ee78927)

But you're right, we should bring them to the readme or to the _examples
folder.

------
AlecAivazis
It's pretty great to see so many different takes on these visual prompts!
Going through the source, it looks pretty similar to an early version of one
of my projects - have you ran into any issues with chyzer/readline? I can't
remember the exact reason I had to ditch it, but I think there were problems
with its support for Windows

Here's the project for anyone interested:
[https://github.com/AlecAivazis/survey](https://github.com/AlecAivazis/survey)

------
roadbeats
Have you tried it in Linux ? Emojis are not available there.

~~~
nfrmatk
That depends on your distro. Fedora 27 just shipped recently with colored
emoji support thanks to the Google noto emoji font.

~~~
roadbeats
I shipped my distro (Happy Hacking Linux) with emoji fonts a year before
Fedora. That font is useful only for GUI apps, won't work in CLI.

~~~
nfrmatk
It absolutely works in gnome-terminal on GNOME 3.26.

------
kovek
I think of Emacs as a program with a great text interface. I think that
something like this should be easily done in Emacs. However, I don't think
this is the case today, as per some research I've done this summer. Anyone has
ideas on what set of packages could be utilized with elisp in order to achieve
rich UI elements for emacs?

~~~
thibran
Emacs has already some kind of buttons and search fields, check out M-x
"customize" to see some of them.

------
deadliftdouche
I'd recommend people also check out ishell
[https://github.com/abiosoft/ishell](https://github.com/abiosoft/ishell) I've
used it in a project before and absolutely loved the API + autocomplete
functionality.

~~~
alpb
[https://github.com/AlecAivazis/survey](https://github.com/AlecAivazis/survey)
is a little bit better. I haven't compared it with promptui, yet, however.

------
meinstein
Reminds me of another great project:
[https://github.com/alecaivazis/survey](https://github.com/alecaivazis/survey)

------
igitur
I like this. Do similar projects exist for other languages?

~~~
baliex
I'd be interested in something like this for python

~~~
quodlibetor
prompt_toolkit is, IMO, the standard by which all of these types of libraries
should be measured.

It's incredibly easy to get started with, and lets you build crazy wonderful
things like pt_python and pgcli/mycli.

~~~
cosud
For REPL like things prompt_toolkit is great. For anything else (menus, forms)
i find it difficult to use or at least discouraging.

------
tty7
rich cli prompts is an oxymoron, but I'm glad you support vim movement:
[https://github.com/manifoldco/promptui/blob/master/select.go...](https://github.com/manifoldco/promptui/blob/master/select.go#L33)

~~~
ams6110
I so much agree. There's enough dancing baloney on the web, we don't need it
infecting the command line. Just say no.

~~~
pvdebbe
Yes. Your software is CLI only if you can use it with a teletyper interface.

