# restore-cursor

> Gracefully restore the CLI cursor on exit

Latest version **5.1.0** (published 2024-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install restore-cursor
pnpm add restore-cursor
yarn add restore-cursor
bun add restore-cursor
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2024-07-26 |
| First published | 2014-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 41 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | exit, quit, process, graceful, shutdown, sigterm, sigint, terminate, kill, stop, cli, cursor, ansi, show, term, terminal, console, tty, shell, command-line |

## Links

- npm: https://www.npmjs.com/package/restore-cursor
- Repository: https://github.com/sindresorhus/restore-cursor
- Homepage: https://github.com/sindresorhus/restore-cursor#readme
- Issues: https://github.com/sindresorhus/restore-cursor/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/restore-cursor

## Dependencies (2)

- [onetime](https://npm.io/package/onetime.md) ^7.0.0
- [signal-exit](https://npm.io/package/signal-exit.md) ^4.1.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

- 5.1.0 (latest) — 2024-07-26
- 5.0.0 — 2023-09-28
- 4.0.0 — 2021-08-23
- 3.1.0 — 2019-04-26
- 3.0.0 — 2019-04-17
- 2.0.0 — 2017-01-09
- 1.0.1 — 2015-09-18
- 1.0.0 — 2014-08-31

## README

# restore-cursor

> Gracefully restore the CLI cursor on exit

Prevent the cursor you have hidden interactively from remaining hidden if the process crashes.

It does nothing if run in a non-TTY context.

## Install

```sh
npm install restore-cursor
```

## Usage

```js
import restoreCursor from 'restore-cursor';

restoreCursor();
```

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