shdblowers

shdblowers

Is there a CLI prompt tool for Elixir?

Hello, I’m looking for an Elixir library to build CLI prompts similar to Enquirer for Node. Specifically looking to do multi-select prompts.

I could not find anything suitable via searching the usual resources.

Does anyone know of a library that does this?

Marked As Solved

axelson

axelson

Scenic Core Team

I don’t know of any existing library, but this is a cool blog post series that walks through the building blocks of working with a CLI prompt:

Also Liked

OvermindDL1

OvermindDL1

Haven’t ran across something yet that does, but you could make one!

The BEAM’s console input/output is simple pipes, so you’d need to use envvars to figure out things about the terminal, probably using the terminfo database. In addition the BEAM is not really made to be interacted in that way, an internal SSH client is more common (the BEAM is made for long running servers, not short scripts), so something that was able to support either a file stream and the built-in SSH client would be nice. Also I doubt it would work well in the shell, it is not ‘smart’ in that way at all.

shdblowers

shdblowers

Thanks for the responses received.

My current solution has been to go with ExPrompt, it is not exactly what I want, but has saved me some effort in coding these prompts myself.

To clarify, I am building a script that will run as a custom distillery command for a much larger app, rather than a self-contained CLI app.

Where Next?

Popular in Questions Top

belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement