![Latest Version] ![Build status] ![Supported platforms] ![License]



inquire is a library for building interactive prompts on terminals.

It provides several different prompts in order to interactively ask the user for information via the CLI. With inquire, you can use: - [Text] to get text input from the user, with built-in auto-completion support; - [Editor]* to get longer text inputs by opening a text editor for the user; - [DateSelect]* to get a date input from the user, selected via an interactive calendar; - [Select] to ask the user to select one option from a given list; - [MultiSelect] to ask the user to select an arbitrary number of options from a given list; - [Confirm] for simple yes/no confirmation prompts; - [CustomType] for text prompts that you would like to parse to a custom type, such as numbers or UUIDs; - [Password] for secretive text prompts.


Demo

Animated GIF making a demonstration of a questionnaire created with this library. You can replay this recording in your terminal with asciinema play command - asciinema play ./assets/expense_tracker.cast Source

Features

Usage

Put this line in your Cargo.toml, under [dependencies].

inquire = "0.3.0"

* This prompt type is gated under a feature flag, e.g.:

inquire = { version = "0.3.0", features = ["date", "editor"] }