robotjs VS nut.js

Compare robotjs vs nut.js and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
robotjs nut.js
17 5
12,102 2,032
- 5.7%
0.0 8.1
about 1 month ago 3 days ago
C TypeScript
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

robotjs

Posts with mentions or reviews of robotjs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-10.
  • Painless CLI integration testing
    7 projects | dev.to | 10 Jan 2024
    If we talk about the first approach, the following approaches will be useful: Nodejs Child Process: write to stdin from an already initialised process, RobotJS. It makes sense to note here that the approaches above are rather for e2e testing than integration.
  • RobotJs: The Only Node.js First Desktop Automation Library
    1 project | news.ycombinator.com | 18 May 2023
  • What language next?
    1 project | /r/learnprogramming | 23 Jan 2023
    If you want to interact with the OS, and move the mouse, you'll likely want to write JS that targets the NodeJS platform. With a quick google search I found RobotJS which you can use with Node to automate the mouse (amongst other things). If it's a browser you want to automate, look into selenium-webdriver.
  • I recently released nut.js v3.0.0, a Node.js desktop automation framework, in line with a brand new OCR plugin and improved image search
    3 projects | /r/node | 22 Jan 2023
    Then there’s obviously https://github.com/robot/robot-js and https://github.com/octalmage/robotjs, but both of these frameworks are abandoned.
  • How are custom Iterables useful in JS? What are some common usecases of thing that can't be done easier any other way?
    1 project | /r/learnjavascript | 26 Oct 2022
    That said, you're in luck as I can give you a specific use case from the library I'm working on. It's a desktop automation library (something like RobotJS or Nut.js). I won't use the exact code, but a simplified version as an example.
  • Engaging and interesting decks are getting obscenely expensive
    1 project | /r/hearthstone | 12 Aug 2022
    So what u need to do is go to a mercs bounty and afk inside it for 29 mins, then finish the fight by beating it and repeat. U will get more than 400 xp per hour with 20% boost (i think around 430? smth like that). If u go over 30 mins in the fight, u will get 0 xp so don't. Put the script on a loop and leave ur pc overnight, set hs fps to like 5 or smth from the config file (targetframerate), so ur pc uses little resources (the more gpu/cpu used the more wattage the higher the electricity bill, tho obviously it's still very worth it but the less the bill is the better). Level 100 to 400 is 300 * 1500 xp = 450 000 xp. With 10 hrs of ur pc working during the night, that is let's say 4100 xp per day, so it will take u 110 days to get from level 100 to 400. If u have work, leaving the pc on for let's say 16 hours a day (8 while u sleep and 8 while u work) will get u 7560 xp per day, getting u from 100 to level 400 in just 60 days (2 months). Make sure ur cpu gpu etc. are put on power-saving mode and turn off ur monitor (preferably even disconnect it from the power cable). Now for the script u wanna use, based on this https://thenewstack.io/which-programming-languages-use-the-least-electricity/ the best one would be C, personally i use Javascript because it's what i know and it's very easy to write and it's still 4.45 which is not that far from 1, considering it's just very simple mouse movement and a for loop and not some complex algorithm problems like in the article, it won't make much of a difference anyway, tho it might if u use python since 75.88 is a lot. So to do it with JS, u can use Node js with Robot js https://github.com/octalmage/robotjs
  • What's the alternative of Authotkey ?
    5 projects | /r/linuxmint | 1 Aug 2022
    Autohotkey is also a scripting language. If you want parity there, there's robotJS, pynput, and xdotool (though this one won't work on some future version of mint when a piece of tech it relies on gets upgraded).
  • Need help with a simple macro program
    1 project | /r/learnjavascript | 10 Mar 2022
  • I built some custom macro buttons using an Arduino Micro
    2 projects | /r/arduino | 31 Oct 2021
    I use the Johnny-Five JS library to connect to the board http://johnny-five.io/ and use RobotJS https://www.npmjs.com/package/robotjs to map the buttons on the board to keyboard buttons. Currently I just have it set up to map to audio buttons so I can prev/next/pause/play Spotify/Youtube or turn the OS volume up.
  • Automation ideas with Javascript:
    2 projects | /r/learnjavascript | 28 Oct 2021

nut.js

Posts with mentions or reviews of nut.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-18.
  • I'm giving up on open source
    1 project | news.ycombinator.com | 23 Apr 2024
    The number of Dislikes on that GitHub issue that the OP mentioned in the post has gone from 36 to the moon! https://github.com/nut-tree/nut.js/issues/577
  • I built a bot that plays HayDay using Node and many, many AutoHotKey scripts
    2 projects | /r/node | 18 Feb 2023
    Nut.js is great for this kind of thing, you could probably drop ahk with it
  • Is there a way to press key programmatically in node without using a 3rd party like robot.js ?
    1 project | /r/node | 18 Aug 2022
    You could try nut.js. I am not sure if it includes any other dependencies, though.
  • The unexpected return of JavaScript for Automation
    5 projects | news.ycombinator.com | 26 Nov 2021
    One really cool little JS library I've been using for a bunch of desktop automation tasks lately is nut.js and the lower level libnut library it's implemented on top of:

    https://github.com/nut-tree/nut.js

    https://github.com/nut-tree/libnut

    It provides a means to send user input (mouse movement/clicks and key presses) and read and react to changes in visual state (through screenshots), and works across Windows, Linux and MacOS. It automates at a much lower level of abstraction than the approaches mentioned in the article that script against programmatic APIs.

    What I really like about this lower level approach is that you don't need to get anyone's permission to automate anything, since there's no programmatic API that the system owners has to provide for you and thus can limit or take away when it becomes inconvenient.

    Any task that can be accomplished though looking at stuff on the screen and clicking the mouse and pressing keys on a keyboard (i.e. what a real person would do to accomplish the same task) can be automated, and it's actually surprisingly easy and effective to do this with nut.js. What really helps is that OpenCV has become ridiculously good and ridiculously fast at matching/identifying objects from a screenshot, with latencies usually in the low double digits, so latency-based flakiness isn't nearly as much of an issue as I remember it in the old days. I've also played around with OCR with tesseract but haven't had as much success with it in terms of perf, and remember seeing latencies of several seconds for even recognizing a single word from a tiny pre-cropped screenshot containing only the word itself.

    The main tradeoff to this approach compared to automation through APIs is that because it works by simulating real user inputs, it's not very amenable to running in the background while a user is actively interacting with the same machine, so a separate machine or VM is often needed. That's an acceptable tradeoff for some use cases but complete deal breaker for others, so YMMV, but just wanted to bring this cool little tool to people's attention.

  • An actively maintained alternative to robotjs
    1 project | /r/node | 7 Sep 2021

What are some alternatives?

When comparing robotjs and nut.js you can also consider the following projects:

n8n - Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.

solidarity - Solidarity is an environment checker for project dependencies across multiple machines.

AutoKey - AutoKey, a desktop automation utility for Linux and X11.

libnut - An Node-API addon for desktop automation

Automagica - AI-powered Smart Robotic Process Automation 🤖

node-jxa - Use your favorite node.js modules (and JS editor) for your Javascript OSX automation scripts

android-touch-record-replay - How to record and replay touchscreen events on an Android device.

dogu - Seamless Unified Test Automation Platform

flixel - Free, cross-platform 2D game engine powered by Haxe and OpenFL

Jugglr - Jugglr is a test data management tool that enables reliable testing with a Docker containerized database