You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/unplugin-dev-inspector/README.md
+43-26Lines changed: 43 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,15 @@ This project uses the following sponsor APIs and platforms:
53
53
## Key Features
54
54
55
55
### 🎯 Visual Context
56
+
56
57
Click any element to instantly send its source code location, computed styles, and DOM hierarchy to AI. No more explaining "it's the blue button in the header".
57
58
58
59
### 🛠️ Full DevTools Access
60
+
59
61
AI can access Chrome DevTools to analyze network requests, console logs, and performance metrics. It sees what you see.
60
62
61
63
### 🤖 Multi-Agent Workflow
64
+
62
65
Switch between agents (Claude Code, Goose) and track their debugging progress visually with step-by-step status updates.
You can customize available AI agents and set a default agent:
300
303
301
304
```typescript
@@ -327,11 +330,11 @@ export default {
327
330
```
328
331
329
332
**Key Features:**
333
+
330
334
- Custom agents with the **same name** as [default agents](https://agentclientprotocol.com/overview/agents) automatically inherit missing properties (icons, env)
331
335
- You can override just the command/args while keeping default icons
332
336
- If no custom agents provided, defaults are: Claude Code, Codex CLI, Gemini CLI, Kimi CLI, Goose, OpenCode
333
337
334
-
335
338
## What It Does
336
339
337
340
**Click element → Describe issue → AI analyzes → Get fix**
@@ -342,68 +345,81 @@ export default {
342
345
4. Get intelligent solutions through natural conversation
343
346
344
347
**Examples:**
348
+
345
349
- "Why is this button not clickable?" → AI checks `pointer-events`, z-index, overlays
346
350
- "This API call is failing" → AI analyzes network requests, timing, responses
347
351
- "Where is this component?" → Jump to source file and line number
348
352
349
353
## Two Workflow Modes
350
-
351
-
DevInspector offers two ways to interact with your AI, depending on your preference:
352
-
353
-
### 1. Editor Mode
354
-
**Best for:** Code-heavy tasks, refactoring, and maintaining flow.
355
-
356
-
-**How it works:** You use your IDE's AI assistant (Cursor, Windsurf, Copilot).
357
-
-**The Flow:** Click an element in the browser -> The context (source, props, styles) is sent to your Editor via MCP -> You ask your Editor to fix it.
358
-
-**Why:** Keeps you in your coding environment.
359
-
360
-
### 2. Inspector Bar Mode (Recommended)
361
-
**Best for:** Quick fixes, visual tweaks, or if you don't use an AI editor.
362
-
363
-
-**How it works:** You use the floating "Inspector Bar" directly in the browser.
364
-
-**The Flow:** Click "Ask AI" in the browser -> Select an agent (e.g., Claude Code, Custom Script) -> The agent runs in your terminal but interacts with the browser overlay.
365
-
-**Why:** No context switching. Great for "what is this?" questions or network debugging.
366
-
367
-
## MCP Tools
354
+
355
+
DevInspector offers two ways to interact with your AI, depending on your preference:
356
+
357
+
### 1. Editor Mode
358
+
359
+
**Best for:** Code-heavy tasks, refactoring, and maintaining flow.
360
+
361
+
-**How it works:** You use your IDE's AI assistant (Cursor, Windsurf, Copilot).
362
+
-**The Flow:** Click an element in the browser -> The context (source, props, styles) is sent to your Editor via MCP -> You ask your Editor to fix it.
363
+
-**Why:** Keeps you in your coding environment.
364
+
365
+
### 2. Inspector Bar Mode (Recommended)
366
+
367
+
**Best for:** Quick fixes, visual tweaks, or if you don't use an AI editor.
368
+
369
+
-**How it works:** You use the floating "Inspector Bar" directly in the browser.
370
+
-**The Flow:** Click "Ask AI" in the browser -> Select an agent (e.g., Claude Code, Custom Script) -> The agent runs in your terminal but interacts with the browser overlay.
371
+
-**Why:** No context switching. Great for "what is this?" questions or network debugging.
372
+
373
+
## MCP Tools
368
374
369
375
### `capture_element_context`
376
+
370
377
Activates visual selector. Returns source location, DOM hierarchy, styles, dimensions, and user notes.
371
378
372
379
### `list_inspections`
380
+
373
381
Shows all inspections with ID, element details, notes, and status (pending/in-progress/completed/failed).
374
382
375
383
### `update_inspection_status`
384
+
376
385
Updates inspection status with optional progress steps.
377
386
378
387
**Parameters:**`status`, `message` (required for completed/failed), `progress`, `inspectionId` (optional)
379
388
380
389
### `execute_page_script`
390
+
381
391
Executes JavaScript in browser context. Access to window, document, React/Vue instances, localStorage.
382
392
383
393
### `chrome_devtools`
394
+
384
395
Agentic tool for Chrome DevTools access. Provides network inspection, console logs, performance metrics, element interaction, and more.
385
396
386
397
## MCP Prompts
387
398
388
399
### `capture_element`
400
+
389
401
Capture and analyze UI element context.
390
402
391
403
### `view_inspections`
404
+
392
405
View all pending, in-progress, and completed inspections.
💡 Optional if Chrome is already open. Use when you need to launch a new Chrome instance.
400
414
401
415
### `get_network_requests`
416
+
402
417
List network requests or get details of a specific one. Always refreshes the list first.
403
418
404
419
**Parameter:**`reqid` (optional) - If provided, get details for that request. If omitted, just list all requests.
405
420
406
421
### `get_console_messages`
422
+
407
423
List console messages or get details of a specific one. Always refreshes the list first.
408
424
409
425
**Parameter:**`msgid` (optional) - If provided, get details for that message. If omitted, just list all messages.
@@ -413,6 +429,7 @@ List console messages or get details of a specific one. Always refreshes the lis
413
429
For a deep dive into how the MCP context, CMCP library, and Puppet binding mechanism work together, see the [Architecture Documentation](./docs/architecture/mcp-cmcp-puppet-architecture.md).
414
430
415
431
**Key concepts:**
432
+
416
433
-**Hub-and-spoke model**: Vite dev server acts as central hub managing multiple client connections
0 commit comments