Write a Node.js script that automates repetitive clicking or text entry in a desktop application.
Build a cross-platform macro tool that moves the mouse, presses keyboard shortcuts, and reacts based on a pixel color on screen.
Automate GUI interactions for a desktop app from JavaScript without needing a browser-based testing tool.
Pre-built binaries cover common platforms, building from source on Linux requires Python, make, and X11 development headers.
RobotJS is a Node.js library that lets you control a computer's mouse and keyboard programmatically, and read pixel colors from the screen. If you want to write a script that moves the mouse, types text, clicks buttons, or reads what color is at a certain point on the screen, RobotJS gives you functions to do all of that from JavaScript code. It works on Mac, Windows, and Linux. The creator built it as a Mac-compatible replacement for AutoHotkey, a popular Windows-only automation tool. AutoHotkey lets power users script repetitive tasks and automate applications that do not have their own scripting support. RobotJS brings similar capabilities to JavaScript developers who want to write automation scripts in Node.js instead of a Windows-specific language. Installing it is a single npm command, and pre-built binaries are provided for common operating systems, so you typically do not need to compile anything yourself. If you do need to build from source, the README lists the platform-specific dependencies for Windows, Mac, and Linux. The library's core is written in C and hooks into each operating system's native input APIs. The mouse and keyboard modules are described as fully complete. The screen module, which lets you read pixel colors from anywhere on your display, is mostly done. A bitmap module for saving screenshots has not yet been built. Global hotkeys are not supported, and multi-monitor support is limited. This project pre-dates version 1.0, so the API could still change. The README notes it is a work in progress and the exported functions are not yet considered stable. It is released under the MIT license.
← octalmage on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.