SkillAgentSearch skills...

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/Rempts

README

πŸ“ƒ 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/citty and @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.ts file (bun dler rempts)

Installation

bun add @reliverse/rempts

Usage Examples

Screenshot

Rempts Example CLI 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.ts for 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: runMain is now an alias for createCli and is still supported for backward compatibility. The new createCli API 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

View on GitHub
GitHub Stars31
CategoryDevelopment
Updated8d ago
Forks2

Languages

TypeScript

Security Score

95/100

Audited on Mar 16, 2026

No findings