Skip to content

Commit 94b7aed

Browse files
committed
remove unused things and release 1.5.0
1 parent dd02f86 commit 94b7aed

File tree

130 files changed

+1207
-16763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1207
-16763
lines changed

.github/DOCS.md

-970
This file was deleted.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2024 Nazarii Korniienko
3+
Copyright (c) 2025 Nazarii Korniienko
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+61-142
Original file line numberDiff line numberDiff line change
@@ -1,189 +1,108 @@
11
# @reliverse/prompts
22

3-
> **The CLI prompt library you didn’t realize you’ve been desperate for.**
3+
> **A modern CLI prompt library. Fast, type-safe, and built to last.**
44
5-
[Docs](https://docs.reliverse.org/reliverse/prompts/) | [NPM](https://www.npmjs.com/package/@reliverse/prompts) | [JSR](https://jsr.io/@reliverse/prompts) | [GitHub](https://github.com/reliverse/prompts) | [Discord](https://discord.gg/3GawfWfAPe)
5+
[![NPM Version](https://img.shields.io/npm/v/@reliverse/prompts.svg?style=flat-square)](https://npmjs.com/package/@reliverse/prompts)
6+
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](#license)
67

7-
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.
8+
**Quick Links:**
89

9-
## Rapid-Fire Overview
10+
- **[Docs](https://docs.reliverse.org/reliverse/prompts)**
11+
- **[NPM](https://npmjs.com/package/@reliverse/prompts)**
12+
- **[JSR](https://jsr.io/@reliverse/prompts)**
13+
- **[GitHub](https://github.com/reliverse/prompts)**
14+
- **[Discord](https://discord.gg/3GawfWfAPe)**
1015

11-
<div align="left">
12-
<a href="https://npmjs.org/package/@reliverse/prompts"><img src="https://img.shields.io/npm/v/@reliverse/prompts.svg" alt="version" /></a>
13-
<a href="https://npmjs.org/package/@reliverse/prompts"><img src="https://img.shields.io/npm/dm/@reliverse/prompts.svg" alt="downloads" /></a>
14-
</div>
16+
## Overview
1517

16-
## Install in 3.2 Seconds
18+
`@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.
19+
20+
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.
21+
22+
## Key Features
23+
24+
- **TypeScript-first**
25+
Get robust type definitions and IntelliSense for a smoother development experience.
26+
- **Flexible Prompt Types**
27+
Includes logger, input (text, password), confirm, select, multiselect, toggle, number, spinner, and more.
28+
- **Schema-Driven Validation**
29+
Native compatibility with TypeBox, Zod, or any custom validation strategy.
30+
- **Accessible & Adaptive**
31+
Supports terminal resizing, color contrast preferences, and meets WCAG AA standards.
32+
- **Crash-Resistant**
33+
Gracefully handles Ctrl+C, unexpected exits, and other edge cases without breaking.
34+
35+
## Installation
1736

1837
```bash
1938
bun add @reliverse/prompts
20-
# Or npm/pnpm/yarn if that’s your style
21-
# (deno and full jsr support soon™)
39+
# Or use npm, pnpm, yarn
2240
```
2341

24-
> **Pro Tip**: Make sure you have [Bun](https://bun.sh), [Node.js](https://nodejs.org), and [Git](https://git-scm.com/downloads) installed.
42+
> **Tip:** Make sure [Bun](https://bun.sh), [Node.js](https://nodejs.org), and [Git](https://git-scm.com/downloads) are installed before proceeding.
2543
26-
## The 3-Second Pitch
44+
## Why Reliverse Prompts?
2745

28-
> This thing is **blazing fast**, **type-safe**, and basically a bulletproof vest for your CLI.
29-
> No more spaghetti prompt code. Just shiny, stable, next-gen developer bliss.
46+
Unlike Inquirer, Clack, or other prompt libraries, `@reliverse/prompts` centers on **developer experience**:
3047

31-
### *“But why not stick with Inquirer or Clack?”*
48+
- **Enhanced Runtime Typing** – for fewer runtime errors and better IDE hints.
49+
- **Built-in Error Handling** – robust crash prevention right out of the box.
50+
- **Customizable Design & Theming** – tailor the look and feel to match your brand.
51+
- **Zero Guesswork with TypeScript** – strict typing means fewer surprises.
52+
- **Built-in Argument Parsing** – do more with less code by leveraging built-in typecasting and validation.
3253

33-
1. Better typed validation, bigger ASCII art, more interactive goodies, and next-level color theming.
34-
2. Because you deserve better than “just good enough.”
54+
Benchmarks confirm that `@reliverse/prompts` is one of the fastest and easiest libraries to work with.
55+
[See the feature comparison →](https://docs.reliverse.org/reliverse/prompts/#prompts-library-comparison)
3556

36-
## Key Selling Points
37-
38-
- **TypeScript-first**: So your TypeScript dev heart can flutter in peace. Enjoy IntelliSense and zero guesswork.
39-
- **Flexible Prompt Types**: Text, confirm, select, multiselect, password, number, spinner, toggle, and many more… you do you.
40-
- **Schema-driven Validations**: Easily integrates with TypeBox, Zod, or your own thing. No more “hope it works” solutions.
41-
- **Accessibility**: Terminal-size awareness, WCAG AA color contrast, the whole enchilada.
42-
- **Crash-safe**: Ctrl+C or random cosmic rays? It shrugs them off.
57+
## Playground Mode
4358

44-
## Why @reliverse/prompts?
59+
Try out examples locally to see how everything works in practice:
4560

46-
Consider it your brand-new sports car, while your old CLI prompt library was a rusty lawnmower. Also, it’s a feature-packed replacement for Inquirer, Enquirer, Clack, Terkelg, Terminal-Kit, and a bunch more.
61+
```bash
62+
git clone https://github.com/reliverse/prompts.git
63+
cd prompts
64+
bun i
65+
bun dev
66+
```
4767

48-
[**Go deeper in the docs →**](https://docs.reliverse.org/reliverse/prompts/)
68+
Then open **`examples/launcher.ts`** to explore various interactive demos or experiment with different prompt types.
4969

50-
### Straight-Up GOAT Features
70+
![example](./examples/main.png)
5171

52-
- **Full Cross-Platform ESM**: Seamlessly works with the Node.js and Bun environments.
53-
- **Extensible UI**: Because color, typography, animations, and more matter to your terminal fashion sense.
54-
- **Built for DX**: Minimal dependencies, clean API, full validation baked in, and more.
55-
- **Mono Component**: Perfect for rapid prototyping. Or if you’re feeling lazy.
72+
## Example Usage
5673

57-
## Speedrun Example
74+
Here’s a quick look at how you might use `@reliverse/prompts` in your CLI:
5875

5976
```ts
60-
import { inputPrompt } from "@reliverse/prompts";
77+
import {
78+
startPrompt, // Initializes the CLI session (clears the console, sets a custom title, etc.)
79+
inputPrompt // Fetches user input with validation and styled UI
80+
} from "@reliverse/prompts";
6181

6282
await startPrompt({
6383
clearConsole: true,
6484
titleColor: "inverse",
6585
packageName: "@reliverse/cli",
6686
packageVersion: "1.0.0",
67-
terminalSizeOptions: {
68-
minWidth: 100,
69-
minHeight: 16,
70-
// 🗴 Oops! Terminal width is too small. Expected >100 | Current: 97
71-
},
7287
});
7388

7489
const username = await inputPrompt({
7590
id: "username",
76-
title: "Welcome to @reliverse/prompts Demo!",
91+
title: "Welcome!",
7792
content: "What's your name?",
7893
});
7994

8095
console.log(`Hey there, ${username}!`);
8196
```
8297

83-
## Task Management
84-
85-
The library provides a powerful task management system with built-in verification steps, spinners, and error handling:
86-
87-
- **Spinner and progress bars that actually move**: Progress tracking with current/total counts and status messages
88-
- **Task priorities (because some stuff is more important)**: Critical, high, normal, low
89-
- **Built-in stats, error handling, and cancellation**: Task timing and statistics, built-in error handling and cancellation support
90-
- **Customizable spinners to keep your eyes happy**: Customizable spinners and progress indicators
91-
- **Nested subtasks and task groups**: Group tasks and subtasks for better organization
92-
- **Automatic verification steps with customizable delays**
93-
- **Simple error handling with proper formatting**
94-
- **Progress tracking for long-running operations**
95-
- **Custom validation and business logic support**
96-
97-
Visit [docs](https://docs.reliverse.org/reliverse/prompts/#task-management) to learn more and see examples.
98-
99-
## Playground Mode
100-
101-
```bash
102-
git clone https://github.com/reliverse/prompts.git
103-
cd prompts
104-
bun i
105-
bun dev
106-
```
107-
108-
Check out `examples/launcher.ts` for a smorgasbord of demos (including a quiz). Who says CLIs can’t be fun?
109-
110-
## Examples to Copy-Paste
111-
112-
1. **1-main.ts**: A powerhouse CLI example with all the trimmings, with advanced styling and all prompts.
113-
2. **2-mono.ts**: A single `prompt()` for multiple components—perfect for CLI where performance doesn't matter.
114-
3. **3-simple.ts**: Less code, more speed.
115-
4. **4-args-a.ts** + **5-args-b.ts**: Turn sub-commands into a more headless experience.
116-
117-
## Custom Config FTW
118-
119-
You don’t want a one-size-fits-all library. We got you:
120-
121-
```ts
122-
const basicConfig = {
123-
titleColor: "cyanBright",
124-
titleTypography: "bold",
125-
borderColor: "dim",
126-
} satisfies PromptOptions;
127-
128-
const extendedConfig = {
129-
...basicConfig,
130-
contentTypography: "italic",
131-
contentColor: "dim",
132-
} satisfies PromptOptions;
133-
134-
const username = await inputPrompt({
135-
id: "username",
136-
title: "Testing out our fancy library!",
137-
content: "What's your username?",
138-
...extendedConfig,
139-
});
140-
```
141-
142-
## Mono Component: One Import to Rule Them All
143-
144-
If you’re lazy (like the rest of us), in a hurry, or just want everything jammed together, the Mono Component wraps up all prompt types in a single import.
145-
146-
```ts
147-
export const IDs = {
148-
start: "start",
149-
username: "username",
150-
// ...
151-
};
152-
```
153-
154-
## Comparison Table
155-
156-
We’re not shy. We lined up **@reliverse/prompts** against Inquirer, Clack, Terminal-Kit, etc. Our goal? **Turn every feature dot green**. [**Check out the epic chart**](https://docs.reliverse.org/reliverse/prompts/#prompts-library-comparison)
157-
158-
## Arguments Support
159-
160-
You can’t build an amazing CLI without argument parsing. We’ve got a built-in fast parser that typecasts your things automatically.
161-
162-
## Wrap It Up
98+
## Contributing
16399

164-
@reliverse/prompts is more than just pretty and fast prompts—it’s a full-blown CLI builder with customizable designs and robust typing. It’s built to slot seamlessly into Reliverse’s ecosystem, but even if you’re rolling your own thing, you’ll appreciate the minimal boilerplate and fancy visuals.
165-
166-
- **CLI builder** with style & resilience
167-
- **Customizable** design and color theming
168-
- **Zero guesswork** with TypeScript integrations
169-
- **Minimal boilerplate** with maximum results
170-
171-
## More Goodies
172-
173-
- [**Reliverse Docs**](https://docs.reliverse.org/reliverse/prompts/)
174-
175-
## Special Thanks
176-
177-
**@inquirer/prompts**, **@terkelg/prompts**, **@clack/prompts**, **@unjs/citty**, and many more other open-source legends. You built the shoulders we stand on.
100+
Contributions are always welcome! Open a pull request or start a discussion on [GitHub](https://github.com/reliverse/prompts) if you’d like to help. By the way, this project emphasizes functional programming approaches, avoiding traditional OOP classes.
178101

179102
## License
180103

181-
**MIT** © [Nazarii Korniienko](https://github.com/reliverse/prompts)
182-
183-
## Screenshot Brag
104+
**MIT License** © [Nazarii Korniienko](https://github.com/reliverse/prompts)
184105

185-
[![CLI Example](./examples/main.png)](./examples/main.png)
106+
Feel free to modify and redistribute under the terms of the MIT license. See the [LICENSE](LICENSE) file for more details.
186107

187-
> **Stop reading. Start coding.**
188-
>
189-
> If you’re serious about CLIs—don’t just build—**Reliverse it** with `@reliverse/prompts`.
108+
Thanks for checking out `@reliverse/prompts`. If you have any questions, join our [Discord community](https://discord.gg/3GawfWfAPe) or file an issue on GitHub. We look forward to seeing what you build!

biome.json

-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
"noUnsafeFinally": "off",
8686
"noUnsafeOptionalChaining": "off",
8787
"noUnusedLabels": "off",
88-
"noUnusedPrivateClassMembers": "off",
8988
"noUnusedVariables": "off",
9089
"noVoidElementsWithChildren": "off",
9190
"noVoidTypeReturn": "off",
@@ -144,7 +143,6 @@
144143
"noGlobalIsFinite": "off",
145144
"noGlobalIsNan": "off",
146145
"noImplicitAnyLet": "off",
147-
"noMisleadingCharacterClass": "off",
148146
"noMisrefactoredShorthandAssign": "off",
149147
"noSelfCompare": "off",
150148
"noShadowRestrictedNames": "off",

0 commit comments

Comments
 (0)