Skip to content

sickagents/progress-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

progress-cli

A lightweight, zero-dependency Node.js library for beautiful terminal progress bars.

Features

  • 🎨 Customizable progress bar styles
  • 📊 Multiple bar formats (classic, minimal, blocks)
  • ⚡ Zero dependencies
  • 🔄 Real-time updates
  • 📦 Easy to integrate

Installation

npm install progress-cli

Usage

const ProgressBar = require('progress-cli');

// Create a progress bar
const bar = new ProgressBar({
  total: 100,
  width: 40,
  format: 'classic'
});

// Update progress
bar.update(50);

// Complete
bar.complete();

API

new ProgressBar(options)

Creates a new progress bar instance.

Options:

  • total (number): Total number of steps
  • width (number): Width of the progress bar (default: 40)
  • format (string): Bar format - 'classic', 'minimal', or 'blocks' (default: 'classic')
  • title (string): Optional title for the progress bar

Methods

  • update(current): Update progress to a specific value
  • increment(step): Increment progress by a step value
  • complete(): Mark progress as complete
  • reset(): Reset progress to 0

Examples

Classic Style

const bar = new ProgressBar({ total: 100, format: 'classic' });
bar.update(75);
// Output: [===========================>            ] 75%

Minimal Style

const bar = new ProgressBar({ total: 100, format: 'minimal' });
bar.update(50);
// Output: ████████████████████                    50%

Blocks Style

const bar = new ProgressBar({ total: 100, format: 'blocks' });
bar.update(60);
// Output: ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ 60%

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors