> ## Documentation Index
> Fetch the complete documentation index at: https://vetta.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# vetta browser

> Drive a computer's browser from the terminal, and manage the saved logins that outlive a session.

Two spellings, one surface. `vetta computer browser <id> <verb>` drives the browser on a
[computer](/docs/cli/computer); `vetta browser …` holds what outlives the session — saved logins and who
may reopen them. Options, guards and lifetime: the [Browser](/docs/computer/browser) guide.

## Commands

| Command                                              | Description                                                  |
| ---------------------------------------------------- | ------------------------------------------------------------ |
| `vetta computer browser <id> goto <url>`             | Navigate.                                                    |
| `vetta computer browser <id> click <selector>`       | Click a CSS selector.                                        |
| `vetta computer browser <id> type <selector> <text>` | Type into a CSS selector. Credential-shaped text is refused. |
| `vetta computer browser <id> act <instruction>`      | Do something described in words; `--var k=v` fills `%k%`.    |
| `vetta computer browser <id> extract [instruction]`  | Read the page, a selector, or data shaped to `--schema`.     |
| `vetta computer browser <id> observe <instruction>`  | List the elements that match a description.                  |
| `vetta computer browser <id> links`                  | List the page's links.                                       |
| `vetta computer browser <id> screenshot`             | Capture a PNG; prints the `fil_` id.                         |
| `vetta computer browser <id> status`                 | The open session, or `not_found`.                            |
| `vetta computer browser <id> close`                  | Close the session. Idempotent.                               |
| `vetta computer browser <id> save-context`           | Save the open session's login under a name.                  |
| `vetta browser login <id>`                           | Sign in from the identity's saved credential.                |
| `vetta browser signup <id>`                          | Register with a generated password and save it.              |
| `vetta browser credential save`                      | Seal a login credential into an identity's vault.            |
| `vetta browser context grant <name>`                 | Let an agent or role reopen a saved login.                   |
| `vetta browser context revoke <name>`                | Delete a saved login and its grants.                         |

## Attach a browser

`vetta computer create` takes the full option object; `--browser` attaches one on the open web and `--allowed-domains` attaches and scopes it.

```bash theme={"system"}
vetta computer create --name box --allowed-domains "app.example.com,*.example.com" \
  --timeout-minutes 20 --region eu-central --allow-writes --viewport 1280x720
```

| Flag                                                  | Description                                                                           |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `--allowed-domains`                                   | Comma-separated domains, or `*`. Optional — the open web by default.                  |
| `--timeout-minutes`                                   | 1–360, default 15.                                                                    |
| `--region`                                            | `us-west` (default), `us-east`, `eu-central`, `ap-southeast`.                         |
| `--viewport`                                          | `<width>x<height>` in pixels.                                                         |
| `--os`                                                | `windows`, `mac`, `linux`, `mobile`, `tablet`.                                        |
| `--keep-alive`, `--block-ads`, `--stealth`, `--proxy` | Switches; all default off. `--proxy` needs a bounded allow-list, not `*`.             |
| `--no-solve-captchas`                                 | CAPTCHA solving is on by default; this turns it off.                                  |
| `--allow-writes`                                      | Permit write-looking `act`, `click` and `type`.                                       |
| `--allow-extract`                                     | Permit `extract`, `observe` and `screenshot` on a reopened saved login.               |
| `--context-name`                                      | Reopen a saved login by name. Needs a grant.                                          |
| `--persist-context`                                   | Write cookies back to `--context-name` at close.                                      |
| `--human-login`                                       | Start a human-first login; holds the saved login for 15 minutes until `save-context`. |

## Drive it

```bash theme={"system"}
vetta computer browser cmp_01H... goto https://app.example.com/
vetta computer browser cmp_01H... act "search for %term%" --var term=vetta
vetta computer browser cmp_01H... extract "the product names and prices" --schema '{"type":"object"}'
vetta computer browser cmp_01H... extract --selector "table.prices"
vetta computer browser cmp_01H... links --contains docs --limit 20
vetta computer browser cmp_01H... screenshot
vetta computer browser cmp_01H... close
```

Every verb prints one `browser_action` (JSON by default, `--human` for a table). `--var` repeats;
its values are sent once and never appear in the result. `extract` takes `--selector` and
`--schema` (a JSON object); `links` takes `--contains` and `--limit`.

## Saved logins

Save a credential first — the password comes from **stdin**, so it is never in your shell history
or the process list. `--password` exists for CI.

```bash theme={"system"}
printf '%s' "$FIGMA_PASSWORD" | vetta browser credential save \
  --identity idn_01H... --service figma.com --email ada@example.com
```

Then sign in on a computer, save the login, and grant it:

```bash theme={"system"}
vetta browser login cmp_01H... --service figma.com --url https://figma.com/login --identity idn_01H...
vetta computer browser cmp_01H... save-context --name figma --identity idn_01H... --service figma.com
vetta browser context grant figma --identity idn_01H... --agent agt_01H...
vetta browser context grant figma --identity idn_01H... --role member
vetta browser context revoke figma --identity idn_01H...
```

`grant` takes exactly one of `--agent <agt_…>` or `--role <owner|admin|member>`. `grant` and
`revoke` answer a signed-in dashboard session only; with an API key they exit with `forbidden`.

`signup` registers a new account with a generated password and seals it into the identity's vault:

```bash theme={"system"}
vetta browser signup cmp_01H... --service figma.com --url https://figma.com/signup \
  --identity idn_01H... --email ada@example.com
```
