Rempts
π¦βπ₯ @reliverse/rempts is a modern, type-safe toolkit for building delightful cli experiences. it's fast, flexible, and made for developer happiness. file-based commands keep things simpleβno clutter, just clean and easy workflows. this is how cli should feel.
Install / Use
/learn @reliverse/RemptsREADME
π rempts β’ powerful js/ts cli builder
sponsor β discord β repo β npm
@reliverse/rempts is a modern, type-safe toolkit for building delightful cli experiences. it's fast, flexible, and made for developer happiness. file-based commands keep things simpleβno clutter, just clean and easy workflows. this is how cli should feel.
Features
- π drop-in to libraries like
unjs/cittyand@clack/prompts - π includes comprehensive set of built-in cli prompts
- π file-based commands (app-router style by default)
- π« rempts keeps you from fighting with your CLI tool
- ποΈ prompt engine that feels modern β and actually is
- β¨ rempts is your end-to-end CLI UI + command framework
- πΏ multi-level file-based subcommands (sibling + nested)
- πͺ built for DX precision and high-context terminal UX
- π looks great in plain scripts or full CLI apps
- π¨ customizable themes and styled output
- π¦ built-in output formatter and logger
- π¨ crash-safe (Ctrl+C, SIGINT, errors)
- β‘ blazing-fast, zero runtime baggage
- π§© router + argument parser built-in
- π§ type-safe from args to prompts
- π smart layout for small terminals
- ποΈ override styles via prompt options
- πͺ minimal API surface, maximum expressiveness
- π§ͺ scriptable for testing, stable for production
- ποΈ no more hacking together
inquirer/citty/commander/chalk - π automatic command creation (
bun dler rempts --init cmd1 cmd2) - π¦βπ₯ automatic creation of
src/app/cmds.tsfile (bun dler rempts)
Installation
bun add @reliverse/rempts
Usage Examples
Screenshot

