Skip to main content
Cloud Computers are full virtual machines (Windows or Linux) running on BCTRL infrastructure. Use them for desktop automation, testing native apps, or any task that requires a real OS.

Quick Start

import { bctrl } from '@bctrl/sdk';

// Connect to a Windows desktop
const desktop = await bctrl.desktop.connect({
  os: 'windows',
  apiKey: process.env.BCTRL_API_KEY
});

// Take a screenshot
await desktop.screenshot({ path: 'desktop.png' });

// Use AI to control the desktop
await desktop.cua.run('Open Notepad and type Hello World');

// Or use direct control
await desktop.mouse.click(100, 200);
await desktop.keyboard.type('Hello from BCTRL!');

await desktop.close();

Features

Choose the operating system that fits your needs:
OSVersionUse Cases
WindowsWindows 11Office automation, Windows apps, legacy software
LinuxUbuntu 22.04Development tools, CLI automation, servers
// Windows desktop
const winDesktop = await bctrl.desktop.connect({
  os: 'windows'
});

// Linux desktop
const linuxDesktop = await bctrl.desktop.connect({
  os: 'linux'
});
Complete control over the virtual desktop:
// Mouse control
await desktop.mouse.move(500, 300);
await desktop.mouse.click(500, 300);
await desktop.mouse.doubleClick(500, 300);
await desktop.mouse.rightClick(500, 300);
await desktop.mouse.drag(100, 100, 500, 500);

// Keyboard control
await desktop.keyboard.type('Hello World');
await desktop.keyboard.press('Enter');
await desktop.keyboard.hotkey('ctrl', 'c');  // Copy
await desktop.keyboard.hotkey('ctrl', 'v');  // Paste
await desktop.keyboard.hotkey('alt', 'Tab'); // Switch window

// Screen capture
const screenshot = await desktop.screenshot();
await desktop.screenshot({ path: 'screen.png' });
Use natural language to control the desktop:
// Simple actions
await desktop.cua.run('Open Chrome');
await desktop.cua.run('Click the Start menu');

// Complex multi-step tasks
await desktop.cua.run(`
  1. Open Microsoft Excel
  2. Create a new spreadsheet
  3. Add headers: Name, Email, Phone in the first row
  4. Save the file as contacts.xlsx
`);

// Configure the agent
await desktop.cua.run('Fill out the registration form', {
  maxSteps: 20,
  modelName: 'gpt-4o'
});
Save your desktop state and resume later:
// Create a persistent desktop
const desktop = await bctrl.desktop.connect({
  os: 'windows',
  persistent: true,
  desktopId: 'my-work-desktop'  // Reuse this ID to reconnect
});

// Install software, configure settings...
await desktop.cua.run('Install Visual Studio Code');

// Later, reconnect to the same desktop
const sameDesktop = await bctrl.desktop.connect({
  desktopId: 'my-work-desktop'
});
// VS Code is still installed!

Configuration Options

const desktop = await bctrl.desktop.connect({
  // Required
  apiKey: process.env.BCTRL_API_KEY,

  // Operating system
  os: 'windows',  // 'windows' | 'linux'

  // Display
  screen: {
    width: 1920,
    height: 1080
  },

  // Persistence
  persistent: true,
  desktopId: 'my-desktop-id',

  // Session
  timeoutMinutes: 120  // Default: 60
});

When to Use Cloud Computers

Desktop application automation

Automate native Windows or Linux applications that have no web interface

Native app testing

Test desktop applications across different OS versions and configurations

Tasks requiring real OS

File system operations, multi-app workflows, system-level automation

Browser + desktop workflows

Combine web automation with desktop actions in a single workflow

Combining Browser and Desktop

Cloud Computers can run browsers too, giving you the flexibility to combine web and desktop automation:
import { bctrl } from '@bctrl/sdk';

const desktop = await bctrl.desktop.connect({
  os: 'windows'
});

// Use AI to open a browser and navigate
await desktop.cua.run('Open Chrome and go to google.com');

// Download a file
await desktop.cua.run('Search for "quarterly report template" and download the first PDF');

// Open the downloaded file in a desktop app
await desktop.cua.run('Open the downloaded PDF in Adobe Reader');

// Take a screenshot of the result
await desktop.screenshot({ path: 'report.png' });

await desktop.close();

Full Example

import { bctrl } from '@bctrl/sdk';

async function automateExcelReport() {
  const desktop = await bctrl.desktop.connect({
    os: 'windows',
    apiKey: process.env.BCTRL_API_KEY
  });

  try {
    // Open Excel
    await desktop.cua.run('Open Microsoft Excel');

    // Wait for Excel to load
    await desktop.cua.run('Wait for Excel to fully load');

    // Create a new workbook with data
    await desktop.cua.run(`
      Create a new workbook and add the following data:
      Row 1: Product, Q1, Q2, Q3, Q4
      Row 2: Widget A, 100, 150, 200, 250
      Row 3: Widget B, 80, 120, 160, 200
      Row 4: Widget C, 50, 75, 100, 125
    `);

    // Create a chart
    await desktop.cua.run('Select all the data and create a bar chart');

    // Save the file
    await desktop.cua.run('Save the workbook as quarterly_report.xlsx');

    // Take a screenshot of the result
    await desktop.screenshot({ path: 'excel_report.png' });

    console.log('Report created successfully!');
  } finally {
    await desktop.close();
  }
}

automateExcelReport();