# @open-tech-world/node-cli-progress

> CLI spinner with task progress result.

Latest version **0.2.1** (published 2021-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @open-tech-world/node-cli-progress
pnpm add @open-tech-world/node-cli-progress
yarn add @open-tech-world/node-cli-progress
bun add @open-tech-world/node-cli-progress
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2021-08-17 |
| First published | 2021-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^12.22.0 \|\| ^14.17.0 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thanga Ganapathy |
| Maintainers | ganapathy |
| Keywords | cli, spinner, progress, loading, terminal, console |

## Links

- npm: https://www.npmjs.com/package/@open-tech-world/node-cli-progress
- Repository: https://github.com/open-tech-world/node-cli-progress
- Homepage: https://github.com/open-tech-world/node-cli-progress#readme
- Issues: https://github.com/open-tech-world/node-cli-progress/issues
- npm.io page: https://npm.io/package/@open-tech-world/node-cli-progress

## Dependencies (1)

- [@open-tech-world/es-cli-styles](https://npm.io/package/@open-tech-world/es-cli-styles.md) ^0.3.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2021-08-17
- 0.2.0 — 2021-08-13
- 0.1.0 — 2021-08-13

## README

<div align="center">

# @open-tech-world/node-cli-progress
[![Build](https://github.com/open-tech-world/node-cli-progress/actions/workflows/build.yml/badge.svg)](https://github.com/open-tech-world/node-cli-progress/actions/workflows/build.yml) [![CodeFactor](https://www.codefactor.io/repository/github/open-tech-world/node-cli-progress/badge)](https://www.codefactor.io/repository/github/open-tech-world/node-cli-progress) ![npm (scoped)](https://img.shields.io/npm/v/@open-tech-world/node-cli-progress?color=blue)

![](demo.gif)

</div>

> CLI spinner with task progress result.

## Installation

Using npm

```shell
npm install @open-tech-world/node-cli-progress
```

Using Yarn

```shell
yarn add @open-tech-world/node-cli-progress
```

## Usage

```ts
import { cliProgress } from '@open-tech-world/node-cli-progress';

const progress = new cliProgress();
progress.start();
setTimeout(() => {
  progress.update('Downloading');
}, 1000);
progress.done('Download completed!');
```

## API

**new cliProgress(options?: Partial\<IOptions\>)**

It creates a new instance of the cliProgress. 

options:

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| stream | NodeJS.WriteStream | process.stderr | The stream to use.


#### Instance methods:

**start(text?: string)**

This method starts the spinner with optional `text`.

The default text is `Loading`.

**update(text: string)**

This method updates the `current text` with the given `text`.

**done(text?: string)**

This method stops the spinner and mark the task as `success` with optional `text`.

**fail(text?: string)**

This method stops the spinner and mark the task as `failed` with optional `text`.

**warn(text?: string)**

This method stops the spinner and mark the task as `warning` with optional `text`.

**info(text?: string)**

This method stops the spinner and mark the task as `info` with optional `text`.

## License

Copyright (c) 2021, [Thanga Ganapathy](https://thanga-ganapathy.github.io) ([MIT License](./LICENSE)).

---
_Source: https://npm.io/package/@open-tech-world/node-cli-progress · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
