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 🙏

© 2025 – Pkg Stats / Ryan Hefner

quick-cli

v2.0.0

Published

Simplify CLI input/output.

Readme

Installation

npm i quick-cli --save
#or
yarn add quick-cli

Usage

This doc is for version 2.x.x, there are multiple breaking changes since 1.0.x

init

var cli = require('quick-cli'),

out

const {out,dev} = cli;

// choose meaning of your out text, quick-cli will apply colors
out.err('terrible error');
out.warn('bad warning');
out.info('some info');
out.log('important log');
out.success('success msg');
out.form('question');

// you can use multiple strings at once
out.log('some','text','split','into','multiple','strings')

// to display something only in dev/debug mode, use dev instead of out
out.info('lorem ipsum');
dev.info('lorem ipsum');


// activate/deactivate dev, .dev content is being display only if development mode is on

cli.setDevelopmentMode(true); 
// --OR--
cli.setDevelopmentMode(false);


// to apply color to string and display it later with another lib use applyColor:
cli.applyColor('lorem ipsum', 'info');

const raw_text="lorem ipsum";
const colorful_text=cli.applyColor(raw_text, 'info');

console.info(colorful_text); // both will display
cli.out(raw_text, 'info');  // formatted text

// you can add own colors with setColor
const chalk = require("chalk");
cli.addColor("cyantext", (...text)=>chalk.cyan(...text))
out.cyantext("it ","works!")

input

There are to ways to request user input with quick-cli: async and sync

They are avaiable in cli.input and cli.syncInput.

  • Synchronous methods will block your thread until user finishes entering input and return his input.
  • Asynchronous methods will simply return a promise that resolves to user input.

In both cases, avaiable methods are:

  • text(questionText, defaultValue, validator) - user will be presented with questionText and asked to type his anwser.
  • password(questionText, validator) - similar to text but anwser won't be displayed and there can't be a default value.
  • list(questionText, choices) - user will be presented with list of choices and asked to choose only one.
  • checkbox(questionText, choices) - user will be presented with list of choices and asked to choose as many as he wants.
  • confirm(questionText) - user will be presented with questionText and asked to anwser yes/no.

input example

inputSync.text("Enter some random text")
await inputAsync.text("Enter some random text")

inputSync.pass("And some secret password")
inputAsync.pass("And some secret password")

inputSync.confirm("Do you agree?")
await inputAsync.confirm("Do you agree?")

inputSync.list("You prefere ...",["cats","dogs","rabbits"])
await inputAsync.list("You prefere ...",["cats","dogs","rabbits"])

inputSync.checkbox("Multiselect",["a","b","c"])
await inputAsync.checkbox("Multiselect",["a","b","c"])

click to watch console screen cast for v1.0.5 (everything should look the same on v2.0.0)

http://www.youtube.com/watch?v=9-GJz1Nlb6I