Mouse Control
Precise mouse movements, clicks, drags, and scrolling with configurable speed and easing functions.
The powerful, intuitive library for desktop automation, E2E testing, and building intelligent desktop agents. Control mouse, keyboard, and screen across Windows, macOS, and Linux.
import {
mouse, Button, keyboard, straightTo, centerOf, getActiveWindow
} from "@nut-tree/nut-js";
import { useElementInspector } from "@nut-tree/element-inspector";
import { elements } from "@nut-tree/element-inspector/win";
useElementInspector();
// Get the active window
const window = await getActiveWindow();
// Find a button by its label and click it
const submitBtn = await window.find(
elements.button({ title: "Submit" })
);
await mouse.move(straightTo(centerOf(submitBtn.region)));
await mouse.click(Button.LEFT);
// Type text with natural speed
await keyboard.type("Hello, nut.js!");Trusted by developers and teams worldwide working on
nut.js provides a comprehensive toolkit for controlling desktop applications programmatically with an intuitive, promise-based API.
Precise mouse movements, clicks, drags, and scrolling with configurable speed and easing functions.
Type text, press key combinations, and simulate any keyboard interaction with ease.
Find elements by image, text, color, or UI structure. Locate buttons, inputs, and controls directly.
Capture screenshots, specific regions, or read screen content programmatically.
Find, focus, resize, and manage application windows across your desktop.
Optimized native bindings deliver high performance for demanding automation tasks.
From testing to automation to AI agents, nut.js adapts to your needs.
Test desktop applications with the same ease as web apps. Validate UI states, automate user flows, and catch bugs before your users do.
Eliminate repetitive tasks. Automate data entry, file management, application workflows, and everything in between.
Build intelligent agents that interact with desktop applications. Perfect for AI-powered assistants and autonomous workflows.
Automate QA for game development. Run E2E tests, catch visual regressions, and script complex gameplay scenarios across platforms.
Get started in minutes with an intuitive, promise-based interface.
import {
mouse, Button, keyboard, straightTo, centerOf, getActiveWindow
} from "@nut-tree/nut-js";
import { useElementInspector } from "@nut-tree/element-inspector";
import { elements } from "@nut-tree/element-inspector/win";
useElementInspector();
describe("Login Flow - UI Elements", () => {
it("should login successfully", async () => {
const window = await getActiveWindow();
// Find login button by UI element
const loginBtn = await window.find(
elements.button({ title: "Sign In" })
);
await mouse.move(straightTo(centerOf(loginBtn.region)));
await mouse.click(Button.LEFT);
// Find input field and enter credentials
const emailField = await window.find(
elements.textInput({ id: "email" })
);
await mouse.move(straightTo(centerOf(emailField.region)));
await mouse.click(Button.LEFT);
await keyboard.type("user@test.com");
});
});import {
screen, mouse, Button, straightTo
} from "@nut-tree/nut-js";
async function executeAction(action: Action) {
// Capture current screen state
const screenshot = await screen.capture();
// Let AI analyze the screen
const target = await analyzeWithLLM(
screenshot, action.description
);
await mouse.move(straightTo(target.coordinates));
await mouse.click(Button.LEFT);
}Choose the plan that fits your needs. All plans include prebuilt packages with zero setup hassle.
Essential desktop automation
$20/month
or $220/year(1 month free)
Full power for professionals
$75/month
or $825/year(1 month free)
For teams and enterprises
Custom
Volume discounts
All prices include VAT where applicable. Prices shown are representative for Germany and may vary by country.
View full pricing details ยท Looking for the open-source version? Check out GitHub
"nut.js provides a wide range of desktop automation, including mouse manipulation, keyboard input, and screen recognition. Thanks to its high-quality support, we had no concerns."
"nut.js is an impressive library for desktop automation. Its user-friendly API and professional collaboration make integration seamless, helping us achieve new levels."
"@Simon I applied all your recommendations and now the whole test application is way more robust and performant."
"Man, honestly, it's such a nice project! I actually tried it already in a Mac, a Linux and a Windows machine and for all of them ๐"
"Thank you for your hard work! I use it a lot."
"Are you kidding, this is the real deal. Keep it up!"
"Hey Simon, just joined to say nut.js is awesome, thanks for making it! ๐"
"I can't wait to find a good idea to give this a shot. It looks super clean."
"Very nice! Kind of like webdriver but for the desktop ๐"
"Works perfect, and x100 times faster than robotjs! Great job!"
"Great plugin btw. Leaves robotjs in the dust."
"I've been using nut.js since end of 2021, and it's one of the most amazing tools I've ever used."
"Kudos to nut js!! Such a nice library @s1hofmann"
With almost a decade of experience in desktop automation, I've helped companies tackle their most challenging automation and testing scenarios. From legacy applications to cutting-edge AI agentsโI've seen it all.
Desktop Automation Expert
Creator of nut.js, the #1 Node.js desktop automation framework. I've spent years building tools and solutions for desktop automation challenges that others thought were impossible.
Start automating your desktop in minutes. No build tools needed, no complex setupโjust purchase a license and go.