Blog

3 Lines to Skip the Browser

Unbrowse v2.12.0 ships a first-party TypeScript SDK. If you're building on top of the local Unbrowse runtime, you no longer need to shell out to the CLI - just import, resolve, and execute.

Lewis Tham
April 5, 2026

3 Lines to Skip the Browser

Unbrowse v2.12.0 ships a first-party TypeScript SDK. If you're building on top of the local Unbrowse runtime, you no longer need to shell out to the CLI - just import, resolve, and execute.

Published 2026-04-05

Install

npm install @unbrowse/sdk

Basic usage

import { Unbrowse } from "@unbrowse/sdk";

const ub = new Unbrowse();

const plan = await ub.resolve("Find the pricing tier that includes SSO on linear.app");
console.log(plan.steps);

That's it. Three lines to skip the browser.

Resolve, then execute

Most workflows are a two-step loop: figure out what to do, then do it.

import { Unbrowse } from "@unbrowse/sdk";

const ub = new Unbrowse();

const plan = await ub.resolve(
  "Get the latest commit message from github.com/unbrowse-ai/unbrowse"
);

const result = await ub.execute(plan);

console.log(result.output);

No Puppeteer. No Playwright. No headless Chrome. The local runtime handles rendering, extraction, and interaction under the hood.

API surface

The SDK covers the same local API the CLI uses:

  • ub.resolve(task) - Turn a natural-language task into a structured plan
  • ub.execute(plan) - Run a plan and return structured output
  • ub.search(query) - Semantic search across previously browsed content
  • ub.auth(domain) - Manage auth sessions for gated sites
  • ub.feedback(runId, signal) - Send pass/fail signal back to improve future runs
  • ub.stats() - Pull usage and performance metrics
  • ub.health() - Check that the local runtime is up

All methods return typed responses. All are async. The SDK talks to localhost - your data never leaves your machine.

When to use what

SDK - You're writing a TypeScript app or agent that needs to browse programmatically. You want typed returns, proper error handling, and no child process overhead.

CLI - You're in a terminal, a shell script, or a CI pipeline. Pipe-friendly, zero setup.

MCP - You're connecting Unbrowse to an AI assistant (Claude, Cursor, etc.) as a tool. The MCP server wraps the same local API and exposes it over the model context protocol.

All three hit the same runtime. Pick the interface that fits your call site.