From cff1b1c9db5b5cf431d6d081e1c17c11f1123f86 Mon Sep 17 00:00:00 2001 From: Adam Ladachowski Date: Wed, 11 Feb 2026 12:54:25 +0100 Subject: [PATCH] Update README to reflect removal of HTTP server mode - Remove obsolete Server Mode section (removed in 3014cf9) - Update plugin installation commands to correct syntax - Remove startServer from programmatic usage (no longer exported) - Remove BrowserServer API section (class removed) - Add close tool to MCP tools reference - Sync plugin.json version to 0.2.13-pre.0 Co-Authored-By: Claude Opus 4.5 --- .claude-plugin/plugin.json | 2 +- README.md | 70 ++++---------------------------------- 2 files changed, 8 insertions(+), 64 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 42b1429..2136667 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "browse", "description": "Browser automation and image processing tools for Claude Code using Playwright WebKit", - "version": "0.2.10", + "version": "0.2.13-pre.0", "author": { "name": "aladac", "url": "https://github.com/aladac" diff --git a/README.md b/README.md index 20a27ef..9c65d3e 100644 --- a/README.md +++ b/README.md @@ -37,65 +37,19 @@ browse -c ".cookie-accept" -c "a.nav-link" -q "h1" https://example.com browse -i --headed https://example.com ``` -## Server Mode - -Start a persistent browser server that accepts commands via HTTP: - -```bash -browse -s 3000 # headless -browse -s 3000 --headed # visible browser -``` - -Send commands: - -```bash -# Navigate -curl -X POST localhost:3000 -d '{"cmd":"goto","url":"https://example.com"}' - -# Click -curl -X POST localhost:3000 -d '{"cmd":"click","selector":"button.submit"}' - -# Type -curl -X POST localhost:3000 -d '{"cmd":"type","selector":"#search","text":"hello"}' - -# Query elements -curl -X POST localhost:3000 -d '{"cmd":"query","selector":"a[href]"}' - -# Screenshot -curl -X POST localhost:3000 -d '{"cmd":"screenshot","path":"page.png"}' - -# Get current URL -curl -X POST localhost:3000 -d '{"cmd":"url"}' - -# Get page HTML -curl -X POST localhost:3000 -d '{"cmd":"html"}' - -# Navigation -curl -X POST localhost:3000 -d '{"cmd":"back"}' -curl -X POST localhost:3000 -d '{"cmd":"forward"}' -curl -X POST localhost:3000 -d '{"cmd":"reload"}' - -# Wait -curl -X POST localhost:3000 -d '{"cmd":"wait","ms":2000}' - -# Close server -curl -X POST localhost:3000 -d '{"cmd":"close"}' -``` - ## Claude Code Plugin (Recommended) Install as a Claude Code plugin for the best integration: ```bash -# Via marketplace (recommended) -claude plugin marketplace add https://github.com/saiden-dev/claude-plugins -claude plugin install browse - -# Or direct from GitHub +# Install from GitHub claude plugin install github:saiden-dev/browse + +# Or load locally for development +claude --plugin-dir /path/to/claude-browse ``` -**Prerequisites:** Node.js 18+ (the MCP server runs via npx) +**Prerequisites:** Node.js 18+, Playwright WebKit (`npx playwright install webkit`) ### Plugin Features @@ -160,6 +114,7 @@ Add to Claude Code's MCP config (`~/.claude/settings.json`): | `upload` | Upload files to a file input | | `back`, `forward`, `reload` | Browser navigation | | `wait` | Wait for a specified time | +| `close` | Close the browser and end session | **Debugging & Inspection:** | Tool | Description | @@ -222,9 +177,8 @@ Add to Claude Code's MCP config (`~/.claude/settings.json`): ## Programmatic Usage ```typescript -import { ClaudeBrowser, startServer } from '@saiden/browse'; +import { ClaudeBrowser } from '@saiden/browse'; -// Direct browser control const browser = new ClaudeBrowser({ headless: true, width: 1280, @@ -242,10 +196,6 @@ await browser.type('#input', 'hello'); await browser.screenshot('page.png'); await browser.close(); - -// Or start a server -const server = await startServer({ port: 3000, headless: false }); -// Server runs until closed via HTTP or SIGINT ``` ## API @@ -304,12 +254,6 @@ const server = await startServer({ port: 3000, headless: false }); **Commands:** - `executeCommand(cmd)` - Execute a command object -### BrowserServer - -- `start()` - Start HTTP server -- `stop()` - Stop server and close browser -- `getPort()` - Get server port - ## License MIT