New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

easycli-prompts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easycli-prompts

Interactive prompts for EasyCLI

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

easycli-prompts

Interactive prompts for EasyCLI applications.

Features

  • Smart Defaults: Skips prompts if flags or config values are present.
  • Interactive: Uses readline for text, password, confirm, and select prompts.
  • Unified: Consistent API regardless of input source.

Usage

This package is typically used via the ctx.ask object available in EasyCLI commands.

// In a command definition
async run({ ctx }) {
  // Will only prompt if --name flag not provided and not in config
  const name = await ctx.ask.text("What is your name?");
  
  // Will only prompt if --db-password not provided
  const password = await ctx.ask.password("Database password");
  
  const proceed = await ctx.ask.confirm("Continue?");
  
  const type = await ctx.ask.select("Deploy type", ["prod", "staging"]);
}

API

ctx.ask.text(message)

Prompts for text input.

ctx.ask.password(message)

Prompts for hidden text input.

ctx.ask.confirm(message)

Prompts for Yes/No (y/n) confirmation. Returns boolean.

ctx.ask.select(message, options)

Prompts to select one option from a list.

FAQs

Package last updated on 19 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts