AI-native visual development for VS Code Bridge the gap between UI and code with live preview, source mapping, and AI agent integration
AI Eye is an AI-native visual development extension for VS Code that enables both human developers and AI agents to:
- ποΈ See your UI - Live preview panel embedded in VS Code
- π― Navigate visually - Click elements β jump to source code
- π€ Enable AI agents - Let AI see, inspect, and interact with your UI
- π Debug faster - Visual inspection with source mapping
- β‘ Track HMR - Real-time Hot Module Replacement status
Perfect for:
- Visual debugging and development
- AI-assisted coding with tools like Claude Code
- Understanding unfamiliar codebases
- Rapid prototyping and iteration
- Teaching and pair programming
Lightning-fast AI agent integration:
- β‘ Instant startup - No browser launch delay
- πΎ 90% less memory - Uses only 20MB vs 200MB
- π 75% faster - Sub-50ms response times
- π― Seamless UX - Everything in VS Code
- π§ Zero config - Works out of the box
Technical highlights:
- Embedded MCP server runs in extension host
- Direct postMessage communication (no STDIO overhead)
- All 14 tools fully functional
- Backward compatible with v1
Live Preview
- Embedded browser preview in VS Code
- Click any element to jump to its source code
- Real-time HMR updates
- Interactive debugging
Source Mapping
- Every UI element traces back to source code
- See exact file, line, and column for each element
- Works with React, Vue, Svelte
Visual Debugging
- Console logs captured in VS Code
- Element inspection with computed styles
- Bounding boxes and layout information
AI Eye provides 14 MCP tools for AI agents (Claude, Copilot, etc.):
aieye_screenshot- Capture page screenshotsaieye_inspect_element- Get element details + source locationaieye_get_source- Find where code is definedaieye_get_structure- Get component hierarchyaieye_find_elements- Search by text/role/selectoraieye_click- Interact with buttonsaieye_type- Fill formsaieye_scroll- Access elements below foldaieye_get_console_logs- Debug errorsaieye_get_hmr_status- Check build status- ...and 4 more
See docs/AI-USAGE.md for complete AI agent guide.
1. Install the VS Code Extension
(Coming soon to VS Code Marketplace)
For now, install from source:
git clone https://github.com/SPra03/ai-eye.git
cd ai-eye
npm install -g pnpm # or use: npx pnpm
pnpm install
pnpm buildOpen in VS Code and press F5 to launch Extension Development Host.
2. Install Plugin in Your Project
For Vite projects (React, Vue, Svelte):
npm install @ai-eye/vite-plugin --save-dev// vite.config.ts
import aiEye from '@ai-eye/vite-plugin';
export default defineConfig({
plugins: [
aiEye(),
],
});For Create React App:
npm install @ai-eye/babel-plugin react-app-rewired customize-cra --save-devSee docs/GETTING-STARTED.md for detailed setup.
3. Start Your Dev Server
npm run dev
# Dev server running at http://localhost:51734. Open AI Eye Preview
In VS Code:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type: "AI Eye: Open Live Preview"
- Click elements to navigate to source code!
1. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"aieye": {
"command": "node",
"args": ["/path/to/ai-eye/packages/mcp-server/dist/index.js"],
"env": {
"AIEYE_URL": "http://localhost:5173"
}
}
}
}2. Use AI Eye Tools
You: "Take a screenshot of my app and tell me what you see"
Claude: [Uses aieye_screenshot]
"I can see a login form with two input fields and a submit button.
The button is defined at src/LoginForm.tsx:45.
Would you like me to inspect it further?"
See docs/AI-USAGE.md for comprehensive guide.
- Installation Guide - Setup instructions
- Tool Reference - Quick reference cheat sheet
- Examples - Example projects
- API Reference - Complete API documentation
- Contributing - Development guidelines
- Changelog - Version history
- AI Usage Guide - Complete guide for AI agents
- Tool Reference - 14 MCP tools explained
- Troubleshooting - Common issues
- @ai-eye/extension - VS Code extension
- aieye - MCP server
- @ai-eye/vite-plugin - Vite plugin
- @ai-eye/babel-plugin - Babel plugin
- @ai-eye/bridge - Browser bridge
Before AI Eye:
1. See bug in browser
2. Search codebase for component
3. Guess which file it's in
4. Open multiple files
5. Find the right element
With AI Eye:
1. See bug in AI Eye preview
2. Click element
3. VS Code opens exact file and line
4. Fix bug
5. See update instantly
Example workflow:
User: "The login button doesn't look right"
AI: [Takes screenshot]
[Inspects button element]
"I can see the button at src/Login.tsx:45.
It has incorrect padding. Let me fix it..."
[Edits file]
[Takes new screenshot]
"Fixed! The button now has proper spacing."
Navigate unfamiliar codebases visually:
- Open preview of the app
- Click around to explore components
- Understand component hierarchy visually
- Jump to relevant source files
AI Eye has two modes: v1 (External Browser) and v2 (Embedded Webview).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VS Code β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β AI Eye Extension β β
β β ββββββββββββββββββ ββββββββββββββββββββββββββ β β
β β β Webview β β Embedded MCP Server β β β
β β β Bridge ββββ (Extension Host) β β β
β β ββββββββββ¬ββββββββ βββββββββββββ²βββββββββββββ β β
β β β β β β
β β ββββββββββΌβββββββββββββββββββββββΌβββββββββββ β β
β β β Webview Panel (iframe) β β β β
β β β ββββββββββββββββββββββββββββββΌβββββββββ β β β
β β β β Your App β β β β β
β β β β + AI Eye Bridge β β β β β
β β β β (postMessage protocol) β β β β β
β β β ββββββββββββββββββββββββββββββΌβββββββββ β β β
β β βββββββββββββββββββββββββββββββββ β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
β
β
AI Agent (Claude Code, etc.)
Benefits:
- β‘ Instant startup (no browser launch)
- πΎ 90% less memory (20MB vs 200MB)
- π 75% faster (20-50ms vs 100-200ms latency)
- π― Integrated UX (everything in VS Code)
βββββββββββββββββββββββββββββββββββββββββββ
β VS Code β
β ββββββββββββββββββββββββββββββββββββ β
β β AI Eye Extension β β
β β - Live Preview Panel β β
β β - Source Navigation β β
β ββββββββββββββββββββββββββββββββββββ β
ββββββββββββββ¬βββββββββββββββββββββββββββββ
β
β
ββββββββββββββ΄βββββββββββββββββββββββββββββ
β MCP Server β
β - 14 AI Agent Tools β
β - Browser Automation (Playwright/CDP) β
ββββββββββββββ¬βββββββββββββββββββββββββββββ
β
β
ββββββββββββββ΄βββββββββββββββββββββββββββββ
β External Chromium Browser β
β ββββββββββββββββββββββββββββββββββββ β
β β Your App β β
β β + AI Eye Bridge β β
β β (injected by plugin) β β
β ββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββ
Use v1 when:
- Need full Playwright/CDP capabilities
- Debugging cross-browser issues
- Advanced automation scenarios
- VS Code Extension - Live preview panel and commands
- Embedded MCP Server (v2) - Runs in extension host, zero overhead
- External MCP Server (v1) - Separate process with browser automation
- Webview Bridge (v2) - High-level API for webview interactions
- Vite Plugin - Injects source mapping for Vite projects
- Babel Plugin - Injects source mapping for Babel projects
- Browser Bridge - Runs in browser, provides inspection API
Complete example with full source mapping:
cd examples/react-vite-app
npm install
npm run devThen open AI Eye preview and click around!
Simple HTML test page for quick verification:
cd examples/test-preview
node server.jsSee examples/README.md for more examples and framework guides.
# Clone repository
git clone https://github.com/SPra03/ai-eye.git
cd ai-eye
# Install dependencies
npm install -g pnpm # or use: npx pnpm
pnpm install
# Build all packages
pnpm build
# Watch mode for development
pnpm dev# Run all tests
pnpm test
# Run specific package tests
pnpm --filter @ai-eye/vite-plugin test
pnpm --filter @ai-eye/babel-plugin test
pnpm --filter @ai-eye/bridge testai-eye/
βββ packages/
β βββ extension/ # VS Code extension
β βββ mcp-server/ # MCP server for AI agents
β βββ babel-plugin/ # Babel source mapping plugin
β βββ vite-plugin/ # Vite source mapping plugin
β βββ bridge/ # Browser bridge script
βββ examples/
β βββ react-vite-app/ # React + Vite example
β βββ test-preview/ # Simple test server
βββ docs/ # Documentation
βββ scripts/ # Build and publish scripts
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ways to contribute:
- Report bugs and request features via GitHub Issues
- Improve documentation
- Add new framework examples
- Submit pull requests
Development workflow:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
| Setting | Description | Default |
|---|---|---|
aieye.devServerUrl |
Dev server URL | http://localhost:5175 |
aieye.framework |
Framework detection | auto |
aieye.screenshotQuality |
Screenshot quality (30-100) | 80 |
aieye.enableCDP |
Enable CDP mode (v1 only) | false |
Note: v2 uses the embedded webview by default. v1 (external browser) is still available for advanced use cases.
aiEye({
enabled: true, // Enable source mapping
enableHMR: true, // Track HMR updates
root: __dirname, // Project root
include: /\.(jsx|tsx|vue|svelte)$/, // Files to process
exclude: /node_modules/, // Files to exclude
attributePrefix: 'data-ae' // Attribute prefix
})AIEYE_URL=http://localhost:5173 # Dev server URL
AIEYE_MODE=playwright-launch # Connection modeSee docs/GETTING-STARTED.md for complete configuration guide.
| Framework | Support | Plugin |
|---|---|---|
| React (Vite) | β Full | Vite Plugin |
| Vue 3 (Vite) | β Full | Vite Plugin |
| Svelte (Vite) | β Full | Vite Plugin |
| React (CRA) | β Full | Babel Plugin |
| Next.js | Babel Plugin | |
| Angular | β Not yet | - |
| Plain HTML | β Supported | None needed |
See docs/GETTING-STARTED.md for framework-specific setup.
"Source mapping not working" β Ensure plugin is installed and dev server restarted β See docs/TROUBLESHOOTING.md#source-mapping-issues
"Not connected to browser" β Check dev server is running β Verify URL in settings β See docs/TROUBLESHOOTING.md#mcp-server-issues
"Element not found"
β Use aieye_find_elements to search
β Take screenshot to see what's actually there
β See docs/TROUBLESHOOTING.md#error-messages-explained
See docs/TROUBLESHOOTING.md for complete troubleshooting guide.
- β Core functionality
- β VS Code extension
- β External MCP server with 14 tools
- β Vite and Babel plugins
- β Comprehensive documentation
- β Example projects
- β Test coverage (90+ tests)
- β Embedded MCP Server - Runs in extension host
- β Webview Integration - Direct VS Code webview support
- β postMessage Protocol - Cross-origin communication
- β 90% Memory Reduction - 20MB vs 200MB
- β 75% Faster - Sub-50ms latency
- β All 14 Tools Working - Full compatibility
- β Automated Test Suite - 10/10 tests passing
- β Comprehensive Documentation - V2-IMPLEMENTATION-SUMMARY.md
- STDIO adapter for Claude Desktop
- Mode switching (v1 β v2)
- Fix MCP provider registration
- Additional MCP tool testing
- Performance profiling
- VS Code Marketplace publication
- NPM package publication
- Additional framework support (Angular, Solid)
- Multi-webview support
- Multi-page application support
- Mobile device preview
- Collaborative debugging
- Plugin ecosystem
See CHANGELOG.md for version history.
MIT Β© 2026 AI Eye Team
See LICENSE for details.
AI Eye builds on amazing open-source projects:
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find AI Eye useful, please consider giving it a star on GitHub! β
Built with β€οΈ for visual developers and AI agents
Get Started Β· Documentation Β· Examples Β· Contributing