@clack/core

Low-level primitives for building interactive command-line applications.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Clack contains low-level primitives for implementing your own command-line applications.

Examples

create interactive prompts and menus in terminal apps$ import { prompt, select } from '@clack/core'; const answer = await prompt('What is your name?');
build custom CLI input forms with validation$ import { text, confirm } from '@clack/core'; const name = await text({ message: 'Enter name', validate: (v) => v.length > 0 });
make dropdown selection menus for command line$ import { select } from '@clack/core'; const choice = await select({ message: 'Pick one', options: [{value: 'a'}, {value: 'b'}] });
display progress bars and loading spinners$ import { spinner } from '@clack/core'; const s = spinner(); s.start('Processing...'); s.stop('Done!');
build styled terminal UI with colors and formatting$ import { note, outro, intro } from '@clack/core'; intro('Welcome'); note('Information'); outro('Finished');