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

bumbum-cli

v1.0.1

Published

A TypeScript CLI library for terminal styling and formatting

Downloads

15

Readme

# Terminal Styling Toolkit

A powerful TypeScript library for enhancing terminal applications with beautiful styling and formatting capabilities.

## Installation

```bash 
npm i bumbum-cli 

Features

  • 🎨 Text Coloring: Extensive color palette with 24+ named colors
  • 📦 Box Formatting: Create beautiful boxes around your text
  • 📋 Definition Lists: Format key-value pairs neatly
  • 🖥️ Console Utilities: Clear screen and add new lines
  • 🦄 Text Styles: Bold, italic, and background colors
  • 📘 TypeScript Ready: Full type definitions included

Quick Start

import { box, color, definer, cli } from 'terminal-styling-toolkit';

// Create a colored box
const message = box('Hello World!', {
  borderColor: 'green',
  backgroundColor: 'black',
  padding: 1
});

console.log(message);

// Use colors
console.log(color.red('This is red text'));
console.log(color.green.bold('This is bold green text'));
console.log(color.blue.bg('#FFCC00')('Blue text with yellow background'));


// Console utilities
cli.nl(2); // Add two new lines
cli.clear(); // Clear the console

API Reference

Colors

The library provides 24+ named colors with style modifiers:

// Basic colors
color.red('text')
color.green('text')
color.blue('text')
color.yellow('text')
color.purple('text')
// ... and many more

// Style modifiers
color.red.bold('bold red text')
color.green.italic('italic green text')
color.blue.boldItalic('bold italic blue text')

// Background colors
color.red.bg('#FFFFFF')('red text on white background')
color.green.bg('#000000').bold('bold green text on black background')

Available colors: red, redLight, redDark, orange, orangeLight, orangeDark, yellow, yellowLight, gold, green, greenLight, greenDark, blue, blueLight, blueDark, purple, purpleLight, purpleDark, cyan, teal, pink, pinkLight, pinkDark, brown, brownLight, brownDark, lime, limeLight, limeDark, magenta, magentaLight, magentaDark, gray, grayLight, grayDark, black, white.

Box Formatting

Create styled boxes around your text:

box(text: string, options?: BoxOptions): string

Options:

  • padding: Object with top, bottom, left, right properties
  • margin: Number
  • borderStyle: 'single' | 'double' | 'round' | 'bold' | 'singleDouble' | 'doubleSingle' | 'classic'
  • borderColor: Color name or hex value
  • backgroundColor: Color name or hex value
  • align: 'left' | 'center' | 'right'

Example:

const boxedText = box('Important Message', {
  padding: { top: 1, bottom: 1, left: 2, right: 2 },
  borderStyle: 'double',
  borderColor: 'yellow',
  backgroundColor: 'blueDark',
  align: 'center'
});

Console Utilities

Basic console operations:

cli.nl(count: number = 1): void // Add new lines
cli.clear(): void // Clear console

TypeScript Support

Full TypeScript definitions are included:

import { BoxOptions, DefinerItem, DefinerOptions, ColorFunction } from 'terminal-styling-toolkit';

const options: BoxOptions = {
  borderColor: 'green',
  padding: { top: 1, bottom: 1, left: 2, right: 2 }
};

const items: DefinerItem[] = [
  { name: 'Key', value: 'Value' }
];

const redText: ColorFunction = color.red;

Examples

Creating a Welcome Message

import { box, color, cli } from 'terminal-styling-toolkit';

cli.clear();

const welcomeMessage = box('Welcome to My CLI App', {
  padding: 1,
  borderStyle: 'round',
  borderColor: 'green',
  backgroundColor: 'black',
  align: 'center'
});

console.log(color.green.bold(welcomeMessage));
console.log(color.cyan('This is a terminal application with beautiful styling!'));

Contributing

We welcome contributions! Please feel free to submit issues, feature requests, or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you have any questions or need help, please open an issue on GitHub.


Made with DETAN for the developer community