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?

1 Like

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.

1 Like

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:


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.

1 Like