Skip to content

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

constProgressBar=require('progress-cli');// Create a progress barconstbar=newProgressBar({total: 100,width: 40,format: 'classic'});// Update progressbar.update(50);// Completebar.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

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

Minimal Style

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

Blocks Style

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

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages