---
title: Install webrain
description: The machine-readable install path for webrain. One command per platform, a verification step with a real exit code, and the first tool call. Written to be pasted into an AI agent.
---

This page is the install contract for AI agents: whatever reads it has the commands, the
success criterion, and the first call. It is served as plain Markdown at
[webrayn.dev/install.md](https://webrayn.dev/install.md), and the site index for models is
[webrayn.dev/llms.txt](https://webrayn.dev/llms.txt).

## What webrain is

One Rust binary that gives an AI agent a browser. It speaks MCP to any client, or runs
the same 19-tool surface from a shell. It drives Chrome, Lightpanda and Obscura over CDP,
or skips the browser entirely for static pages. No Node, Python or Docker in the path.

## Install

macOS and Linux:

```bash
curl -fsSL https://raw.githubusercontent.com/prokopis3/webrain/main/scripts/install.sh | bash
```

Windows PowerShell:

```powershell
irm https://raw.githubusercontent.com/prokopis3/webrain/main/scripts/install.ps1 | iex
```

Homebrew and Scoop:

```bash
brew tap prokopis3/webrain
brew install webrain
```

```powershell
scoop bucket add webrain https://github.com/prokopis3/scoop-webrain
scoop install webrain
```

## Verify

```bash
webrain doctor
```

Exit `0` means healthy, `2` means broken, and the report covers engines, CDP ports, the
MCP server and the vault. Run `webrain install` once if no engine is reported: that
downloads Chrome for Testing into the engine cache.

## Connect a client

stdio is the default and needs no port:

```json
{
  "mcpServers": {
    "webrain": { "command": "webrain", "args": ["mcp"] }
  }
}
```

HTTP, for clients that want an endpoint:

```bash
webrain mcp --http 9223
# endpoint: http://127.0.0.1:9223/mcp
```

## First call, no client needed

```bash
webrain tool                                              # list the 19 tools
webrain tool webrain_navigate '{"url":"https://example.com"}'
webrain tool webrain_extract '{"mode":"autoschema"}'
```

`tool` takes the tool name plus the tool's own JSON arguments, so it cannot drift from
the MCP surface. `--url` navigates before the call when a tool needs a page.

## What it can do

| Task | Tool |
|---|---|
| Navigate, observe, click, type, scroll | `webrain_navigate`, `webrain_observe`, `webrain_interact` |
| Structured extraction with no hand-written selectors | `webrain_extract` (`autoschema`, `schema`, `regex`, `table`, `jsonld`, `bm25`) |
| Many URLs at once | `webrain_batch` |
| Whole-site crawl with robots, pacing, retries, checkpoints | `webrain_crawl` |
| Typed SERP JSON | `webrain_serp` |
| PDFs, video transcripts, downloads | `webrain_pdf`, `webrain_watch`, `webrain_download` |
| Logged-in sites: profiles, cookies, vault, sessions | `webrain_session` |
| Run the agent loop with your own model key | `webrain chat` |

Capability follows the engine: Chrome handles rendering and interactive challenges,
Obscura is the fast engine for pages that need neither, Lightpanda is the lightest path,
and HTTP needs no browser at all. Whether a protected page opens depends on the site,
the engine and the session, so treat it as a workflow, not a guarantee.

## Read next

- [Quickstart](https://docs.webrayn.dev/quickstart) for the full walkthrough with a client
- [Agent Decision Guide](https://docs.webrayn.dev/guides/agent-decision-guide) for task to tool mapping
- [Tools Reference](https://docs.webrayn.dev/reference/tools) for every argument
