Introduction

Installation

nut.js is designed and built such that it runs out of the box on all major platforms (macOS, Windows, Linux).


General requirements

These are some general requirements for nut.js to run on your system.

License

Prebuilt packages for nut.js require an active subscription to the private nutjs.dev registry.

Please consult the registry access page for more information.

Operating system

nut.js is tested on the following operating systems:

macOSWindowsLinux
macOS 12Windows 10Ubuntu 20.04
macOS 13Windows 11Ubuntu 22.04
macOS 14

Architecture

nut.js makes heavy use of native bindings and system APIs. Bindings are precompiled for the following architectures:

  • macOS: x86_64, arm64
  • Windows: x86_64
  • Linux: x86_64

Node.js

nut.js is tested against node LTS versions.

That is currently:

  • 18 (lts/hydrogen)
  • 20 (lts/iron)

Platform prerequisites

This section lists runtime requirements for nut.js on the respective target platform.

Windows

In case you're running Windows 10 N and want to use ImageFinder plugins, please make sure to have the Media Feature Pack installed.

macOS

On macOS, Xcode command line tools are required. You can install them by running

xcode-select --install

Permissions:

nut.js requires the executing application, e.g. your terminal, to be given both Accessibility and Screen Recording permissions.

Starting with release 2.3.0, nut.js will check for and request these permissions automatically:

Popup requesting screen recording permissions

It will also give you a subtle hint in case permissions are lacking:

  • Accessibility: ##### 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 #####

Attention:

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. VSCode or IntelliJ, you'd have to add the respective IDE.

accessibility permissions screen

Linux

Depending on your distribution, Linux setups may differ.

In general, nut.js requires

  • libXtst

Installation on *buntu distributions:

sudo apt-get install libxtst-dev

Setups on other distributions might differ.

Attention:

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.

Snapshot releases

nut.js also provides snapshot releases which allows to test upcoming features.

Running

npm i @nut-tree/nut-js@next

will install the most recent development release of nut.js.

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.


Installation

Installing nut.js is as easy as running

npm i @nut-tree/nut-js

in your project.


Getting help

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?
  • etc.

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.

Previous
Getting started