7 ms·
Show HN: Promptui – Rich UI elements for cli prompts in Go
- tty7 9y agorich cli prompts is an oxymoron, but I'm glad you support vim movement: https://github.com/manifoldco/promptui/blob/master/select.go#L33 https://github.com/manifoldco/promptui/blob/master/select.go...
- igitur 9y agoI like this. Do similar projects exist for other languages?
- luizbranco 9y agoAny language in particular? For JavaScript I'd recommend https://github.com/SBoudrias/Inquirer.js https://github.com/SBoudrias/Inquirer.js
- fabiospampinato 9y agoI agree. I've published a package that exposes a few convenience methods written using it, including a cool one for printing a table (which detects the width of the terminal window and hides extra columns automatically). Check it out https://github.com/fabiospampinato/inquirer-helpers https://github.com/fabiospampinato/inquirer-helpers
- baliex 9y agoI'd be interested in something like this for python
- aoeusnth1 9y agoMe too, I would definitely use a fancy python CLI library.
- quodlibetor 9y agoprompt_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 9y agoFor REPL like things prompt_toolkit is great. For anything else (menus, forms) i find it difficult to use or at least discouraging.
- jernfrost 9y agoWhile not quite the same, the REPL of the Julia programming language supports modes as plugins. Out of the box there is the Julia mode for writing julia code, shell mode for shell commands and help mode for getting help on functions. But I've seen lots of interesting ways of extending this. E.g. one of the debuggers for Julia, Gallium simply adds some new modes. So you can be in stepping-through-code-mode and then at any time switch back to Julia mode and inspect variables at that point in the execution stack. Another mode is a package mode being developed for the new Julia package manager. So when adding, removing, updating, creating etc packages you can go into package mode and get behavior relevant to working with packages. I had the idea of creating a mode for a board game, e.g. a Settlers of Catan mode, which is focused on issuing commands relevant to that game.
- shakna 9y agoI feel the need to mention "newt" [0][1] here. It's the C library behind whiptail, a reimplementation of dialog, which is a cli app for making menus. Incidentally, dialog is usually what you see when you get a semi-gui install with many Linux distributions. Being C, you can use it with just about everything. [0] https://en.wikipedia.org/wiki/Newt_%28programming_library%29 https://en.wikipedia.org/wiki/Newt_%28programming_library%29 [1] https://pagure.io/newt https://pagure.io/newt
- floatboth 9y agoI made https://github.com/myfreeweb/interactor https://github.com/myfreeweb/interactor for Rust
- j_s 9y agoSuprised to not see ncurses mentioned anywhere yet. Not sure it's an exact match but it's well supported in the same ballpark.
- igitur 9y agoAnything like this for a .NET command line application?
- hammerandtongs 9y agoThe 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 9y agoTruth 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-72eb6ee78927 https://blog.manifold.co/promptui-get-user-input-in-your-cli... But you're right, we should bring them to the readme or to the _examples folder.
- petercooper 9y agoThe introductory screencast was a key part behind Rails' initial success back in the day :)
- deadliftdouche 9y agoI'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 9y agohttps://github.com/AlecAivazis/survey https://github.com/AlecAivazis/survey is a little bit better. I haven't compared it with promptui, yet, however.
- Southclaws 9y agoAnother one I came across recently was termui: https://github.com/gizak/termui https://github.com/gizak/termui
- fimdomeio 9y agoI'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.
- freedomben 9y agoI'd join that commune
- dorian-graph 9y agoThe tildeverse?
- pavlov 9y agoSome people keep Gopher alive, apparently -- so maybe that's where survivors will take refuge after the JavaScript ad tracking apocalypse finally comes.
- kovek 9y agoI 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?
- JetSpiegel 9y ago> achieve rich UI elements for emacs Are you saying emacs is not customizable enough?
- thibran 9y agoEmacs has already some kind of buttons and search fields, check out M-x "customize" to see some of them.
- roadbeats 9y agoHave you tried it in Linux ? Emojis are not available there.
- nfrmatk 9y agoThat depends on your distro. Fedora 27 just shipped recently with colored emoji support thanks to the Google noto emoji font.
- appbee 9y agolooks (v) female version
- deleted 9y ago[deleted]
- AlecAivazis 9y agoIt'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
- meinstein 9y agoReminds me of another great project: https://github.com/alecaivazis/survey https://github.com/alecaivazis/survey