https://github.com/reliverse/rempts
🏗️ The CLI prompt library you didn’t realize you’ve been desperate for. It’s blazing-fast, type-safe, and has built-in crash resilience—so your command-line app can look slick without bursting into flames. Forget boilerplate-heavy setups—this library makes CLI development smooth and effortless.
https://github.com/reliverse/rempts
blefnk javascript js-lib js-library library npm-package prompts reliverse
Last synced: 16 days ago
JSON representation
🏗️ The CLI prompt library you didn’t realize you’ve been desperate for. It’s blazing-fast, type-safe, and has built-in crash resilience—so your command-line app can look slick without bursting into flames. Forget boilerplate-heavy setups—this library makes CLI development smooth and effortless.
- Host: GitHub
- URL: https://github.com/reliverse/rempts
- Owner: reliverse
- License: mit
- Created: 2024-11-04T00:57:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T13:18:36.000Z (about 2 months ago)
- Last Synced: 2025-05-07T06:05:17.001Z (16 days ago)
- Topics: blefnk, javascript, js-lib, js-library, library, npm-package, prompts, reliverse
- Language: TypeScript
- Homepage: https://docs.reliverse.org
- Size: 16.5 MB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @reliverse/prompts
[💖 GitHub Sponsors](https://github.com/sponsors/blefnk) • [💬 Discord](https://discord.gg/3GawfWfAPe) • [📦 NPM](https://npmjs.com/package/@reliverse/prompts) • [📚 Docs](https://docs.reliverse.org/reliverse/prompts) • [✨ GitHub](https://github.com/reliverse/prompts)
**@reliverse/prompts** is your modern, type-safe toolkit for building delightful CLI experiences. It's fast, flexible, and built with developer joy in mind. Forget the clutter — this is how CLI should feel.
## ⚡ Why It Rocks
- ✨ **TypeScript-first** — fully typed prompts and helpers, with great DX
- 🔧 **Flexible Prompt Types** — input, password, select, multiselect, confirm, toggle, number, spinner, and more
- 🧠 **Smart validation** — works with Zod, TypeBox, or your own validators
- 🌈 **Accessible & Adaptive** — meets WCAG AA, handles terminal resizing & color contrast
- 🧯 **Crash-resistant** — gracefully exits on Ctrl+C or unexpected input
- 🎨 **Custom theming** — make it match your CLI style
- 🚀 **Zero boilerplate** — focus on the logic, not the wiring## 🛠️ Install
```bash
bun add @reliverse/prompts
# or npm, pnpm, yarn
```Make sure you have [Bun](https://bun.sh), [Node.js](https://nodejs.org), and [Git](https://git-scm.com/downloads) installed.
## 🧪 Try It Out (Playground Mode)
Wanna test drive before integrating? Clone the repo and run:
```bash
git clone https://github.com/reliverse/prompts.git
cd prompts
bun i
bun dev
```Then open `examples/launcher.ts` and explore different prompts.

## 🧩 Example Usage
```ts
import {
startPrompt, // Initialize prompt session (optional)
inputPrompt, // Ask for user input
} from "@reliverse/prompts";await startPrompt({
clearConsole: true,
titleColor: "inverse",
packageName: "@reliverse/cli",
packageVersion: "1.0.0",
});const username = await inputPrompt({
id: "username",
title: "Welcome!",
content: "What's your name?",
});console.log(`Hey there, ${username}!`);
```> 🔎 You can also use `selectPrompt`, `multiselectPrompt`, `confirmPrompt`, `numberPrompt`, `spinnerPrompt`, and more.
## 🧠 Bonus Goodies
- ⚙️ **Built-in argument parsing** — parse CLI args without a separate lib
- 🧪 **Unit-test friendly** — prompts can be mocked/stubbed
- 📚 **Minimal API surface** — easy to learn, hard to outgrow
- 💅 **Custom styles** — tweak colors, formats, and transitions## 🔍 Why not Inquirer or Clack?
While we love other tools, `@reliverse/prompts` was built for:
- Dev-first ergonomics
- Fully typed workflows
- Configurable theming
- Better crash handling & UX polish[See feature comparison →](https://docs.reliverse.org/reliverse/prompts/#prompts-library-comparison)
## 💡 Contributing
Wanna improve prompts or add something cool? PRs welcome!
This project favors functional programming over OOP — no classes, just clean, composable logic.Open a PR or discussion on [GitHub](https://github.com/reliverse/prompts).
## 🙏 Shoutout
This wouldn't exist without these gems:
- [sboudrias/inquirer.js](https://github.com/sboudrias/inquirer.js)
- [unjs/citty](https://github.com/unjs/citty)
- [lukeed/mri](https://github.com/lukeed/mri)## 📄 License
💖 MIT © 2025 [blefnk Nazar Kornienko](https://github.com/blefnk)