v1.4.0 — Live Browser-to-Claude Code Bridge
Highlights
Live browser-to-Claude Code bridge — Select a component, type what you want changed, and Claude Code acts on it instantly. No copy-paste, no context switching.
Claude Code Integration
watch_for_grabMCP tool — Blocks until the user sends context from the browser. Claude Code calls it, user selects element + types prompt, tool resolves with full component context + instruction. Call in a loop for continuous interaction.- Sidecar HTTP server in stdio mode — Browser can POST context even when Claude Code connects via stdio.
- SSE real-time status — Prompt overlay shows green dot when Claude Code is listening, red when disconnected.
- Smart buttons — "Send to Claude Code" when agent connected, "Send (queued)" when MCP enabled but no agent, "Copy with Context" as fallback.
Quick Setup
// ~/.claude.json
{ "mcpServers": { "svelte-grab": { "command": "npx", "args": ["svelte-grab-mcp", "--stdio"] } } }<SvelteDevKit enableMcp />In Claude Code: "use watch_for_grab to listen for my selections"
react-grab Feature Parity
- Animation freezing — Pauses CSS animations/transitions during selection for stable captures
- Pseudo-state preservation — Freezes :hover/:focus states so you can grab transient UI
- Point-sampling drag selection —
elementsFromPoint()grid instead of naivequerySelectorAll - CSS selector generation — 3-tier strategy for element reacquisition
- History persistence — sessionStorage with byte-size trimming
- Prompt mode — Inline overlay for typing instructions on selected elements
Agent Providers
- CursorProvider —
cursor-agentCLI with streaming JSON - CopilotProvider —
copilotCLI with--silent --allow-all - CodexProvider —
@openai/codex-sdkwith thread API connectToRelay()— Browser-side remote handler registration
CLI
svelte-grab add <provider>— Add agent provider to configsvelte-grab remove <provider>— Remove providersvelte-grab configure— Interactive configuration- Config file system (
svelte-grab.config.json)
New Utility Modules
parse-activation-key, safe-polygon, copy-content (multi-format clipboard), action-cycle, element-visibility, confirmation-focus-manager, log-intro
Full changelog: CHANGELOG.md