Computer use for Node.js

Automify

One API for AI computer use.

Browser, CLI, Docker CLI, local desktop, and Docker 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.5"
  }
});

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
# Ubuntu 26.04 only, if Playwright blocks Chromium install
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64 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
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. On macOS and Windows, use the official Docker Desktop downloads: Mac or Windows. On Ubuntu, run the terminal commands shown in Step 4. Use `docker.io`, not the `docker` package; `docker.io` provides the Docker Engine/runtime and CLI. Log out and back in after `sudo usermod -aG docker $USER` to use Docker without `sudo`.

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

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.5"
  }
});

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.5"
  }
});

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.