@nut-tree/nut-js Changelog


  • Feature: Extend Window class with minimize and restore methods


  • Enhancement: Extend WindowProviderInterface with minimizeWindow and restoreWindow functions
  • Feature: Introduce WindowElementQuery type and extend Window class with find, findAll, waitFor and find hooks


  • Enhancement: Fix channel info for image loader to 4 to avoid processing errors


  • Feature: Add ability to move/focus/resize windows
  • Enhancement: Add support for 'Clear' key on macOS
  • Feature: Optional default providers
  • BREAKING: OCR confidence override not working
  • Enhancement: New 'toHaveColor' Jest matcher
  • Enhancement: Improved error messages for timeouts
  • Maintenance: Migrate nut.js core and its default providers to a monorepo
  • Maintenance: Use PlayWright for E2E tests
  • Bugfix: getActiveWindow returns out-of-bounds coordinates for maximized windows
  • BREAKING: Require minimum node version of 16


  • Bugfix: Screen capture broken on macOS 13
  • Enhancement: Enable newly introduced keys to be used as modifiers
  • Enhancement: Extend move API to handle single point case
  • Feature: Add color queries to search for pixels of a certain color
  • Bugfix: screen.highlight closes Electron window


  • Bugfix: Fix mouse drift on Windows


  • Enhancement: Typo fix
  • Enhancement: Additional keys


  • Enhancement: Improve types of Jest matchers
  • BREAKING: Rename clipboard methods
  • Enhancement: Option to disable automatic request of permissions in macOS
  • BREAKING: Allow screen.find and other to work with non-image needles
  • BREAKING: Add bits per pixel and byteWidth info to image class
  • Bugfix: Installed Electron App crashes after upgrading to 2.3.0
  • Maintenance: Add .nvmrc config
  • Enhancement: Define and export interfaces for keyboard/mouse/screen configs
  • Bugfix: 'RightShift' key is mapped to space
  • Maintenance: Introduce prettier
  • Bugfix: Win2012-R2: Error: The specified procedure could not be found
  • Feature: Logging provider


  • Bugfix: Segmentation Fault when retrieving window title
  • Enhancement: Automatically check and request required permissions on macOS


  • Enhancement: Scale easing function result by base speed before applying
  • Maintenance: Resolve security vulnerabilities


  • Maintenance: Limit CI runs to PRs, not every push
  • Maintenance: Upgrade node version to 16 for all CI runs
  • Bugfix: Fix grave accent
  • Enhancement: Refine error messages on fetchFromUrl
  • Enhancement: Ship Windows runtime dependencies


  • Bugfix: Modifier keys are not properly released on macOS
  • Bugfix: Fix mouse clicks with modifiers on macOS


  • Bugfix: Keyboard methods pressKey and releaseKey ignore updated autoDelayMs
  • Enhancement: Add mappings for missing numpad keys
  • Enhancement: macOS double click
  • Maintenance: Both mouse.leftClick and mouse.rightClick should reuse click
  • Feature: New image loader to fetch remote images
  • Bugfix: Mouse methods pressButton and releaseButton should respect auto delay


  • Bugfix: Issue with keyboard.type in to Spotlight on MacOS
  • Enhancement: Numpad buttons don't work on Linux


  • Feature: Apple Silicon
  • Enhancement: Enable warning message for missing accessibility permissions on macOS
  • Enhancement: Add runtime typechecks for screen.find etc.
  • Bugfix: Fix Windows scaling issue
  • Maintenance: Refine types
  • Maintenance: Cleanup deprecated code
  • Enhancement: Support for mouse capturing games
  • Feature: Provide functions to convert images between BGR and RGB color mode
  • Feature: Audio keys support
  • Enhancement: Configurable interval for waitFor
  • Bugfix: Apply pixel density scaling on colorAt
  • Enhancement: Change find signature to only work on Image instances
  • Enhancement: Adjust assert class to new Screen#find parameter types
  • Feature: Get screen pixel color
  • Feature: Add Screen#findAll to enable matching multiple template occurrences
  • Enhancement: Make Screen#find accept Promise<Image>
  • Enhancement: Accepting a Buffer with image data for Screen#find
  • Enhancement: Get rid of adapter layer in favour of providerRegistry
  • Feature: Provide a default implementation for ImageReader and ImageWriter
  • Feature: Define interface for mouse movement type
  • Feature: Separate image matching code
  • Enhancement: Export FileType
  • Enhancement: Export ImageWriterParameters
  • Enhancement: Export provider interfaces
  • Feature: Introduce a registry for providers
  • Feature: Add methods to grab the current screen content as Buffer


  • Enhancement: Trigger snapshot releases
  • Feature: Cancel screen.waitFor if needed
  • Enhancement: Move docs into separate repo
  • Feature: Support for node 16 and Electron 13


  • Feature: Create screenshot from region
  • Bugfix: Endless loop in timeout function for long-running actions returning undefined
  • Maintenance: Use default exports for all provider classes
  • Enhancement: imprecise error message if image is too large
  • Bugfix: waitFor does not properly cancel
  • Feature: Enable GitHub Actions
  • Enhancement: Use @nut-tree/libnut@next for snapshot releases
  • Enhancement: Requesting image search outside of screen boundaries fails with runtime error


  • Enhancement: Window support
  • Bugfix: screen.find neglects offsets when providing a search region


  • Maintenance: Refactor locationparameters.class.ts
  • Enhancement: Update npmignore
  • Maintenance: Refactor image-processor.class.ts
  • Enhancement: Update to opencv4nodejs-prebuilt@5.3.0-2
  • Enhancement: Add note about macOS permissions to readme
  • Enhancement: Stabilize drag & drop E2E test
  • Bugfix: Hanging shift key after keyboard input on Windows


  • Bugfix: Electron + Windows problems


  • Enhancement: API docs
  • Enhancement: Improve CI pipeline
  • Enhancement: Rename MouseActionInterface
  • Enhancement: Enhance test stability
  • Enhancement: Config cleanup
  • Enhancement: Improve error message when failing to locate images
  • Enhancement: Support for node 13 and 14
  • Enhancement: Support for Electron
  • Enhancement: Native highlight


  • Enhancement: Revisit mouse speed settings


  • Bugfix: Wrong result size for scaled image search
  • Enhancement: Switch from robotjs to libnut
  • Enhancement: Update to OpenCV4
  • Enhancement: Enable matrix builds


  • Enhancement: Enabled prebuilt bindings for OpenCV


  • Enhancement: Exported Button enum


  • Bugfix: Drag & drop gestures were not working on macOS and Windows
  • Enhancement: mouse Public API now exposes pressButton and releaseButton methods


  • Bugfix: Clipboard copy calls did not resolve


  • Minor version upgrade for OpenCV dependency


  • Feature: nut.js now comes with a precompiled version of OpenCV


  • Bugfix: Check dimensions of ROIs to prevent access violations


  • API overhaul
  • find hooks
  • screen.waitFor
  • Code cleanup


  • Improved error handling on image search


  • Changed default screen.config.resourceDirectory to use process.cwd()


  • Enabled pre-built OpenCV bindings via opencv4nodejs-prebuilt