nut.js is designed and built such that it runs out of the box on all major platforms (macOS, Windows, Linux).
These are some general requirements for nut.js to run on your system.
nut.js is tested on the following operating systems:
|macOS 11||Windows 10||Ubuntu 19.04|
|macOS 12||Windows 11||Ubuntu 20.04|
|macOS 13||Ubuntu 22.04|
nut.js is tested against node LTS versions.
That is currently:
- 16 (lts/gallium)
- 18 (lts/hydrogen)
- 20 (lts/iron)
This section lists runtime requirements for
nut.js on the respective target platform.
On macOS, Xcode command line tools are required. You can install them by running
nut.js requires the executing application, e.g. your terminal, to be given both
Screen Recording permissions.
Starting with release
2.3.0, nut.js will check for and request these permissions automatically:
It will also give you a subtle hint in case permissions are lacking:
##### WARNING! The application running this script is not a trusted process! Please visit https://github.com/nut-tree/nut.js#macos #####
- Screen Recording:
##### WARNING! The application running this script is not allowed to capture screen content! Please visit https://github.com/nut-tree/nut.js#macos #####
Prior to release
2.3.0 you'll have to grant these permissions manually.
Settings -> Security & Privacy -> Privacy tab -> Accessibility -> Add...
For example, if you want to execute your node script in e.g.
iTerm2, you'd have to add
iTerm.app to the list. When running your script from a built-in terminal in e.g.
IntelliJ, you'd have to add the respective IDE.
Depending on your distribution, Linux setups may differ.
sudo apt-get install libxtst-dev
Setups on other distributions might differ.
At the moment nut.js only supports X11.
Wayland is NOT supported!
On e.g. Ubuntu you can switch to XWayland on your login screen as a workaround.
nut.js also provides snapshot releases which allows to test upcoming features.
npm i @nut-tree/nut-js@next
will install the most recent development release of
Attention: While snapshot releases are great to work with upcoming features before a new stable release, it is still a snapshot release. Please bear in mind that things might change and / or break on snapshot releases, so it is not recommended using them in production.
Installing nut.js is as easy as running
npm i @nut-tree/nut-js
in your project.
There are multiple ways to get help with nut.js.
Submit an issue
Bug reports are best submitted as GitHub issues. Please be as specific as possible when describing the issue and how to reproduce it.
This includes information about your environment, e.g.
- Hardware you're using (e.g. MacBook Pro 2019)
- Operating system
- node version / Electron version
- nut.js version
- Screen resolution
- Is your display scaled?
- Is it an external display?
Start a discussion
If you have a question about nut.js or want to start a discussion around a nut.js related topic, please start a GitHub Discussions instead of creating an issue.
Join the community
Feel free to join our Discord community where you can ask questions and discuss nut.js with other users.