Introduction
nut.js in a nutshell
Learn what nut.js is capable of and how to get started.
Installation
Step-by-step guides to setting up your system and installing the library.
Plugins
Extend the library with third-party plugins or write your own.
API reference
Learn more about the API details of nut.js.
Quick start
Here's a five step quick start guide to get you started with nut.js.
- Create a new npm project
mkdir my-new-project cd my-new-project npm init
- Install nut.js
npm i @nut-tree/nut-js
- Create a new file
index.js
and add the following codeconst { mouse, left, right, up, down } = require('@nut-tree/nut-js'); (async () => { await mouse.move(right(500)); await mouse.move(down(500)); await mouse.move(left(500)); await mouse.move(up(500)); })();
- Run your script
node index.js
- Enjoy your first nut.js script by watching your mouse move in a square
Oh no, that didn't work for me!
nut.js is designed and built such that it runs out of the box on all major platforms (macOS, Windows, Linux). In case of errors when following the quick start, please continue going through the installation guide to make sure required prerequisites are met.