š GitHub Sponsors ⢠š¬ Discord ⢠š¦ NPM ⢠š Docs ⢠⨠GitHub
@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.
- ⨠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
bun add @reliverse/prompts
# or npm, pnpm, yarn
Make sure you have Bun, Node.js, and Git installed.
Wanna test drive before integrating? Clone the repo and run:
git clone https://github.com/reliverse/prompts.git
cd prompts
bun i
bun dev
Then open examples/launcher.ts
and explore different prompts.
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.
- āļø 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
While we love other tools, @reliverse/prompts
was built for:
- Dev-first ergonomics
- Fully typed workflows
- Configurable theming
- Better crash handling & UX polish
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.
This wouldn't exist without these gems:
š MIT Ā© 2025 blefnk Nazar Kornienko