Gathering detailed insights and metrics for @reliverse/prompts
Gathering detailed insights and metrics for @reliverse/prompts
Gathering detailed insights and metrics for @reliverse/prompts
Gathering detailed insights and metrics for @reliverse/prompts
β¨οΈ @reliverse/relinka is a full-featured alternative to @inquirer/prompts (Inquirer.js), enquirer, @clack/prompts, terkelg prompts, cronvel terminal-kit, unjs consola, and similar prompts libraries.
npm install @reliverse/prompts
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
60 Commits
1 Branches
1 Contributors
Updated on 28 Nov 2024
TypeScript (99.42%)
JavaScript (0.58%)
Cumulative downloads
Total Downloads
Last day
684.6%
204
Compared to previous day
Last week
-56.8%
413
Compared to previous week
Last month
0%
3,272
Compared to previous month
Last year
0%
3,272
Compared to previous year
39
33
@reliverse/prompts is a powerful library that enables seamless, type-safe, and resilient prompts for command-line applications. Crafted with simplicity and elegance, it provides developers with an intuitive and robust way to build interactive CLIs.
@reliverse/prompts is a full-featured alternative to @inquirer/prompts (Inquirer.js), enquirer, @clack/prompts, terkelg prompts, cronvel terminal-kit, unjs consola, and similar libraries.
Install with your preferred package manager:
1bun add @reliverse/prompts # Replace 'bun' with npm, pnpm, or yarn if desired (deno and jsr support coming soon)
Each type has its own validation and display logic. More types are planned for future releases.
All prompts support custom validation logic, providing immediate feedback to users.
@reliverse/prompts is a work in progress. We welcome feedback and contributions to help make it the best library it can be. Thank you!
Here is how to install the library for development:
1git clone https://github.com/reliverse/prompts.git 2cd relinka 3bun i
Run bun dev
to launch the examples/launcher.ts CLI, which helps you to dive into and explore any of the examples listed below. Experiment with @reliverse/prompts by running examples locally or reviewing the linked code:
Example Configuration:
1const basicConfig = { 2 titleColor: "cyanBright", 3 titleTypography: "bold", 4 borderColor: "viceGradient", 5} satisfies PromptOptions; 6 7const extendedConfig = { 8 ...basicConfig, 9 contentTypography: "italic", 10 contentColor: "dim", 11} satisfies PromptOptions; 12 13const username = await inputPrompt({ 14 id: "username", 15 title: "We're glad you're testing our library!", 16 content: "Let's get to know each other!\nWhat's your username?", 17 schema: schema.properties.username, 18 ...extendedConfig, 19});
The Mono Component is a special component that includes all other components. It's a great way to get started quickly or to see how all the components work together.
This component requires providing prompt id. To have typesafety use something like the following:
1export const IDs = { 2 start: "start", 3 username: "username", 4 dir: "dir", 5 spinner: "spinner", 6 password: "password", 7 age: "age", 8 lang: "lang", 9 color: "color", 10 birthday: "birthday", 11 features: "features", 12};
Note: This table contains approximate and placeholder values. More detailed assessments will be provided as libraries continue to evolve.
Icon Legend:
Feature | @reliverse/prompts | @inquirer/prompts | @enquirer/enquirer | @clack/prompts | @terkelg/prompts | @cronvel/terminal-kit | @unjs/citty | @unjs/consola |
---|---|---|---|---|---|---|---|---|
Full Node.js Modules Support | π’ Native ES module package | π‘ | π‘ | π‘ | π΄ CJS-only | π΄ CJS-only | π‘ | π‘ |
Works both in node, bun, and deno environments | π΅ node+bun (deno support is coming soon) | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π’ |
Codebase typesafety with intellisense | π΅ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Runtime typesafety with schema validation | π’ TypeBox & Custom | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Usage Examples | π’ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Mono Component | π’ Mono (All-In-One) & Separate | π‘ | π‘ | π‘ | π΅ Mono-only | π‘ | π‘ | π‘ |
Start Component | π’ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Text Component | π’ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Customization | π’ Colors, typography, variants, borders, and more | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Visual Components: Separator, Animated Text, ASCII Art | π’ Includes 6 animations and 290 ASCII fonts | π΅ Separator only | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Password Component | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Number Component | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Confirm Component | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Select Component | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Multiselect Component | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Search/Autocomplete Component | π΅ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Spinner & Progressbar Components | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ | π‘ |
Image Component | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ | π‘ |
Custom Validation | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Error Handling | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Ease of Setup | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Crash Resilience | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
General DX | π΅ Clean and understandable TypeScript code | π‘ | π‘ | π‘ | π΄ JS-only | π΄ JS-only | π‘ | π‘ |
DX: Classes | π’ Minimal number of classes as possible | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Documentation | π΅ | π‘ | π‘ | π‘ | π΅ | π’ | π‘ | π‘ |
Designed With UX/DX in Mind | π’ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ |
Fast and lightweight argument parser | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Smart value parsing with typecast | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Boolean shortcuts and unknown flag handling | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Nested sub-commands | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Lazy and Async commands | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Pluggable and composable API | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Auto generated usage and help | π‘ | π‘ | π‘ | π‘ | π‘ | π‘ | π’ | π‘ |
Related Links: ESM/CJS, "Pure ESM package", Clean code, "UX patterns for CLI tools", DX (Developer Experience), TypeBox, "ANSI Escape Sequences"
@reliverse/prompts is a versatile library designed to accelerate CLI development by providing customizable prompt components. Integrated into the Reliverse CLI, @reliverse/prompts enables you to create a unique design aligned with your CLI appβs aesthetics, similar to how @shadcn/ui supports customizable web UI components. Quickly get started by copying configurations from the Reliverse Docs and using components that fit your project, making it faster to bring your CLI app to life. Youβre free to customize each component as desired, with default designs provided to ensure an attractive interface from the start.
This project wouldnβt exist without the amazing work of the huge number of contributors to the list of projects below. Many of the @reliverse/prompts prompts are based on the incredible work of:
@inquirer/prompts | terkelg/prompts | @clack/prompts | create-t3-app | create-astro | cronvel/terminal-kit | unjs/consola | nodejs/string_decoder | TooTallNate/keypress | derhuerst
No vulnerabilities found.
No security vulnerabilities found.