All Projects → Lutetium-Vanadium → requestty

Lutetium-Vanadium / requestty

Licence: MIT license
An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to requestty

enquirer
Stylish, intuitive and user-friendly prompts, for Node.js. Used by eslint, webpack, yarn, pm2, pnpm, RedwoodJS, FactorJS, salesforce, Cypress, Google Lighthouse, Generate, tencent cloudbase, lint-staged, gluegun, hygen, hardhat, AWS Amplify, GitHub Actions Toolkit, @airbnb/nimbus, and many others! Please follow Enquirer's author: https://github.…
Stars: ✭ 6,523 (+4028.48%)
Mutual labels:  interactive, prompt, inquirer
yargs-interactive
Interactive support for yargs
Stars: ✭ 40 (-74.68%)
Mutual labels:  interactive, prompt, inquirer
inquirer-fuzzy-path
Fuzzy file/directory search and select prompt for Inquirer.js
Stars: ✭ 69 (-56.33%)
Mutual labels:  prompt, inquirer
PromptCLI
Interactive command line interface library
Stars: ✭ 30 (-81.01%)
Mutual labels:  prompt, inquirer
inquire
A Rust library for building interactive prompts
Stars: ✭ 419 (+165.19%)
Mutual labels:  interactive, prompt
whaaaaat
Inquirer.js port to Python (https://www.npmjs.com/package/inquirer). people blame me for staling this project. I do not have time to work on this right now - whaaaaat do you want me to do? take it offline?
Stars: ✭ 73 (-53.8%)
Mutual labels:  prompt, inquirer
Docker Shell
A simple interactive prompt for docker
Stars: ✭ 299 (+89.24%)
Mutual labels:  interactive, prompt
Bit
Bit is a modern Git CLI
Stars: ✭ 5,723 (+3522.15%)
Mutual labels:  interactive, prompt
Readline Sync
Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).
Stars: ✭ 601 (+280.38%)
Mutual labels:  interactive, prompt
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+2593.04%)
Mutual labels:  interactive, prompt
Sharprompt
Interactive command line interface toolkit for C#
Stars: ✭ 197 (+24.68%)
Mutual labels:  interactive, prompt
Windows10debloater
Script to remove Windows 10 bloatware.
Stars: ✭ 11,462 (+7154.43%)
Mutual labels:  interactive, prompt
Survey
A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
Stars: ✭ 2,843 (+1699.37%)
Mutual labels:  interactive, prompt
noteboard
📓 Manage your notes & tasks in a tidy and fancy way. A taskbook clone written in Python.
Stars: ✭ 12 (-92.41%)
Mutual labels:  interactive
prompt-list
This repository has been archived, use Enquirer instead.
Stars: ✭ 13 (-91.77%)
Mutual labels:  prompt
nearley-playground
⛹ Write Grammars for the Nearley Parser!
Stars: ✭ 76 (-51.9%)
Mutual labels:  interactive
terminer
Upgrade your terminal experience with a single command.
Stars: ✭ 28 (-82.28%)
Mutual labels:  prompt
drawingwithcode
Drawing with code 😘
Stars: ✭ 28 (-82.28%)
Mutual labels:  interactive
bureau
💻 Informative and fast ZSH prompt with git status. Works well with HUGE repositories. Show username, hostname, path, git branch and status.
Stars: ✭ 27 (-82.91%)
Mutual labels:  prompt
cacophony
Cacophony HTML5 Interactive Video Player
Stars: ✭ 41 (-74.05%)
Mutual labels:  interactive

Requestty

RustCI RustCI RustCI Crates.io License Documentation

requestty (request-tty) is an easy-to-use collection of interactive cli prompts inspired by Inquirer.js.

  • Easy-to-use - The builder API and macros allow you to easily configure and use the in-built prompts.

  • Extensible - Easily create and use custom prompts with a companion ui rendering library.

  • Flexible - All prompts can be used standalone or chained together.

  • Dynamic - You can dynamically decide what questions should be asked based on previous questions.

  • Validation - You can validate user input with any prompt.

  • Examples - Every prompt is accompanied with an example as well as other examples for more complex workflows

Usage

Add this to your Cargo.toml

[dependencies]
requestty = "0.4.1"

To ask a question:

let question = requestty::Question::expand("overwrite")
    .message("Conflict on `file.rs`")
    .choices(vec![
        ('y', "Overwrite"),
        ('a', "Overwrite this one and all next"),
        ('d', "Show diff"),
    ])
    .default_separator()
    .choice('x', "Abort")
    .build();

println!("{:#?}", requestty::prompt_one(question));

More examples are available in the documentation and the examples directory.

In-built prompts

There are 11 in-built prompts:

  • Input

    Prompt that takes user input and returns a String.

  • Password

    Prompt that takes user input and hides it.

  • Editor

    Prompt that takes launches the users preferred editor on a temporary file

  • Confirm

    Prompt that returns true or false.

  • Int

    Prompt that takes a i64 as input.

  • Float

    Prompt that takes a f64 as input.

  • Expand

    Prompt that allows the user to select from a list of options by key

  • Select

    Prompt that allows the user to select from a list of options

  • RawSelect

    Prompt that allows the user to select from a list of options with indices

  • MultiSelect

    Prompt that allows the user to select multiple items from a list of options

  • OrderSelect

    Prompt that allows the user to organize a list of options.

Optional features

  • macros: Enabling this feature will allow you to use the questions and prompt_module macros.

  • smallvec (default): Enabling this feature will use SmallVec instead of Vec for auto completions. This allows inlining single completions.

  • crossterm (default): Enabling this feature will use the crossterm library for terminal interactions such as drawing and receiving events.

  • termion: Enabling this feature will use the termion library for terminal interactions such as drawing and receiving events.

Minimum Supported Rust Version (MSRV)

Minimum supported rust version (as per cargo-msrv) is 1.56.1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].