Back to work
~/work/kimetra

saad@kimetra:cat README.md

Kimetra

Keyboard and mouse automation for Node.js. It calls the OS input APIs (SendInput, CGEvent, uinput) from a prebuilt native addon, so npm install compiles nothing and adds 188 KB.

npm i kimetra Install188 KB Installed0.9 ms Timing errorWindows, macOS, Linux Platformsv2.2.0 Latest

saad@kimetra:open https://www.npmjs.com/package/kimetra

saad@kimetra:# background

The libraries I had used built a native addon during npm install, so every machine needed Python 3 and a C++ toolchain, and each OS had its own quirk: elevated windows on Windows, the Accessibility grant on macOS, /dev/uinput permissions on Linux. Kimetra ships prebuilt, and where a grant is missing it throws with the setup steps.

saad@kimetra:# how it works

A sequence compiles into one buffer and runs as one native call, so no JavaScript runs between events. Each wait sleeps on the OS timer until 1.2 ms before its deadline, then spins; that is where the 0.9 ms timing error comes from. GitHub Actions builds six binaries with npm provenance, and post-install deletes the five your machine cannot use.

saad@kimetra:# benchmarks

saad@kimetra:npm run bench -- --input

Timing error

How far each event landed from its planned time, across typing, a game macro and a mouse workflow · lower is better

Windows 11, Node 22, Chrome 152. Real input to a browser page that timestamps each event; every run checked for correctness. Medians of 3 runs, 2026-10-14.Full results and method

One native call per sequence is where the gap comes from. Called one action at a time with setTimeout waits, Kimetra performs like robotjs.

saad@kimetra:# what it covers

Keys, hotkeys, text, holds and repeats; since 2.2 also mouse moves, timed glides (a point every 4 ms), clicks, drags and scroll, all mixable in one batch. The kimetra command chains the same actions on one line, and --dry-run prints JSON that Kimacro can replay.

saad@kimetra:# what it does not do

Every call blocks the event loop, so long pauses belong in JavaScript. On Linux there is no absolute mouse move yet and typed text is US ASCII. Node 16 or newer on six targets; no linux-arm64 or Alpine. nut.js also does screen capture, image search and window management. Kimetra only sends input, which is the trade for its size and timing.

saad@kimetra:npm i kimetra