Computer use for Node.js

Automify

One API for AI computer use.

Browser, CLI, Docker CLI, QEMU virtual CLI, local desktop, Docker desktop, and QEMU virtual desktop, with shared data and files.

browser.js
import { initAutomify, jsonOutput } from "automify";

const automify = initAutomify({
  provider: {
    type: "openai",
    apiKey: process.env.OPENAI_API_KEY,
    model: "gpt-5.6-sol"
  }
});

const browser = await automify.browser({ startUrl: "https://aldovincenti.github.io/automify/demo.html" });

try {
  const run = await browser.do("Add this person and return the saved record.", {
    data: { firstName: "Ada", lastName: "Lovelace" },
    output: jsonOutput("person_record", { id: "string", firstName: "string", lastName: "string" })
  });

  console.log(run.parsed); // { id: "8f14e45f-ceea-4b2d-91e7-7c7d5f6a2c9b", firstName: "Ada", lastName: "Lovelace" }
} catch (error) {
  console.error("Automation failed:", error);
  process.exitCode = 1;
} finally {
  await browser.close();
}
Step 1 Install Automify
npm
> npm install automify
Step 2 Linux desktop prerequisites Optional
OS packages
# Only for optional local desktop support
sudo apt-get update
sudo apt-get install -y git build-essential cmake pkg-config libx11-dev libxtst-dev libpng++-dev
Step 3 Install local desktop adapter Optional
Desktop adapter
> npx automify-install-desktop
# Rebuild an already-compatible desktop runtime
npx automify-install-desktop --force
Step 4 Install Docker Optional
Ubuntu Docker
# Only for optional Docker CLI and Docker desktop support
sudo apt-get update
sudo apt-get install -y docker.io
sudo systemctl enable --now docker
sudo docker run hello-world
sudo usermod -aG docker $USER
Step 5 Install QEMU Optional
QEMU VM adapter
# Only for optional QEMU virtual CLI and virtual desktop support
# Linux: sudo apt-get install -y qemu-system qemu-utils
# macOS: brew install qemu
# Windows: install QEMU from https://www.qemu.org/download/

# Pre-warm the minimal QEMU CLI cache.
npx automify-qemu-image

# Pre-warm a QEMU CLI cache for examples that need Node.js in the VM.
npx automify-qemu-image --package coreutils --package nodejs

# Use a larger timeout on slow hardware or slow package mirrors.
npx automify-qemu-image --package nodejs --timeout-ms 1200000

# Pre-warm the QEMU desktop cache with Xvfb/openbox/xterm/xdotool/scrot.
npx automify-qemu-image --desktop

# Pre-warm an alternate qcow2 URL into its own cache.
npx automify-qemu-image --image-url https://example.com/path/linux.qcow2 --cache-dir ~/.cache/automify/qemu-custom

# Pass image or vm.image only to use a custom VM disk.
Node.js 20.12.2+ Base install needs no OS packages beyond Node.js. Chromium installs automatically.

Steps 2 and 3 are only for optional local desktop support. On Linux, install the full package list first; the desktop installer does not verify every native library. Linux local desktop requires X11/Xorg or Xvfb; Wayland is not supported. On Ubuntu, switch to an Xorg session before using local desktop if the current session is Wayland. Ubuntu 26.04 may also need the Playwright platform override shown in Step 1 until native support lands. Step 4 is only for Docker CLI and Docker desktop support. Step 5 is only for QEMU virtual CLI and virtual desktop support.

BrowserControl a live browser.
CLIRun approved commands.
Docker CLIRun commands in a running Docker daemon.
Virtual CLIRun commands in a QEMU VM.
DesktopControl native apps. Linux needs X11/Xorg or Xvfb, not Wayland.
Docker desktopLaunch Linux sandboxes with running Docker.
Virtual desktopLaunch a Linux desktop in QEMU.

Examples

Choose the adapter. Keep the call.

import { initAutomify, jsonOutput } from "automify";

const automify = initAutomify({
  provider: {
    type: "openai",
    apiKey: process.env.OPENAI_API_KEY,
    model: "gpt-5.6-sol"
  }
});

const browser = await automify.browser({
  startUrl: "https://aldovincenti.github.io/automify/demo.html"
});

try {
  const run = await browser.do("Add this person and return the saved record.", {
    data: { firstName: "Ada", lastName: "Lovelace" },
    output: jsonOutput("person_record", {
      id: "string",
      firstName: "string",
      lastName: "string"
    })
  });

  console.log(run.parsed);
} catch (error) {
  console.error("Automation failed:", error);
  process.exitCode = 1;
} finally {
  await browser.close();
}

Browser

Control a real browser and return structured data.

Example response
{
  id: "35602f61-8430-4426-81fc-2a31fd69d8b7",
  firstName: "Ada",
  lastName: "Lovelace"
}

Providers

Choose a provider. Keep the API.

OpenAI

const automify = initAutomify({
  provider: {
    type: "openai",
    apiKey: process.env.OPENAI_API_KEY,
    model: "gpt-5.6-sol"
  }
});

Anthropic

const automify = initAutomify({
  provider: {
    type: "anthropic",
    apiKey: process.env.ANTHROPIC_API_KEY,
    model: "claude-sonnet-4-20250514"
  }
});

Documentation

Practical docs for setup, providers, output, adapters, audit trails, and logs.