Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/chrome-cdp/README.md

Raw
Rendered preview
chrome-cdp

chrome-cdp

Use Chrome from Pi when browser work needs a real page, such as checking a UI, reproducing a flow, or capturing a screenshot. Enable codemode or tool_search, then ask Pi to open, inspect, navigate, or capture a page.

Installation

First use

Use tool_search to discover Chrome. Chrome starts only when Pi first uses it. It uses a disposable profile by default, so it does not use your everyday Chrome profile.

Use tool_search to find chrome_cdp, then open http://localhost:3000 and take a full-page screenshot.

Run /chrome when you want to declare Chrome directly to Pi instead of discovering it. Run /chrome close when finished to stop Chrome and remove its direct declaration; later scripts can still launch it. Run /chrome again to remove that declaration while leaving any running Chrome process alone. Start Pi with --chrome or set chrome-cdp.enable to true for that direct declaration at startup.

What Pi can do

Pi can drive pages, wait for browser events, inspect responses, and save screenshots, video, or traces. Chrome is headless unless Pi starts it with a visible window. Captured files go to your Downloads folder unless chrome-cdp.artifactDir changes that destination. Set chrome-cdp.executablePath if Pi cannot find Chrome. Set chrome-cdp.profile only when you deliberately want a reusable extension-owned profile. Video capture needs ffmpeg.

Privacy and control

Pi sends raw Chrome DevTools Protocol commands to the Chrome process it starts. Those commands can reach local sites, browser data in a chosen reusable profile, and download settings. Page content, events, traces, and captures can contain sensitive data. Use a disposable profile for work you do not want retained.

Reference

Commands

Command Purpose
/chrome Toggle chrome_cdp direct declaration; /chrome close stops owned Chrome

Setting names

Setting CLI flag
chrome-cdp.artifactDir
chrome-cdp.enable --chrome
chrome-cdp.executablePath
chrome-cdp.flags
chrome-cdp.profile
<img src="assets/banner.svg" alt="chrome-cdp" height="70">

# chrome-cdp

Use Chrome from Pi when browser work needs a real page, such as checking a UI, reproducing a flow, or capturing a screenshot.
Enable `codemode` or `tool_search`, then ask Pi to open, inspect, navigate, or capture a page.

[Installation](../../README.md#install)

## First use

Use `tool_search` to discover Chrome.
Chrome starts only when Pi first uses it.
It uses a disposable profile by default, so it does not use your everyday Chrome profile.

```text
Use tool_search to find chrome_cdp, then open http://localhost:3000 and take a full-page screenshot.
```

Run `/chrome` when you want to declare Chrome directly to Pi instead of discovering it.
Run `/chrome close` when finished to stop Chrome and remove its direct declaration; later scripts can still launch it.
Run `/chrome` again to remove that declaration while leaving any running Chrome process alone.
Start Pi with `--chrome` or set `chrome-cdp.enable` to `true` for that direct declaration at startup.

## What Pi can do

Pi can drive pages, wait for browser events, inspect responses, and save screenshots, video, or traces.
Chrome is headless unless Pi starts it with a visible window.
Captured files go to your Downloads folder unless `chrome-cdp.artifactDir` changes that destination.
Set `chrome-cdp.executablePath` if Pi cannot find Chrome.
Set `chrome-cdp.profile` only when you deliberately want a reusable extension-owned profile.
Video capture needs `ffmpeg`.

## Privacy and control

Pi sends raw Chrome DevTools Protocol commands to the Chrome process it starts.
Those commands can reach local sites, browser data in a chosen reusable profile, and download settings.
Page content, events, traces, and captures can contain sensitive data.
Use a disposable profile for work you do not want retained.

## Reference

<!-- config:start -->
### Commands

| Command | Purpose |
| --- | --- |
| `/chrome` | Toggle chrome_cdp direct declaration; /chrome close stops owned Chrome |

### Setting names

| Setting | CLI flag |
| --- | --- |
| `chrome-cdp.artifactDir` |   |
| `chrome-cdp.enable` | `--chrome` |
| `chrome-cdp.executablePath` |   |
| `chrome-cdp.flags` |   |
| `chrome-cdp.profile` |   |
<!-- config:end -->