question
Simple wrapper function to grab user input in a CLI tool. It prints a prompt to stdout, waits and returns the user answer in a callback. Provides bindings for erlang and javascript.
Installation
gleam add question
Example
import question.{question}
pub fn main() {
question("The original prompt engineering?\n", fn (answer) {
io.println("Answer: " <> answer)
})
}
Further documentation can be found at https://hexdocs.pm/question.