# spins

> use spinners in terminal

Latest version **1.0.2** (published 2022-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install spins
pnpm add spins
yarn add spins
bun add spins
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-04-21 |
| First published | 2022-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | otoniel19 |
| Maintainers | otoniel |
| Keywords | spinner, cli, terminal, spins, node.js |

## Links

- npm: https://www.npmjs.com/package/spins
- npm.io page: https://npm.io/package/spins

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [cli-spinners](https://npm.io/package/cli-spinners.md) ^2.6.1

## 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

- 1.0.2 (latest) — 2022-04-21
- 1.0.1 — 2022-04-21
- 1.0.0 — 2022-04-21

## README

# spins

> use spinners on the terminal

### features

- [x] succeed spinner
- [x] fail spinner
- [x] apply color to spinner
- [x] stop and persist
- [x] update text
- [x] show warning
- [x] show info

# install

```sh
npm install spins
# or
yarn add spins
```

# usage

- the spins supports all the spinners on the [cli-spinners](https://npm.im/cli-spinners)
- you can also add your own spinner
- creating a spinner is as simple

- using the default spinners

```js
const spins = require("spins");
const ani = new spins({
  color: "blue",
  spinner: "point",
  stream: process.stdout
});
```

- using your own spinner

```js
const spins = require("spins");
const ani = new spins({
  color: "blue",
  spinner: {
    frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
    interval: 80
  },
  stream: process.stdout
});
```

- starting the spinner

```js
ani.start();
```

- stopping the spinner

```js
ani.stop();
```

- stopping and persisting the spinner

```js
ani.stopAndPersist();
```

- updating the text

```js
ani.setText("new text");
```

- updating the spinner

```js
ani.setSpinner("dots");
```

- updating the color

```js
ani.setColor("red");
```

- suceed spinner

```js
ani.success("Some", "text");
```

- fail spinner

```js
ani.fail("Some", "text");
```

- info spinner

```js
ani.info("Some", "text");
```

- warn spinner

```js
ani.warn("Some", "text");
```

- resume the spinner

```js
ani.resume();
```

- writing logs to the spinner

```js
ani.log("Some", "text");
```

---
_Source: https://npm.io/package/spins · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
