# CLI — web

> For the complete documentation index, see [llms.txt](/llms.txt)

The `unotest-web` CLI. Run any command with `npx @unotest/web <command>` — works with npm, pnpm, yarn or bun.

## `init`

Bootstrap the unotest/ layout, config, and MCP wiring for your editor. Re-run anytime — it never overwrites your edits.

```sh
npx @unotest/web init [target] [--browser system|bundled|none]
```

- `--browser` — Skip the interactive browser prompt: use system Chrome/Edge, bundled Chromium, or none.

**Example**

```sh
npx @unotest/web init --browser system
```

## `e2e`

Run a single scenario. `name` resolves to `unotest/e2e/<name>.js`.

```sh
npx @unotest/web e2e <name> [--debug] [--break line:col]
```

- `--debug` — Pause on breakpoints (.debugger.json) and on failure.
- `--break line:col[,line:col]` — Override breakpoints (comma-separated, no spaces).

**Example**

```sh
npx @unotest/web e2e auth/login --debug
```

## `collection`

Run a collection (a named set of scenarios), e.g. smoke or regress.

```sh
npx @unotest/web collection <name> [--workers=N] [--bail] [--headed]
```

- `--workers=N` — Run N scenarios in parallel (default: serial).
- `--bail` — Stop after the first failure.
- `--headed` — Run with a visible browser.

**Example**

```sh
npx @unotest/web collection smoke --workers=4
```

## `viewer`

Open the local IDE-style viewer (HTTP + WebSocket). No cloud, no account.

```sh
npx @unotest/web viewer
```

- `UNOTEST_VIEWER_NO_OPEN=1` — Env: start the server without auto-opening a browser.

**Example**

```sh
npx @unotest/web viewer
```

## `lint`

Static-check scenarios and helpers. Exits non-zero on errors.

```sh
npx @unotest/web lint [paths...]
```

**Example**

```sh
npx @unotest/web lint
```

## `install-chromium`

Download Playwright’s bundled Chromium (~150 MB). Not needed if you chose system Chrome/Edge.

```sh
npx @unotest/web install-chromium
```

## `mcp`

Run as an MCP stdio server. This is what your editor launches automatically; you rarely run it by hand.

```sh
npx @unotest/web mcp
```
