A modern CLI prompt library. Fast, type-safe, and built to last.
Quick Links:
@reliverse/prompts
is a type-safe, high-performance library for building modern CLI applications. It's designed to help you focus on creating great user experiences, not juggling repetitive CLI logic.
Use @reliverse/prompts
for everything from quick scripts to full-featured, production-grade tools. With minimal boilerplate, robust error handling, and built-in accessibility features, you'll be shipping delightful CLI workflows in no time.
- TypeScript-first
Get robust type definitions and IntelliSense for a smoother development experience. - Flexible Prompt Types
Includes logger, input (text, password), confirm, select, multiselect, toggle, number, spinner, and more. - Schema-Driven Validation
Native compatibility with TypeBox, Zod, or any custom validation strategy. - Accessible & Adaptive
Supports terminal resizing, color contrast preferences, and meets WCAG AA standards. - Crash-Resistant
Gracefully handles Ctrl+C, unexpected exits, and other edge cases without breaking.
bun add @reliverse/prompts
# Or use npm, pnpm, yarn
Tip: Make sure Bun, Node.js, and Git are installed before proceeding.
Unlike Inquirer, Clack, or other prompt libraries, @reliverse/prompts
centers on developer experience:
- Enhanced Runtime Typing – for fewer runtime errors and better IDE hints.
- Built-in Error Handling – robust crash prevention right out of the box.
- Customizable Design & Theming – tailor the look and feel to match your brand.
- Zero Guesswork with TypeScript – strict typing means fewer surprises.
- Built-in Argument Parsing – do more with less code by leveraging built-in typecasting and validation.
Benchmarks confirm that @reliverse/prompts
is one of the fastest and easiest libraries to work with.
See the feature comparison →
Try out examples locally to see how everything works in practice:
git clone https://github.com/reliverse/prompts.git
cd prompts
bun i
bun dev
Then open examples/launcher.ts
to explore various interactive demos or experiment with different prompt types.
Here's a quick look at how you might use @reliverse/prompts
in your CLI:
import {
startPrompt, // Initializes the CLI session (clears the console, sets a custom title, etc.)
inputPrompt // Fetches user input with validation and styled UI
} 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}!`);
Contributions are always welcome! Open a pull request or start a discussion on GitHub if you'd like to help. By the way, this project emphasizes functional programming approaches, avoiding traditional OOP classes.
MIT License © Nazarii Korniienko
Feel free to modify and redistribute under the terms of the MIT license. See the LICENSE file for more details.
Thanks for checking out @reliverse/prompts
. If you have any questions, join our Discord community or file an issue on GitHub. We look forward to seeing what you build!