npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mooncat-computeruser

v0.6.0

Published

JavaScript computer-use SDK backed by a native Rust input service

Readme

mooncat-computeruser

JavaScript desktop automation SDK backed by a small Rust process. The native process uses enigo for operating-system mouse and keyboard input; the JavaScript client communicates with it through newline-delimited JSON over stdin/stdout.

The 0.1.x MVP package targets Windows x64.

Build and test

npm run native:build
npm test
npm run test:e2e -- --dry-run
npm run test:e2e

The normal smoke test visibly moves the pointer along a small rectangle and restores its original position. It does not click unless --click is supplied.

JavaScript API

import { ComputerUserClient } from "mooncat-computeruser";

const computer = await ComputerUserClient.start();

try {
  await computer.mouse.moveTo(600, 400, { durationMs: 500 });
  await computer.mouse.click("left");
  await computer.mouse.scroll(3);
  await computer.keyboard.typeText("Hello from mooncat");
  await computer.keyboard.hotkey(["control", "a"]);
  await computer.keyboard.press("backspace");
  await computer.screen.capture({ path: "C:\\temp\\desktop.png" });
} finally {
  await computer.close();
}

This is OS-level injected input. It moves the visible pointer, but it is not USB HID hardware input and does not bypass operating-system security boundaries such as the Windows UAC secure desktop.

Windows foreground windows

The SDK exposes operating-system window facts without application-specific matching rules:

const windows = await computer.window.list();
const target = windows.find((window) => /notepad\.exe$/i.test(window.executablePath ?? ""));
if (!target) throw new Error("Notepad window not found");

const activated = await computer.window.activate({
  windowHandle: target.windowHandle,
  timeoutMs: 5_000,
});
await computer.window.maximize({ windowHandle: target.windowHandle });

window.list() reports top-level window handles, process IDs, titles, class names, executable paths when accessible, and visibility/minimized state. window.activate() accepts either a windowHandle or the legacy processId; handle-based activation is preferred when an application owns multiple processes or windows. Activation restores minimized/hidden windows and succeeds only after Windows reports the exact target handle as the foreground window. window.maximize() changes only the supplied top-level window and verifies that Windows reports it as maximized. screen.capture() writes a PNG for the primary display, or for an explicitly supplied pixel rectangle. Keyboard press, down, up, and hotkey methods inject normal operating-system input without application-specific shortcuts.

window.waitForAttention() waits for Windows to report that a target window or process requested taskbar attention, such as an application icon beginning to flash. It returns on the first matching event or when the timeout expires. A long-lived watcher should use a dedicated client because this call intentionally occupies its native process while waiting.

const event = await computer.window.waitForAttention({
  processId: target.processId,
  timeoutMs: 30_000,
});
if (event.attentionRequested) console.log("application requested attention", event);

OCR

mooncat-computeruser owns and ships its OCR runtime and pinned PP-OCRv5 mobile model assets. Consumers do not install OCR dependencies or download models at runtime.

const result = await computer.screen.recognizeTextOcr({
  x: 300,
  y: 35,
  width: 600,
  height: 45,
});
console.log(result.text, result.confidence);

Maintainers prepare and verify the model assets with npm run ocr:prepare and npm run ocr:check. Both model archives are integrity-pinned before publication.