{"id":13822336,"url":"https://github.com/Lutetium-Vanadium/requestty","last_synced_at":"2025-05-16T15:34:03.567Z","repository":{"id":43599580,"uuid":"363401805","full_name":"Lutetium-Vanadium/requestty","owner":"Lutetium-Vanadium","description":"An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.","archived":false,"fork":false,"pushed_at":"2023-09-23T08:16:54.000Z","size":3040,"stargazers_count":211,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T05:17:00.227Z","etag":null,"topics":["cli","command-line","inquirer","interactive","prompt","rust","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lutetium-Vanadium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-05-01T12:13:37.000Z","updated_at":"2025-04-28T00:36:55.000Z","dependencies_parsed_at":"2024-01-18T03:49:03.035Z","dependency_job_id":null,"html_url":"https://github.com/Lutetium-Vanadium/requestty","commit_stats":{"total_commits":178,"total_committers":3,"mean_commits":"59.333333333333336","dds":0.1797752808988764,"last_synced_commit":"c454826c25d60bbebe2dec1e39a1308b2aa5f37a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lutetium-Vanadium%2Frequestty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lutetium-Vanadium%2Frequestty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lutetium-Vanadium%2Frequestty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lutetium-Vanadium%2Frequestty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lutetium-Vanadium","download_url":"https://codeload.github.com/Lutetium-Vanadium/requestty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254556876,"owners_count":22091009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","inquirer","interactive","prompt","rust","terminal"],"created_at":"2024-08-04T08:01:55.543Z","updated_at":"2025-05-16T15:34:00.083Z","avatar_url":"https://github.com/Lutetium-Vanadium.png","language":"Rust","funding_links":[],"categories":["Rust","cli"],"sub_categories":[],"readme":"# Requestty\n\n![RustCI](https://github.com/Lutetium-Vanadium/requestty/workflows/Default/badge.svg)\n![RustCI](https://github.com/Lutetium-Vanadium/requestty/workflows/Crossterm/badge.svg)\n![RustCI](https://github.com/Lutetium-Vanadium/requestty/workflows/Termion/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/requestty.svg)](https://crates.io/crates/requestty)\n[![License](https://img.shields.io/crates/l/requestty.svg)](./LICENSE)\n[![Documentation](https://docs.rs/requestty/badge.svg)](https://docs.rs/requestty)\n\n`requestty` (request-tty) is an easy-to-use collection of interactive\ncli prompts inspired by [Inquirer.js](https://github.com/SBoudrias/Inquirer.js).\n\n- Easy-to-use - The builder API and macros allow you to easily configure\n  and use the in-built prompts.\n\n- Extensible - Easily create and use custom prompts with a companion\n  ui rendering library.\n\n- Flexible - All prompts can be used standalone or chained together.\n\n- Dynamic - You can dynamically decide what questions should be asked\n  based on previous questions.\n\n- Validation - You can validate user input with any prompt.\n\n- Examples - Every prompt is accompanied with an example as well as other\n  [examples](./examples) for more complex workflows\n\n## Usage\n\nAdd this to your `Cargo.toml`\n\n```toml\n[dependencies]\nrequestty = \"0.4.1\"\n```\n\nTo ask a question:\n\n```rust\nlet question = requestty::Question::expand(\"overwrite\")\n    .message(\"Conflict on `file.rs`\")\n    .choices(vec![\n        ('y', \"Overwrite\"),\n        ('a', \"Overwrite this one and all next\"),\n        ('d', \"Show diff\"),\n    ])\n    .default_separator()\n    .choice('x', \"Abort\")\n    .build();\n\nprintln!(\"{:#?}\", requestty::prompt_one(question));\n```\n\nMore examples are available in the [documentation](https://docs.rs/requestty)\nand the [examples](https://github.com/Lutetium-Vanadium/requestty/tree/master/examples)\ndirectory.\n\n## In-built prompts\n\nThere are 11 in-built prompts:\n\n- ### Input\n\n  Prompt that takes user input and returns a `String`.\n\n  \u003cimg src=\"./assets/input.gif\" style=\"max-height: 11rem\" /\u003e\n\n- ### Password\n\n  Prompt that takes user input and hides it.\n\n  \u003cdiv align=\"center\"\u003e\n    \u003cimg\n      src=\"./assets/password-mask.gif\"\n      style=\"max-width: 45%; max-height: 11rem\"\n    /\u003e\n    \u003cimg\n      src=\"./assets/password-hidden.gif\"\n      style=\"max-width: 45%; max-height: 11rem\"\n    /\u003e\n  \u003c/div\u003e\n\n- ### Editor\n\n  Prompt that takes launches the users preferred editor on a temporary\n  file\n\n  \u003cimg src=\"./assets/editor.gif\" style=\"max-height: 30rem\" /\u003e\n\n- ### Confirm\n\n  Prompt that returns `true` or `false`.\n\n  \u003cimg src=\"./assets/confirm.gif\" style=\"max-height: 11rem\" /\u003e\n\n- ### Int\n\n  Prompt that takes a `i64` as input.\n\n  \u003cimg src=\"./assets/int.gif\" style=\"max-height: 11rem\" /\u003e\n\n- ### Float\n\n  Prompt that takes a `f64` as input.\n\n  \u003cimg src=\"./assets/float.gif\" style=\"max-height: 11rem\" /\u003e\n\n- ### Expand\n\n  Prompt that allows the user to select from a list of options by key\n\n  \u003cimg src=\"./assets/expand.gif\" style=\"max-height: 15rem\" /\u003e\n\n- ### Select\n\n  Prompt that allows the user to select from a list of options\n\n  \u003cimg src=\"./assets/select.gif\" style=\"max-height: 15rem\" /\u003e\n\n- ### RawSelect\n\n  Prompt that allows the user to select from a list of options with\n  indices\n\n  \u003cimg src=\"./assets/raw-select.gif\" style=\"max-height: 15rem\" /\u003e\n\n- ### MultiSelect\n\n  Prompt that allows the user to select multiple items from a list of\n  options\n\n  \u003cimg src=\"./assets/multi-select.gif\" style=\"max-height: 20rem\" /\u003e\n\n- ### OrderSelect\n\n  Prompt that allows the user to organize a list of options.\n\n  \u003cimg src=\"./assets/order-select.gif\" style=\"max-height: 20rem\" /\u003e\n\n## Optional features\n\n- `macros`: Enabling this feature will allow you to use the `questions`\n  and `prompt_module` macros.\n\n- `smallvec` (default): Enabling this feature will use\n  [`SmallVec`](https://docs.rs/smallvec/latest/smallvec/struct.SmallVec.html)\n  instead of `Vec` for auto completions. This allows inlining single\n  completions.\n\n- `crossterm` (default): Enabling this feature will use the\n  [`crossterm`](https://crates.io/crates/crossterm) library for terminal\n  interactions such as drawing and receiving events.\n\n- `termion`: Enabling this feature will use the\n  [`termion`](https://crates.io/crates/termion) library for terminal\n  interactions such as drawing and receiving events.\n\n## Minimum Supported Rust Version (MSRV)\n\nMinimum supported rust version (as per\n[cargo-msrv](https://crates.io/crates/cargo-msrv)) is `1.56.1`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLutetium-Vanadium%2Frequestty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLutetium-Vanadium%2Frequestty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLutetium-Vanadium%2Frequestty/lists"}