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

@wheercool/r-console

v0.2.0

Published

RConsole is a library that helps to display realtime information and build dashboards in the console

Readme

r-console

RConsole is a library that helps display realtime information in the console. It adds a concept of Bar - group of lines sticked to the bottom of the console. Bars make possible to display general information all the time despite other printed messages. Each bar can be updated asynchronous and independently. All these features makes possible to create console-based dashboards easily.

Console layout

All messages will be printed above bottom bars. There are 2 bottom bars. They will always be displayed at the bottom of the console.

$ Some text goes here


====================
Sticky bottom bar 1
====================
Sticky bottom bar 2
====================

Install

$ npm install @wheercool/r-console

Features:

  • Colored messages
  • Sticky bottom bars

Colored messages

Wrapping message with color tag will change the color of the text inside this tag.

To run it locally:

$ npm run example1
const { RConsole } = require('r-console');

RConsole.print('Simple message');
RConsole.print('<red>Colored message</red>');
RConsole.print('<magenta>Colors <red>can be nested</red>, cool!</magenta>')

Available colors:

  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • black

Sticky bottom bars

It is possible to add multiple bottom bars. All printed messages (RConsole.print) will appear above added bars. It is handy to display monitoring information in that way.

Progress bar example

To run it locally:

$ npm run example2
const { RConsole } = require('r-console');

const bottomBar = RConsole.addBar({
 size: 3, // 3 lines height
 template: ({progress}) => [
   `<cyan>=====================</cyan>`,
   `<cyan>Progress: <yellow>${progress.toFixed(2)}%</yellow></cyan>`,
   `<cyan>=====================</cyan>`
 ]
});

let progress = 0;
bottomBar.update({ progress });
RConsole.print('We can print some message');
RConsole.print('But bottomBar will be displayed always at the bottom');

// Emulates progress
let handle = setInterval(() => {
    progress += Math.random() * 20;
    if (progress >= 100) {
      progress = 100;
      clearInterval(handle);
    }
    bottomBar.update({progress}) // update bottomBar value. All previously printed messages will stay on screen.
}, 500);

Multiple independent bars

It is possible to add more than one bar and update them independently.

To run it locally:

$ npm run example3
const { RConsole} = require('r-console');

const memoryUsage = RConsole.addBar({
  size: 2,
  template: (memory) => [
    `<magenta>=====================</magenta>`,
    `<magenta>Memory: <red>${(memory / 1024 / 1024).toFixed(2)} Mb</red></magenta>`
  ]
})

const progressBar = RConsole.addBar({
  size: 3, // 3 lines height
  template: ({progress}) => [
    `<cyan>=====================</cyan>`,
    `<cyan>Progress: <yellow>${progress.toFixed(2)}%</yellow></cyan>`,
    `<cyan>=====================</cyan>`
  ]
});

let progress = 0;
progressBar.update({progress});
RConsole.print('We can print some message');
RConsole.print('But bottomBar will be displayed always at the bottom');


let memoryHandle = setInterval(() => {
  memoryUsage.update(process.memoryUsage().heapUsed) // Displays current heap usage
}, 500);


// Emulates progress
let handle = setInterval(() => {
  progress += Math.random() * 20;
  if (progress >= 100) {
    progress = 100;
    clearInterval(handle);
    clearInterval(memoryHandle)
  }
  progressBar.update({progress}) // update bottomBar value. All previously printed messages will stay on screen
}, 500);

API

RConsole.print(coloredMessage)

Displays message in the console

coloredMessage

Type: string

String to print. May contain color tags:

  • <red>
  • <green>
  • <yellow>
  • <blue>
  • <magenta>
  • <cyan>
  • <white>
  • <black>

All text inside tags will be colored.

RConsole.addBar(config)

ReturnType: Bar

Adds a sticky bottom bar at the bottom of console. Bar will not be displayed automatically. To display bar see Bar.update() method.

config

size

Type: number

Number of lines that bar takes.

template

Type: function

ReturnType: coloredString[]

Function that will be invoked when Bar:update() is called. All parameters of update method will be passed to template. The result must be an array of size strings.

Bar.update(...values)

Displays/Updates the bar with new values.

values

Type: ...any

Values that will be passed to template callback.