npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agentine/elicit

v0.1.0

Published

Lightweight interactive CLI prompts for Node.js — zero-dependency replacement for prompts and enquirer

Readme

@agentine/elicit

Lightweight interactive CLI prompts for Node.js. Zero dependencies.

Drop-in replacement for prompts and enquirer.

Install

npm install @agentine/elicit

Quick Start

import elicit from '@agentine/elicit';

const response = await elicit([
  {
    type: 'text',
    name: 'name',
    message: 'What is your name?'
  },
  {
    type: 'confirm',
    name: 'agree',
    message: 'Do you agree to the terms?'
  }
]);

console.log(response); // { name: 'Alice', agree: true }

Prompt Types

| Type | Description | |------|-------------| | text | Single-line text input | | password | Masked text input (shows *) | | invisible | Hidden text input | | number | Numeric input with min/max/float/increment | | confirm | Yes/no boolean | | list | Comma-separated list → array | | toggle | Toggle between two values | | select | Single selection from choices | | multiselect | Multiple selection from choices | | autocomplete | Text input with suggestion filtering | | date | Date/time input with segment navigation |

API

elicit(questions, options?)

  • questionsQuestion | Question[]
  • options.onSubmit(question, answer, answers) => void
  • options.onCancel(question, answers) => void | boolean
  • Returns Promise<Record<string, unknown>>

Question Options

{
  type: 'text',          // Prompt type (or function returning type/false)
  name: 'field',         // Key in response object
  message: 'Prompt?',    // Display message (or function)
  initial: 'default',    // Default value (or function)
  validate: (v) => true, // Return true or error string
  format: (v) => v,      // Transform displayed value
  onState: (state) => {} // { state, value, aborted }
}

All properties except name can be dynamic functions receiving (prev, answers).

Type-Specific Options

number: min, max, float, round, increment

list: separator (default: ,)

toggle: active (default: on), inactive (default: off)

select/multiselect: choices, hint, warn

multiselect: min, max

autocomplete: choices, suggest, limit

date: mask

Choices

{
  type: 'select',
  name: 'color',
  message: 'Pick a color',
  choices: [
    { title: 'Red', value: 'red', description: 'Like fire' },
    { title: 'Blue', value: 'blue' },
    { title: 'Green', value: 'green', disabled: true }
  ]
}

Programmatic Injection (Testing)

import elicit from '@agentine/elicit';

elicit.inject(['Alice', true, 42]);

const answers = await elicit([
  { type: 'text', name: 'name', message: 'Name?' },
  { type: 'confirm', name: 'ok', message: 'OK?' },
  { type: 'number', name: 'age', message: 'Age?' }
]);
// answers = { name: 'Alice', ok: true, age: 42 }

Migration from prompts

Replace your import:

- const prompts = require('prompts');
+ const prompts = require('@agentine/elicit/compat/prompts').default;

Or use ESM:

- import prompts from 'prompts';
+ import prompts from '@agentine/elicit/compat/prompts';

The API is identical — same function signature, option shapes, callbacks, and prompts.inject().

Migration from enquirer

Replace your import:

- const { prompt } = require('enquirer');
+ const { prompt } = require('@agentine/elicit/compat/enquirer');

Or use ESM:

- import { prompt, Prompt } from 'enquirer';
+ import { prompt, Prompt } from '@agentine/elicit/compat/enquirer';

Type names are automatically mapped: inputtext, numeralnumber, booleanconfirm.

The compat layer supports enquirer-style choices (name/message/value/hint), skip, and result transformers.

Exports

// Main API
import elicit from '@agentine/elicit';

// prompts compatibility
import prompts from '@agentine/elicit/compat/prompts';

// enquirer compatibility
import { prompt, Prompt } from '@agentine/elicit/compat/enquirer';

// Utilities
import { Terminal, ansi, parseKey, style, PromptEngine } from '@agentine/elicit';

License

MIT