4 ms·
I like this. Do similar projects exist for other languages?
by igitur 9y ago
I 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?