promptsapp
v1.0.11
Published
keep prompting user
Readme
promptsapp
A lightweight Node.js helper for creating interactive command-line prompts — perfect for building simple CLI tools, REPLs, or chatbot-style interfaces.
Quick Start
Install it from NPM:
npm install promptsappconst { app } = require('promptsapp');
const work = async (command, args) => {
if (command === 'say') {
console.log('You said:', args.join(' '));
} else {
console.log('Unknown command:', command);
}
};
const prompt = app('Enter command (type "exit" to quit): ', 'exit', work);
prompt.onExit(() => {
console.log('Goodbye!');
});
prompt.start();