Skip to content

šŸ—ļø 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.

License

Notifications You must be signed in to change notification settings

reliverse/rempts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

90 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

@reliverse/prompts

šŸ’– 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.

⚔ 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

bun add @reliverse/prompts
# or npm, pnpm, yarn

Make sure you have Bun, Node.js, and Git installed.

🧪 Try It Out (Playground Mode)

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.

example

🧩 Example Usage

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 →

šŸ’” 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.

šŸ™ Shoutout

This wouldn't exist without these gems:

šŸ“„ License

šŸ’– MIT Ā© 2025 blefnk Nazar Kornienko

About

šŸ—ļø 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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published