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

ku-progress-bar

v1.0.0-rc.4

Published

cli progress bar

Readme

Installation

$ npm install  ku-progress-bar

Overview

Simple bar

import { Bar, Progress } from 'ku-progress-bar';
import { loopProgresses } from '../helpers/loop-progresses';

const progress = new Progress({ total: 1000 });

const bar = new Bar().addProgress(progress);

bar.start();

loopProgresses([progress], { getDelay: () => 5 });

see simple-start.example.ts

✗ ts-node src/examples/current/simple.example.ts
[===============================---------] 78% ETA: 1s speed: 178/s duration: 4s 777/1000

Bar Presets

import { Bar, BarItem, presets, Progress } from 'ku-progress-bar';
import { loopProgresses } from '../helpers/loop-progresses';

const bar = new Bar();
const progress = new Progress({ total: 100 });
bar.start();

for (const presetKey of Object.keys(presets)) {
  const presetName = presetKey.padEnd(7, ' ');
  bar.add(
    new BarItem(progress, {
      options: presets[presetKey],
      template: ({ bar, percentage, eta, speed, duration, value, total }) =>
        ` ${presetName} [${bar}] ${percentage} ETA: ${eta} speed: ${speed} duration: ${duration} ${value}/${total}`,
    }),
  );
}

loopProgresses([progress]);

see presets-simple.example.ts

✗ ts-node ./src/examples/presets.example.ts
 classic [============----------------------------] 31% ETA: 7s speed: 10/s duration: 3s 31/100
 shades  [████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 31% ETA: 7s speed: 10/s duration: 3s 31/100
 rect    [■■■■■■■■■■■■                            ] 31% ETA: 7s speed: 10/s duration: 3s 31/100
 braille [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀] 31% ETA: 7s speed: 10/s duration: 3s 31/100

img.png

Multi bars

multi-files-processing

Composite Progress bar

import {
  Bar,
  BarsFormatter,
  BarItem,
  presets,
  Progress,
} from 'ku-progress-bar';
import * as chalk from 'chalk';
import { loopProgresses } from '../helpers/loop-progresses';

export const bar = new Bar().start();

const progresses = [
  new Progress({ total: 1000, start: 100 }),
  new Progress({ total: 1000 }),
];

bar.add(
  new BarItem(progresses, {
    options: {
      ...presets.shades,
      formatter: new BarsFormatter([chalk.green, chalk.yellowBright]),
    },
    template: (read, write) => {
      const readString = `read: ${read.value}/${read.total} ( ${read.percentage}% eta: ${read.etaHumanReadable})`;
      const writeString = `write: ${write.value}/${write.total} ( ${write.percentage}% eta: ${write.etaHumanReadable})`;
      return `[${read.bars}] ${chalk.green(readString)} ${chalk.yellowBright(
        writeString,
      )}`;
    },
  }),
);

loopProgresses(progresses);

see composite-progress.example.ts

composite-progress.example.png

composite-progress

Documentation

Bar Class

public methods

  • constructor (): Initializes a new instance of the Bar class.
  • add (item: IBarItem): Adds a new progress bar item to the Bar instance.
  • addProgress (progress: IProgress, params?: IParams): Adds a new progress bar item to the Bar instance.
  • start (): Starts the progress bar rendering process.
  • render (): Renders the progress bar.
  • stop (): Stops the progress bar rendering process.
  • clear (): Clears the progress bar from the console.
  • remove (item: IBarItem): Removes a progress bar item from the Bar instance.
  • removeByProgress (progress: IProgress): Removes a progress bar item from the Bar instance.
  • getItems (): Returns an array of all progress bar items in the Bar instance.
  • isStarted (): Returns a boolean value indicating whether the progress bar rendering process is started.
  • refresh (): Refreshes the progress bar rendering process.
  • wrapLogger (logger: ILogger): Wraps a logger with the progress bar rendering process.
  • wrapLog (log: ILog): Wraps a log with the progress bar rendering process.

BarItem Class

Parameters of the BarItem class:

  • progresses (IProgress | IProgress[]): An object or an array of objects of type IProgress representing the progress.
  • params (IParams | undefined): Additional parameters to customize the appearance and behavior of the progress bar.
    • template (function | undefined): Template for displaying the progress bar.
    • options (Partial<IBarOptions> | undefined): Configuration settings for displaying the progress bar.
    • dataProviders (Record<string, { getData: ( progress: IProgress, progresses: IProgress[], ) => unknown } > | undefined)

Spinners example

src/examples/spinner.example.ts

spinner-example