Skip to main content

pi-web-browse

Search the web and fetch/read pages via a real headless browser (CDP). Use this instead of curl when sites are JS-heavy or bot-protected. Works on Linux, macOS, and Windows.

설치로 이동

소스 정보

저장소
ogulcancelik/pi-web-browse
최근 소스 활동
2026년 3월 17일 18:48
감지된 SKILL.md 언어
영어
스타
18
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
pi-web-browse
description
Search the web and fetch/read pages via a real headless browser (CDP). Use this instead of curl when sites are JS-heavy or bot-protected. Works on Linux, macOS, and Windows.
# Web Browse Search the web, then open/fetch pages in a **real browser session** (headless Chromium via CDP) and extract readable text. Use this instead of `curl` when sites are JS-heavy or bot-protected. ## Setup Run once before first use: ```bash cd {baseDir} npm install ``` The skill auto-detects browsers already installed on your system (Brave, Chrome, Edge, Chromium). On Windows, Edge is pre-installed and works out of the box. **No browser installed?** (rare) Run: `npx playwright install chromium` ## Configuration (optional) Environment variables: | Variable | Description | |----------|-------------| | `WEB_BROWSE_BROWSER_BIN` | Path to browser binary (auto-detected if not set) | | `WEB_BROWSE_USER_AGENT` | Override User-Agent string | | `WEB_BROWSE_DAEMON_PORT` | Daemon port (default: 9377) | | `WEB_BROWSE_CDP_PORT` | CDP port (default: 9225) | | `WEB_BROWSE_DEBUG_DUMP` | Set to `1` to save screenshots/HTML on failures | You can also pass `--browser-bin <path>` as a CLI argument. ## Usage ```bash # Search (results are cached for ~10 minutes) {baseDir}/web-browse.js "your query" {baseDir}/web-browse.js "your query" -n 10 # Fetch specific cached results by index {baseDir}/web-browse.js --fetch 1,3,5 # Fetch a specific URL {baseDir}/web-browse.js --url <url> # truncated (~2000 chars) {baseDir}/web-browse.js --url <url> --full # full content ``` **Windows note:** Use `node {baseDir}/web-browse.js` instead of `{baseDir}/web-browse.js` ## Default behavior: persistent daemon (auto) Direct calls automatically start/use a local daemon that keeps a **persistent headless browser+CDP session**. This avoids browser startup overhead and helps with bot-protection pages that auto-clear (e.g. Anubis PoW). ### Daemon controls (optional, for debugging) ```bash {baseDir}/web-browse.js --daemon status {baseDir}/web-browse.js --daemon start {baseDir}/web-browse.js --daemon stop {baseDir}/web-browse.js --daemon restart ``` ### Bypass daemon (one-shot) ```bash {baseDir}/web-browse.js --no-daemon --url https://example.com {baseDir}/web-browse.js --no-daemon "your query" ``` ## Workflow 1) **Search** → see snippets → decide what to read 2) **Fetch by index** → `--fetch 1,3` opens those results and extracts content ```bash {baseDir}/web-browse.js "rust async runtime" # shows results {baseDir}/web-browse.js --fetch 1,3 # fetches result #1 and #3 ``` ## Browser Support The skill auto-detects installed browsers in this order: **Linux:** brave, brave-browser, google-chrome, chromium **macOS:** Brave Browser, Google Chrome, Chromium, Microsoft Edge (in /Applications) **Windows:** Brave, Chrome, Edge, Chromium (common install paths) To use a specific browser, set `WEB_BROWSE_BROWSER_BIN` or pass `--browser-bin <path>`. ## Notes - Content is truncated by default to save tokens; use `--full` for complete output. - The daemon keeps a warm browser session for faster subsequent requests. - CDP profile is stored in `~/.config/web-browse-cdp-profile/` (configurable via `--cdp-profile`).
GitHub에서 보기