# get-cursor-position

> Get the cursor's current position in your terminal.

Latest version **2.0.0** (published 2022-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-cursor-position
pnpm add get-cursor-position
yarn add get-cursor-position
bun add get-cursor-position
```

## 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 | 2.0.0 |
| Published | 2022-09-29 |
| First published | 2016-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 30 |
| Author | bubkoo |
| Maintainers | bubkoo |
| Keywords | terminal, console, cursor, position, ansi, escape |

## Links

- npm: https://www.npmjs.com/package/get-cursor-position
- Repository: https://github.com/bubkoo/get-cursor-position
- Issues: https://github.com/bubkoo/get-cursor-position/issues
- npm.io page: https://npm.io/package/get-cursor-position

## Dependencies (2)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [node-addon-api](https://npm.io/package/node-addon-api.md) ^5.0.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-09-29
- 1.0.5 — 2017-08-11
- 1.0.4 — 2017-08-09
- 1.0.3 — 2016-11-01
- 1.0.2 — 2016-06-13
- 1.0.1 — 2016-06-03
- 1.0.0 — 2016-04-16
- 0.0.5 — 2016-03-10
- 0.0.4 — 2016-03-10
- 0.0.2 — 2016-03-07
- 0.0.1 — 2016-03-05

## README

# get-cursor-position

> Get the cursor's current position in your terminal.
 
[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/get-cursor-position/blob/master/LICENSE)
[![Package Quality](http://npm.packagequality.com/shield/get-cursor-position.svg)](http://packagequality.com/#?package=get-cursor-position)

## Install

```
$ npm install get-cursor-position --save
```

## Usage

Async:

```js

var getCursorPosition = require('get-cursor-position');

getCursorPosition.async(function(pos) {
    console.log('row: ' + pos.row);
    console.log('col: ' + pos.col);
});

```

Sync:

```js
var getCursorPosition = require('get-cursor-position');
var pos = getCursorPosition.sync();
console.log('row: ' + pos.row);
console.log('col: ' + pos.col);
```

## Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please [create an issue](https://github.com/bubkoo/get-cursor-position/issues/new).

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