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

# Record a browser from the CLI

> Launch a browser or attach to an existing Chromium session, stop safely, and verify the uploaded capture.

## Launch a browser yourself

```bash theme={null}
export CAPTURE_MCP_URL=https://mcp.tekma.dev/mcp
tekma auth login --scope captures:record
tekma record open https://example.com/checkout --headed
tekma record status
```

Interact with the opened browser, then stop it:

```bash theme={null}
tekma record stop --title "Checkout delivery error"
```

The result reports upload status, capture identifiers and any share URL permitted by workspace policy. Open the returned capture and verify playback; an upload acknowledgement is not proof that the video shows the intended behavior.

## Attach to an existing browser

Start Chromium with a loopback DevTools endpoint, then run:

```bash theme={null}
tekma record start --cdp http://127.0.0.1:9222
# drive the selected page with your browser tool
tekma record stop --title "Regression verification"
```

The recorder attaches as a second CDP client and follows the focused page selected at start. It does not follow a tab opened later. Keep the debugging port on loopback and close it after the run.

## Use an authorized recording link or local mode

Guest automation can supply a recording-link token and API origin instead of OAuth. For a result that never uploads, use:

```bash theme={null}
tekma record open https://example.com --headed --local
tekma record stop --title "Local walkthrough"
```

The saved video has no element-level redaction. Input values are not captured as action text, but visible page pixels can still contain secrets.

## Recover and troubleshoot

Use `tekma record status` before starting another session. Keep the recorder directory after an interruption, check FFmpeg and browser permissions with `tekma doctor`, and retry only after checking whether the server already created a capture. A browser that cannot stream video can still produce diagnostic events; verify the output fields instead of assuming media succeeded.
