
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
@open-tech-world/cli-progress-bar
Advanced tools
Node.js CLI progress bar.
Internally it uses @open-tech-world/es-cli-styles for terminal colors. Refer it for supported colors.
Using npm
$ npm install @open-tech-world/cli-progress-bar
Using Yarn
$ yarn add @open-tech-world/cli-progress-bar
import { ProgressBar } from '@open-tech-world/cli-progress-bar';
const pBar = new ProgressBar({ prefix: 'Downloading' });
pBar.run({ value: 0, total: 100 });
pBar.run({ value: 50, total: 100 });
pBar.run({ value: 100, total: 100, prefix: 'Download Completed!' });
new ProgressBar(options?: Partial<IOptions>)
It creates a new instance of the ProgressBar.
options:
| Name | Type | Default | Description |
|---|---|---|---|
| stream | NodeJS.WriteStream | process.stderr | The stream to use. |
| width | number | 30 | The size of the progress bar. |
| prefix | string | '' | The string to be prefixed progress bar. |
| suffix | string | '' | The string to be suffixed progress bar. |
| color | string | 'green' | The color to render the progress bar. Refer the supported color names here. |
| autoClear | boolean | false | If true, then it auto clears the progress bar when it reaches 100%. |
run(options: IRunOptions): void
Runs the current progress bar instance with the given values & options.
options:
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| value | number | NaN | Yes | The current value of the progress bar. |
| total | number | NaN | Yes | The total value for the progress bar. |
| prefix | string | '' | No | The string to be prefixed progress bar. |
| suffix | string | '' | No | The string to be suffixed progress bar. |
| color | string | 'green' | No | The color to render the progress bar. Refer the supported color names here. |
stop(clear = false): void
Stops the current progress bar instance with the current state and optionally clears the progress bar.
pBar.stop(); // It just stops the progress bar.
pBar.stop(true); // It stops & removes the progress bar.
Copyright (c) 2021, Thanga Ganapathy (MIT License).
FAQs
Node.js CLI progress bar.
The npm package @open-tech-world/cli-progress-bar receives a total of 1,836 weekly downloads. As such, @open-tech-world/cli-progress-bar popularity was classified as popular.
We found that @open-tech-world/cli-progress-bar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.