API Overview
All main prompts APIs are available from the package root:
import {
// ...prompts
inputPrompt, selectPrompt, multiselectPrompt, numberPrompt,
confirmPrompt, togglePrompt,
startPrompt, endPrompt, resultPrompt, nextStepsPrompt,
// ...hooks
createSpinner,
// ...launcher
createCli, defineCommand, defineArgs,
// ...types
// ...more
} from "@reliverse/rempts";
See
src/mod.tsfor the full list of exports.
Prompts
Built-in Prompts
| Prompt | Description |
|---------------------------|-----------------------------------------------------------|
| createSpinner | Start/stop spinner |
| inputPrompt | Single-line input (with mask support, e.g. for passwords) |
| selectPrompt | Single-choice radio menu |
| multiselectPrompt | Multi-choice checkbox menu |
| numberPrompt | Type-safe number input |
| confirmPrompt | Yes/No toggle |
| togglePrompt | Custom on/off toggles |
| resultPrompt | Show results in a styled box |
| nextStepsPrompt | Show next steps in a styled list |
| startPrompt/endPrompt | Makes CLI start/end flows look nice |
| datePrompt | Date input with format validation |
| anykeyPrompt | Wait for any keypress |
Aliases
To help you migrate from the different CLI frameworks, @reliverse/rempts has some aliases for the most popular prompts.
| Prompt | Aliases |
|-----------------------|------------------|
| createCli | runMain |
| onCmdInit | setup |
| onCmdExit | cleanup |
| createSpinner | spinner |
| selectPrompt | select |
| multiselectPrompt | multiselect |
| inputPrompt | text, input |
| confirmPrompt | confirm |
| introPrompt | intro, start |
| outroPrompt | outro, end |
| log | relinka |
Prompts Usage Example
import { relinka } from "@reliverse/relinka";
import {
startPrompt,
inputPrompt,
selectPrompt,
defineCommand,
runMain
} from "@reliverse/rempts";
async function main() {
await startPrompt({ title: "Project Setup" });
const name = await inputPrompt({
title: "What's your project name?",
defaultValue: "my-cool-project",
});
const spinner = createSpinner({
text: "Loading...",
indicator: "timer", // or "dots"
frames: ["β", "β", "β", "β"], // custom frames
delay: 80, // custom delay
onCancel: () => {
console.log("Operation cancelled");
},
cancelMessage: "Operation cancelled by user",
errorMessage: "Operation failed",
signal: abortController.signal,
}).start();
// The spinner will show:
// β Loading... [5s]
// With animated frames and timer
const framework = await selectPrompt({
title: "Pick your framework",
options: [
{ value: "next", label: "Next.js" },
{ value: "svelte", label: "SvelteKit" },
{ value: "start", label: "TanStack Start" },
],
defaultValue: "next",
});
console.log("Your result:", { name, framework });
};
await main();
Available spinner options:
| Option | Description |
|--------|-------------|
| cancelMessage | The message to display when the spinner is cancelled |
| color | The color of the spinner |
| delay | The delay between frames |
| errorMessage | The message to display when the spinner fails |
| failText | The text to display when the spinner fails |
| frames | The frames to use for the spinner |
| hideCursor | Whether to hide the cursor |
| indicator | The indicator to use for the spinner |
| onCancel | The function to call when the spinner is cancelled |
| prefixText | The text to display before the spinner |
| signal | The signal to use for the spinner |
| silent | Whether to hide the spinner |
| spinner | The spinner to use for the spinner |
| successText | The text to display when the spinner succeeds |
| text | The text to display next to the spinner |
Available indicator options:
| Option | Description |
|--------|-------------|
| timer | The timer indicator |
| dots | The dots indicator |
Available signal options:
| Option | Description |
|--------|-------------|
| abortController.signal | The signal to use for the spinner |
Available frames options:
| Option | Description |
|--------|-------------|
| ["β", "β", "β", "β"] | The frames to use for the spinner |
Available delay options:
| Option | Description |
|--------|-------------|
| 80 | The delay between frames |
Available onCancel options:
| Option | Description |
|--------|-------------|
| () => { console.log("Operation cancelled"); } | The function to call when the spinner is cancelled |
Launcher
Note:
runMainis now an alias forcreateCliand is still supported for backward compatibility. The newcreateCliAPI provides a more intuitive object-based configuration format.
Automatic command creation
bun add -D @reliverse/dler
bun dler rempts --init cmd1 cmd2 # creates `src/app/cmd1/cmd.ts` and `src/app/cmd2/cmd.ts` files
bun dler rempts # creates `src/app/cmds.ts` file
Terminology
- Launcher/Router: The main entry point for your CLI. Visit CLI Launcher (Router) section to learn more.
- Command: A command is a function that defines the inner script launched by the main script where runMain() is used or by some other command.
- Argument: An argument is a value that is passed to a command.
- Flag: A flag is a boolean argument that is used to enable or disable a feature.
- Option: An option is a named argument that is used to configure a command.
Launcher Usage Example
Important: Ensure your commands don't have await main();, await createCli();, or something like that β to prevent any unexpected behavior. Only main command should have it.
import { relinka } from "@reliverse/relinka";
import { defineCommand, createCli } from "@reliverse/rempts";
const main = defineCommand({
meta: {
name: "rempts",
version: "1.0.0",
description: "Rempts Launcher Playground CLI",
},
onCmdInit() {
relinka("success", "Setup");
},
onCmdExit() {
relinka("success", "Cleanup");
},
commands: {
build: () => import("./app/build/cmd.js").then((r) => r.default),
deploy: () => import("./app/deploy/cmd.js").then((r) => r.default),
debug: () => import("./app/debug/cmd.js").then((r) => r.default),
},
});
// New object format (recommended)
await createCli({
mainCommand: main,
fileBased: {
enable: true,
cmdsRootPath: "my-cmds", // default is `./app`
},
// Optionally disable auto-exit to handle errors manually:
autoExit: false,
});
// Legacy format (still supported)
await createCli(main, {
fileBased: {
enable: true,
cmdsRootPath: "my-cmds", // default is `./app`
},
// Optionally disable auto-exit to handle errors manually:
autoExit: false,
});
This flexibility allows you to easily build a rich, multi-command CLI with minimal boilerplate. The launcher even supports nested commands, making it simple to construct complex CLI applications.
File-Based Commands
Drop a ./src/cli/app/add/index.ts and it's live.
import { defineArgs, defineCommand } from "
Related Skills
node-connect
334.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
334.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.2kCommit, push, and open a PR
