diff --git a/README.md b/README.md
index a3947d42c..531f41c87 100644
--- a/README.md
+++ b/README.md
@@ -3,23 +3,21 @@
[](https://npmjs.com/package/react-grab)
[](https://npmjs.com/package/react-grab)
-Select context for coding agents directly from your website
+Copy any UI element for your agent.
-How? Point at any element and press **⌘C** (Mac) or **Ctrl+C** (Windows/Linux) to copy the file name, React component, and HTML source code.
-
-It makes tools like Cursor, Claude Code, Copilot run up to [**3× faster**](https://react-grab.com/blog/intro) and more accurate.
+React Grab points agents to the actual source behind each selection, so edits are [**2× faster**](https://github.com/aidenybai/react-grab-bench) and more accurate.
### [Try out a demo! →](https://react-grab.com)
-## Install
+## Quick Start
-Run this command at your project root (where `next.config.ts` or `vite.config.ts` is located):
+Run this at your project root:
```bash
npx grab@latest init
```
-## Connect to MCP
+Optional: connect React Grab to your agents with MCP:
```bash
npx grab@latest add mcp
@@ -27,27 +25,46 @@ npx grab@latest add mcp
## Usage
-Once installed, hover over any UI element in your browser and press:
+Start your dev server, open your app, then hover any UI element and press:
- **⌘C** (Cmd+C) on Mac
- **Ctrl+C** on Windows/Linux
-This copies the element's context (file name, React component, and HTML source code) to your clipboard ready to paste into your coding agent. For example:
+React Grab copies that context to your clipboard, ready to paste into your agent.
-```js
+## What Agents Get
+
+React Grab includes the details agents need to edit the right file:
+
+- the rendered HTML for the element
+- the React component name
+- the source file and line number
+- the nearby source code, when available
+- the component stack
+
+Example:
+
+```txt
Forgot your password?
-in LoginForm at components/login-form.tsx:46:19
+
+// components/login-form.tsx:46
+ 45|
+> 46|
+ 47| Forgot your password?
+ 48|
+
+ in LoginForm (at components/login-form.tsx:46:19)
```
## Manual Installation
-If you're using a React framework or build tool, view instructions below:
+If you cannot use the CLI, install React Grab manually for your framework:
#### Next.js (App router)
-Add this inside of your `app/layout.tsx`:
+Add this inside your `app/layout.tsx`:
```jsx
import Script from "next/script";
@@ -190,19 +207,13 @@ actions: [
See [`packages/react-grab/src/types.ts`](https://github.com/aidenybai/react-grab/blob/main/packages/react-grab/src/types.ts) for the full `Plugin`, `PluginHooks`, and `PluginConfig` interfaces.
-## Resources & Contributing Back
-
-Want to try it out? Check out [our demo](https://react-grab.com).
-
-Looking to contribute back? Check out the [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md).
-
-Want to talk to the community? Hop in our [Discord](https://discord.com/invite/G7zxfUzkm7) and share your ideas and what you've built with React Grab.
-
-Find a bug? Head over to our [issue tracker](https://github.com/aidenybai/react-grab/issues) and we'll do our best to help. We love pull requests, too!
-
-We expect all contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md).
+## Links
-[**→ Start contributing on GitHub**](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Demo](https://react-grab.com)
+- [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Discord](https://discord.com/invite/G7zxfUzkm7)
+- [Issue tracker](https://github.com/aidenybai/react-grab/issues)
+- [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md)
### License
diff --git a/apps/storybook/README.md b/apps/storybook/README.md
index 1a2aad8b6..fa9fea560 100644
--- a/apps/storybook/README.md
+++ b/apps/storybook/README.md
@@ -1,6 +1,8 @@
# @react-grab/storybook
-Visual playground for React Grab's overlay system - renders the full `ReactGrabRenderer` on a sample page with Storybook controls for every user-facing state.
+Internal playground for React Grab's overlay UI.
+
+Storybook renders the full `ReactGrabRenderer` against mocked states and realistic playground pages, so overlay states can be inspected without running the e2e app.
Uses [Storybook 10](https://storybook.js.org/) with [`storybook-solidjs-vite`](https://github.com/nicolo-ribaudo/storybook-solidjs-vite).
@@ -29,13 +31,13 @@ Static build output is written to `storybook-static/`.
```
apps/storybook/
├── .storybook/
-│ ├── main.ts ← Storybook config
-│ └── preview.tsx ← global parameters & CSS import
+│ ├── main.ts Storybook config
+│ └── preview.tsx global parameters and CSS import
└── stories/
- ├── fixtures.ts ← preset comment items + menu actions
- ├── noop.ts ← no-op callback for handlers
- ├── *.stories.tsx ← Component stories (mock renderer states)
- └── playground/ ← Ad-hoc scenarios with real init() running
+ ├── fixtures.ts preset comment items and menu actions
+ ├── noop.ts no-op callback for handlers
+ ├── *.stories.tsx component stories with mocked renderer states
+ └── playground/ scenarios with real init() running
├── composite-dashboard.stories.tsx
├── freeze-demo.stories.tsx
└── live-updates.stories.tsx
@@ -43,9 +45,9 @@ apps/storybook/
## Two kinds of stories
-**Component stories** (toolbar, selection-label, context-menu, comments-dropdown, renderer) render the overlay with mocked props. They're single sources of truth for every user-facing state: idle, context menu, comment input, pending dismiss, etc.
+**Component stories** render toolbar, selection label, context menu, comments dropdown, and renderer states with mocked props. Use these to inspect specific UI states such as idle, context menu, comment input, and pending dismiss.
-**Playground stories** import `react-grab` for its side effect, so `init()` actually runs and hooks into the story DOM. They replace the former `apps/gym` and exist for ad-hoc hover/grab testing against realistic fixtures:
+**Playground stories** import `react-grab` for its side effect, so `init()` runs against the story DOM. Use these for ad-hoc hover and grab testing against realistic fixtures:
- **Composite Dashboard** - sidebar, metric cards, chart, and data table for dense-DOM selection testing
- **Freeze Demo** - bouncing animated timer for verifying freeze-animations + freeze-updates
diff --git a/packages/cli/README.md b/packages/cli/README.md
index a4a394620..0fcab7812 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,6 +1,8 @@
# @react-grab/cli
-Interactive CLI to install and configure React Grab in your project.
+CLI for installing React Grab, configuring its activation behavior, and connecting agents through MCP.
+
+The CLI detects supported React projects, applies the dev-only setup, and can reconfigure an existing installation without hand-editing framework files.
## Quick Start
@@ -12,7 +14,7 @@ npx grab@latest init
### `grab init`
-Initialize React Grab in your project. Auto-detects your framework and applies the necessary changes.
+Install React Grab in the current project. The CLI auto-detects the framework and applies the required development-only integration.
```bash
npx grab@latest init
@@ -29,7 +31,7 @@ npx grab@latest init
### `grab add`
-Connect React Grab to your coding agent via MCP.
+Configure the React Grab MCP server for your agent.
```bash
npx grab@latest add mcp
@@ -42,7 +44,7 @@ npx grab@latest add mcp
### `grab remove`
-Disconnect React Grab from your coding agent.
+Remove the MCP connection from your agent.
```bash
npx grab@latest remove mcp
@@ -55,7 +57,7 @@ npx grab@latest remove mcp
### `grab configure`
-Configure React Grab options. Runs an interactive wizard when called without flags.
+Update React Grab options. Runs an interactive wizard when called without flags.
```bash
npx grab@latest configure
@@ -96,9 +98,10 @@ npx grab@latest configure
## Supported Frameworks
-| Framework | Detection |
-| ---------------------- | ------------------------------------- |
-| Next.js (App Router) | `next.config.ts` + `app/` directory |
-| Next.js (Pages Router) | `next.config.ts` + `pages/` directory |
-| Vite | `vite.config.ts` |
-| Webpack | `webpack.config.*` |
+The CLI currently configures:
+
+- Next.js App Router
+- Next.js Pages Router
+- Vite
+- TanStack Start
+- Webpack
diff --git a/packages/grab/README.md b/packages/grab/README.md
index 44bc23190..0ac59cc70 100644
--- a/packages/grab/README.md
+++ b/packages/grab/README.md
@@ -3,23 +3,21 @@
[](https://npmjs.com/package/grab)
[](https://npmjs.com/package/grab)
-Select context for coding agents directly from your website
+Copy any UI element for your agent.
-How? Point at any element and press **⌘C** (Mac) or **Ctrl+C** (Windows/Linux) to copy the file name, React component, and HTML source code.
-
-It makes tools like Cursor, Claude Code, Copilot run up to [**3× faster**](https://react-grab.com/blog/intro) and more accurate.
+React Grab points agents to the actual source behind each selection, so edits are [**2× faster**](https://github.com/aidenybai/react-grab-bench) and more accurate.
### [Try out a demo! →](https://react-grab.com)
-## Install
+## Quick Start
-Run this command at your project root (where `next.config.ts` or `vite.config.ts` is located):
+Run this at your project root:
```bash
npx grab@latest init
```
-## Connect to MCP
+Optional: connect React Grab to your agents with MCP:
```bash
npx grab@latest add mcp
@@ -27,27 +25,46 @@ npx grab@latest add mcp
## Usage
-Once installed, hover over any UI element in your browser and press:
+Start your dev server, open your app, then hover any UI element and press:
- **⌘C** (Cmd+C) on Mac
- **Ctrl+C** on Windows/Linux
-This copies the element's context (file name, React component, and HTML source code) to your clipboard ready to paste into your coding agent. For example:
+React Grab copies that context to your clipboard, ready to paste into your agent.
-```js
+## What Agents Get
+
+React Grab includes the details agents need to edit the right file:
+
+- the rendered HTML for the element
+- the React component name
+- the source file and line number
+- the nearby source code, when available
+- the component stack
+
+Example:
+
+```txt
Forgot your password?
-in LoginForm at components/login-form.tsx:46:19
+
+// components/login-form.tsx:46
+ 45|
+> 46|
+ 47| Forgot your password?
+ 48|
+
+ in LoginForm (at components/login-form.tsx:46:19)
```
## Manual Installation
-If you're using a React framework or build tool, view instructions below:
+If you cannot use the CLI, install React Grab manually for your framework:
#### Next.js (App router)
-Add this inside of your `app/layout.tsx`:
+Add this inside your `app/layout.tsx`:
```jsx
import Script from "next/script";
@@ -190,19 +207,13 @@ actions: [
See [`packages/react-grab/src/types.ts`](https://github.com/aidenybai/react-grab/blob/main/packages/react-grab/src/types.ts) for the full `Plugin`, `PluginHooks`, and `PluginConfig` interfaces.
-## Resources & Contributing Back
-
-Want to try it out? Check out [our demo](https://react-grab.com).
-
-Looking to contribute back? Check out the [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md).
-
-Want to talk to the community? Hop in our [Discord](https://discord.com/invite/G7zxfUzkm7) and share your ideas and what you've built with React Grab.
-
-Find a bug? Head over to our [issue tracker](https://github.com/aidenybai/react-grab/issues) and we'll do our best to help. We love pull requests, too!
-
-We expect all contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md).
+## Links
-[**→ Start contributing on GitHub**](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Demo](https://react-grab.com)
+- [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Discord](https://discord.com/invite/G7zxfUzkm7)
+- [Issue tracker](https://github.com/aidenybai/react-grab/issues)
+- [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md)
### License
diff --git a/packages/react-grab/README.md b/packages/react-grab/README.md
index a3947d42c..531f41c87 100644
--- a/packages/react-grab/README.md
+++ b/packages/react-grab/README.md
@@ -3,23 +3,21 @@
[](https://npmjs.com/package/react-grab)
[](https://npmjs.com/package/react-grab)
-Select context for coding agents directly from your website
+Copy any UI element for your agent.
-How? Point at any element and press **⌘C** (Mac) or **Ctrl+C** (Windows/Linux) to copy the file name, React component, and HTML source code.
-
-It makes tools like Cursor, Claude Code, Copilot run up to [**3× faster**](https://react-grab.com/blog/intro) and more accurate.
+React Grab points agents to the actual source behind each selection, so edits are [**2× faster**](https://github.com/aidenybai/react-grab-bench) and more accurate.
### [Try out a demo! →](https://react-grab.com)
-## Install
+## Quick Start
-Run this command at your project root (where `next.config.ts` or `vite.config.ts` is located):
+Run this at your project root:
```bash
npx grab@latest init
```
-## Connect to MCP
+Optional: connect React Grab to your agents with MCP:
```bash
npx grab@latest add mcp
@@ -27,27 +25,46 @@ npx grab@latest add mcp
## Usage
-Once installed, hover over any UI element in your browser and press:
+Start your dev server, open your app, then hover any UI element and press:
- **⌘C** (Cmd+C) on Mac
- **Ctrl+C** on Windows/Linux
-This copies the element's context (file name, React component, and HTML source code) to your clipboard ready to paste into your coding agent. For example:
+React Grab copies that context to your clipboard, ready to paste into your agent.
-```js
+## What Agents Get
+
+React Grab includes the details agents need to edit the right file:
+
+- the rendered HTML for the element
+- the React component name
+- the source file and line number
+- the nearby source code, when available
+- the component stack
+
+Example:
+
+```txt
Forgot your password?
-in LoginForm at components/login-form.tsx:46:19
+
+// components/login-form.tsx:46
+ 45|
+> 46|
+ 47| Forgot your password?
+ 48|
+
+ in LoginForm (at components/login-form.tsx:46:19)
```
## Manual Installation
-If you're using a React framework or build tool, view instructions below:
+If you cannot use the CLI, install React Grab manually for your framework:
#### Next.js (App router)
-Add this inside of your `app/layout.tsx`:
+Add this inside your `app/layout.tsx`:
```jsx
import Script from "next/script";
@@ -190,19 +207,13 @@ actions: [
See [`packages/react-grab/src/types.ts`](https://github.com/aidenybai/react-grab/blob/main/packages/react-grab/src/types.ts) for the full `Plugin`, `PluginHooks`, and `PluginConfig` interfaces.
-## Resources & Contributing Back
-
-Want to try it out? Check out [our demo](https://react-grab.com).
-
-Looking to contribute back? Check out the [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md).
-
-Want to talk to the community? Hop in our [Discord](https://discord.com/invite/G7zxfUzkm7) and share your ideas and what you've built with React Grab.
-
-Find a bug? Head over to our [issue tracker](https://github.com/aidenybai/react-grab/issues) and we'll do our best to help. We love pull requests, too!
-
-We expect all contributors to abide by the terms of our [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md).
+## Links
-[**→ Start contributing on GitHub**](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Demo](https://react-grab.com)
+- [Contributing Guide](https://github.com/aidenybai/react-grab/blob/main/CONTRIBUTING.md)
+- [Discord](https://discord.com/invite/G7zxfUzkm7)
+- [Issue tracker](https://github.com/aidenybai/react-grab/issues)
+- [Code of Conduct](https://github.com/aidenybai/react-grab/blob/main/.github/CODE_OF_CONDUCT.md)
### License
diff --git a/packages/react-grab/e2e/element-context.spec.ts b/packages/react-grab/e2e/element-context.spec.ts
index 14a8ac337..8585833eb 100644
--- a/packages/react-grab/e2e/element-context.spec.ts
+++ b/packages/react-grab/e2e/element-context.spec.ts
@@ -208,4 +208,67 @@ test.describe("Element Context Fallback", () => {
expect(clipboard.length).toBeLessThanOrEqual(510);
});
});
+
+ test.describe("Source Snippet & Component Instance", () => {
+ test("surfaces the literal JSX call site so the agent sees the props the user wrote", async ({
+ reactGrab,
+ }) => {
+ await reactGrab.activate();
+
+ const todoItem = "[data-testid='todo-list'] ul li:first-child span";
+ await reactGrab.hoverElement(todoItem);
+ await reactGrab.waitForSelectionBox();
+ await reactGrab.clickElement(todoItem);
+
+ const clipboard = await reactGrab.getClipboardContent();
+ // TodoItem is rendered with ``
+ // in App.tsx. Either the source-snippet block or — when the source
+ // map fetch fails — the JSX-call fallback on the stack line must
+ // surface the call signature so the agent knows it's working with
+ // a TodoItem component, not a bare `