Try it in 10 seconds without installing anything: Live Interactive Sandbox (Vercel) · Mirror (Cloudflare Pages)
Stop describing UI bugs to AI. Click or marquee-select any element in your running app to highlight its component boundary, jump to the exact file, line, and column in your editor, or copy structured AI context (@file:line:col + component hierarchy + route) and background-aware component screenshots straight to Cursor, Claude Code, and GitHub Copilot.
| Capability | Inspect Devtools | Single-framework tools (e.g. react-grab / click-to-component) |
Built-in Browser / IDE Inspectors |
|---|---|---|---|
| React, Vue 3, Svelte, Next.js, Nuxt 3 | ✅ Unified | ❌ React-only | |
| Vite, Webpack, Rspack, Rollup, Esbuild | ✅ Via Unplugin | ❌ Bundler-specific | |
PS-style Marquee (Shift add / Alt subtract) |
✅ Multi-select | ❌ Single element | ❌ Single element |
Batch AI Context (@file:line:col + Hierarchy + Route) |
✅ Single & Batch | ❌ DOM / HTML only | |
| Background-inherited Visual Crop PNG | ✅ No dark-on-dark alpha | ❌ Not included | |
Monorepo Prefix (copyMentionPrefix) |
✅ Built-in | ❌ Manual edit | ❌ N/A |
- 🚀 Full Major Framework Support: First-class integration for Next.js, Nuxt 3, React, Vue 3, and Svelte.
- 📦 Universal Bundler Compatibility: Powered by Unplugin, supporting Vite, Webpack, Rollup, Esbuild, and Rspack.
- 🤖 Rich AI Context Snapshot (Single & Batch): Press
Cmd+Alt+C/Ctrl+Alt+Cto copy@file:line:col, component hierarchy tree (Hierarchy: App > DashboardPage), and page route (Route: /dashboard) — works for both single clicks and multi-component marquee selections. - 📸 Smart Visual Crop: Capture component screenshots directly to your clipboard with automatic page background color inheritance, preventing dark-on-dark transparent image issues.
- 🧭 Component Hierarchy Breadcrumbs: Interactive breadcrumb bar on the floating badge allows you to traverse and jump to parent components up the render tree.
- 🎨 Photoshop-Style Marquee Selection: Multi-element marquee,
Shift+click/dragto add,Alt+click/dragto subtract, and persistent selection states. - 💻 Smart Editor Launching: Automatically detects running instances of VS Code, Cursor, and WebStorm, or direct launching via URL Scheme protocols.
Choose the package that fits your framework and bundler:
Note:
@inspect-devtools/nextinjects source metadata via a Webpack loader during development. If your Next.js dev script uses Turbopack, start dev mode with Webpack (e.g.next dev --webpack).
pnpm add -D @inspect-devtools/nextWrap your configuration in next.config.mjs:
// next.config.mjs
import { withInspectDevtools } from '@inspect-devtools/next'
/** @type {import('next').NextConfig} */
const nextConfig = {}
export default withInspectDevtools(nextConfig)Include the client component in your root layout (e.g. app/layout.tsx):
// app/layout.tsx
import { InspectDevtools } from '@inspect-devtools/next/component'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<body>
<InspectDevtools />
{children}
</body>
</html>
)
}pnpm add -D @inspect-devtools/nuxtRegister the module in nuxt.config.ts:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@inspect-devtools/nuxt'],
inspectDevtools: {
openOnClick: true, // Optional: open in editor on single click
},
})pnpm add -D @inspect-devtools/vite-reactConfigure in vite.config.ts:
// vite.config.ts
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { inspectDevtoolsReact } from '@inspect-devtools/vite-react'
export default defineConfig({
plugins: [react(), ...inspectDevtoolsReact()],
})pnpm add -D @inspect-devtools/vite-vueConfigure in vite.config.ts:
// vite.config.ts
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import { inspectDevtoolsVue } from '@inspect-devtools/vite-vue'
export default defineConfig({
plugins: [vue(), ...inspectDevtoolsVue()],
})pnpm add -D @inspect-devtools/vite-svelteConfigure in vite.config.ts:
// vite.config.ts
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { defineConfig } from 'vite'
import { inspectDevtoolsSvelte } from '@inspect-devtools/vite-svelte'
export default defineConfig({
plugins: [svelte(), ...inspectDevtoolsSvelte()],
})pnpm add -D @inspect-devtools/unpluginExample with Webpack:
// webpack.config.js
const inspectDevtools = require('@inspect-devtools/unplugin/webpack')
module.exports = {
plugins: [
inspectDevtools({ framework: 'react' }), // or 'vue' / 'svelte'
],
}All packages share a consistent options interface:
| Option | Type | Default | Description |
|---|---|---|---|
openOnClick |
boolean |
false / framework preset |
Whether clicking an element immediately opens your editor. If false, opens on double-click or badge click |
openInEditor |
string |
Auto-detect | Specific editor CLI command, e.g. 'code' (VS Code), 'cursor', 'webstorm' |
editorProtocol |
'auto' | 'vscode' | 'cursor' | 'webstorm' |
'auto' |
Editor trigger mechanism. 'auto' uses the dev server RPC; specific values launch via OS URL Schemes |
theme |
'light' | 'dark' |
'light' |
Default theme for bottom dock and overlay elements |
copyRoute |
boolean |
false |
Whether to append the current URL route (e.g. Route: /dashboard) when copying references |
copyLineColumn |
boolean | 'line' | 'column' |
false |
Whether to include line and column numbers in standard reference copies (e.g. @App.vue:15:3) |
copyFormat |
'mention' | 'link' |
'mention' |
Source reference format: 'mention' for @path; 'link' for Markdown link [name](path) |
copyMentionPrefix |
string |
'' |
Path prefix added to ordinary @ mentions, for a dev server started inside one folder of a multi-root workspace. copyMentionPrefix: 'web/' turns @src/App.vue into @web/src/App.vue. Markdown links are unchanged |
| Shortcut | Action | Description |
|---|---|---|
Alt+Shift+I |
Toggle Inspect Mode | Globally toggle component inspection on and off |
Cmd+Alt+C / Ctrl+Alt+C |
Copy AI Context Snapshot | Copies @file:line:col + Hierarchy breadcrumbs + Page route |
Cmd+Shift+C / Ctrl+Shift+C |
Copy Visual Component Screenshot | Copies visual PNG crop to clipboard with inherited background color |
Shift + click / drag |
Add to selection | Add more components into the active selection |
Alt + click / drag |
Subtract from selection | Remove components from the active selection |
Cmd/Ctrl + click |
Direct open inside selection | While selection is active, modifier-click directly opens in editor |
Escape |
Exit / Clear selection | Exit inspect mode or clear existing selection frames |
Note: Shortcuts are automatically ignored when focus is inside an
input,textarea, or content-editable element.
Press Cmd+Alt+C (or click the ✨ button on the floating badge) to copy structured component context:
@/Users/project/src/pages/HomePage.tsx:12:5
Hierarchy: `App` > `HomePage` > `MetricCard`
Route: /dashboard
When multiple components are selected via marquee or Shift+click, Cmd+Alt+C deduplicates and batches all selected components with one shared route:
@/Users/project/src/components/HeaderBar.tsx:8:2
Hierarchy: `App` > `HeaderBar`
@/Users/project/src/components/MetricCard.tsx:24:5
Hierarchy: `App` > `DashboardPage` > `MetricCard`
Route: /dashboard
Paste directly into Cursor, Claude Code, or Copilot prompts so the AI immediately understands every target component's exact file location and runtime tree position.
The repository provides 5 preconfigured playgrounds for hands-on testing:
# React Playground (Vite)
pnpm play:react
# Vue 3 Playground (Vite)
pnpm play:vue
# Svelte Playground (Vite)
pnpm play:svelte
# Next.js Playground (App Router)
pnpm play:next
# Nuxt 3 Playground (Vite + Nitro)
pnpm play:nuxtThis repository is structured as a pnpm monorepo:
@inspect-devtools/core: AST transformation, DOM resolution, RPC protocol, and server launch engine.@inspect-devtools/client: Floating dock, overlay frames, visual screenshot engine, and interaction logic.@inspect-devtools/vite-react: React + Vite integration adapter.@inspect-devtools/vite-vue: Vue 3 + Vite integration adapter.@inspect-devtools/vite-svelte: Svelte + Vite integration adapter.@inspect-devtools/next: Next.js integration (Webpack loader + client runtime).@inspect-devtools/nuxt: Nuxt 3 native module.@inspect-devtools/unplugin: Universal bundler abstraction for Webpack, Rollup, Esbuild, and Rspack.
# Install dependencies
pnpm install
# Run unit tests
pnpm test
# Run type check
pnpm typecheck
# Build all packages
pnpm build
# Full pipeline check
pnpm release:check