terminal-utilities
v2.4.1
Published
An easy to use synchronous node.js library for using the Linux terminal.
Downloads
7
Readme
terminal-utilities
An easy to use synchronous node.js library for using the terminal.
Installation
npm install terminal-utilities
Usage
const terminal = require('terminal-utilities')
Docs
setCursor(cols, rows)
This positions the cursor based on cols
and rows
.
clear()
This clears the terminal screen.
clearLine(line)
This clears a specific line.
write(text)
This prints text
to the terminal.
writeLine(text)
This prints text
to the terminal, followed by a \n
.
readLine()
This reads one line of input and returns it.
error(message)
This prints an error to the terminal in the form: ERR: message