|
| 1 | +# Claude DevTools |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +**Fix your frontend code right from DevTools.** |
| 6 | + |
| 7 | +Pick a component, write your prompt, and send it directly to a Claude session—without leaving the page. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Quick Start |
| 12 | + |
| 13 | +### 1. Install the host server |
| 14 | + |
| 15 | +The host server runs in your project folder like the regular Claude CLI and listens on port `47923` for commands from the extension. |
| 16 | + |
| 17 | +```bash |
| 18 | +npm install -g @alexstrnik/claude-devtools |
| 19 | +# or |
| 20 | +pnpm add -g @alexstrnik/claude-devtools |
| 21 | +``` |
| 22 | + |
| 23 | +### 2. Install the Chrome extension |
| 24 | + |
| 25 | +**Option A: Download latest release** |
| 26 | +1. Go to [Releases](https://github.com/AlexStrNik/claude-devtools/releases/latest) |
| 27 | +2. Download `claude-devtools-extension-vX.X.X.zip` |
| 28 | +3. Extract the zip file |
| 29 | +4. Open Chrome → Extensions → Developer mode |
| 30 | +5. Click **Load unpacked** → select the extracted folder |
| 31 | + |
| 32 | +**Option B: Clone from source** |
| 33 | +1. Clone this repo: `git clone https://github.com/AlexStrNik/claude-devtools` |
| 34 | +2. Open Chrome → Extensions → Developer mode |
| 35 | +3. Click **Load unpacked** → select `chrome-devtools-extension` folder |
| 36 | + |
| 37 | +### 3. Start the host server |
| 38 | + |
| 39 | +```bash |
| 40 | +claude-devtools |
| 41 | +``` |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## How it works |
| 46 | + |
| 47 | +``` |
| 48 | +Web Page → Chrome Extension → Host Server → Claude Code PTY |
| 49 | +``` |
| 50 | + |
| 51 | +- **Chrome Extension**: Detects components and captures element data. |
| 52 | +- **Host Server**: Bridges your browser and Claude Code, manages the PTY, handles images, queues requests, and maintains persistent sessions. |
| 53 | +- **Claude Code**: Receives full context for debugging or live modifications. |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## Using Claude DevTools |
| 58 | + |
| 59 | +1. Start the host server (`claude-devtools`) |
| 60 | +2. Open DevTools → **Claude DevTools** tab |
| 61 | +3. Click **Pick Element** → select a component |
| 62 | +4. Write your prompt or question |
| 63 | +5. Hit **Send to Claude Code** |
| 64 | + |
| 65 | +Your element’s context is sent directly to Claude, including: |
| 66 | + |
| 67 | +- Component name (React or Angular) |
| 68 | +- Props |
| 69 | +- DOM slice |
| 70 | +- Computed styles |
| 71 | +- Screenshots (macOS only) |
| 72 | +- File path |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## Features |
| 77 | + |
| 78 | +- **React support**: Extracts component names, props, and source locations (React 18 & 19) |
| 79 | +- **Angular support**: Full component detection with props and source mapping (Angular 17) |
| 80 | +- **Screenshots**: Automatic element cropping for visual context (macOS only) |
| 81 | +- **Source mapping**: Maps compiled JS back to original TypeScript files |
| 82 | +- **Customizable context**: Include exactly what you need |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +## Development |
| 87 | + |
| 88 | +```bash |
| 89 | +# Clone repository |
| 90 | +git clone https://github.com/AlexStrNik/claude-devtools |
| 91 | + |
| 92 | +# Install host dependencies |
| 93 | +cd claude-devtools-host |
| 94 | +pnpm install |
| 95 | + |
| 96 | +# Start development server |
| 97 | +pnpm dev |
| 98 | + |
| 99 | +# Load extension in Chrome DevTools |
| 100 | +``` |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +## Examples |
| 105 | + |
| 106 | +- `react-example-18` – React 18 test app |
| 107 | +- `react-example-19` – React 19 test app |
| 108 | +- `angular-17` – Angular 17 test app |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Todo / Roadmap |
| 113 | + |
| 114 | +- Support more frameworks (currently React & Angular) |
| 115 | +- Add image support on Linux/Windows |
| 116 | +- Port control directly in extension UI |
| 117 | +- Improve React 19+ source path detection |
0 commit comments