1 # cli-cursor [![Build Status](https://travis-ci.org/sindresorhus/cli-cursor.svg?branch=master)](https://travis-ci.org/sindresorhus/cli-cursor)
3 > Toggle the CLI cursor
5 The cursor is [gracefully restored](https://github.com/sindresorhus/restore-cursor) if the process exits.
11 $ npm install cli-cursor
18 const cliCursor = require('cli-cursor');
22 const unicornsAreAwesome = true;
23 cliCursor.toggle(unicornsAreAwesome);
33 ### .toggle(force?, stream?)
37 Useful for showing or hiding the cursor based on a boolean.
41 Type: `stream.Writable`<br>
42 Default: `process.stderr`
49 <a href="https://tidelift.com/subscription/pkg/npm-cli-cursor?utm_source=npm-cli-cursor&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
53 Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.