talira

dialoguer

Rust library for interactive command-line prompts

open sourceMITfree

dialoguer is a Rust library for building small interactive inputs on the command line: confirmation prompts, text and password inputs with validation, single and multi selections, a fuzzy select prompt, and launching an editor to edit a string. Optional crate features add input history and custom tab completion. It's part of the console-rs family and is meant to be used with console and indicatif. Install it from crates.io as dialoguer.

Problems it solves

  • ask the user to confirm before my Rust CLI deletes something
  • let users pick from a list of options in a Rust command-line tool
  • read a password from the terminal without echoing it in Rust

Features

  • confirmation prompts
  • text and password input prompts with validation
  • single and multi selection prompts
  • fuzzy select prompt
  • launches an editor to edit strings
  • input history and custom tab completion (optional features)

Alternatives

The same job

These do what dialoguer does.

  1. Ratatui A Rust library for building fast, lightweight, rich terminal user interfaces
  2. console Terminal access, colours and styling for Rust command-line apps
  3. colored The simplest way to add colours in your terminal from Rust

Compare dialoguer with the top 3