# Infa Capture

> A browser element selector that grabs a component's context and hands it to your clipboard, a comment, or AI.

Source: https://infa.ai/docs/infa-capture

Infa Capture is available on all Infa plans (Free, Pro, and Enterprise).

Infa Capture is a lightweight browser overlay that lets you point at any element in your running app, capture its context — page url, element xpath, component name, props, and source file — and send it where it needs to go. It is the same element selector the Infa CLI serves into your local preview, published as the standalone [`infa-capture`](https://github.com/infa-ai/Infa-capture) package.

## Overview

We at Infa built Capture so the gap between "I see this component" and "I can act on it" disappears. You open the overlay, click an element, and pick what to do with it.

- **Evolve**: Copy the selected element's context to your clipboard to paste into any AI tool
- **AI**: Build a ready-to-send AI prompt from the context plus your question
- **Comment**: Leave feedback anchored to the element — posted to your board or a Slack channel

## Opening the overlay

When the Infa CLI is running (`infa preview`), the overlay is injected into your app automatically. You trigger it with a keyboard shortcut:

- macOS: Cmd+Shift+G
- Windows and Linux: Ctrl+Shift+G

Hover to highlight an element, click to select it, then choose a mode in the panel.

## Modes

| Mode | What it does | Needs an account |
| --- | --- | --- |
| Evolve | Copies a context block (url, xpath, component, props, source, code) to your clipboard | No |
| AI | Assembles an AI prompt from the context and your question, then copies it | No |
| Comment | Sends feedback anchored to the element to your board, or to a Slack webhook | Comment-to-board only |

Press Shift+Tab to cycle modes, or run the active mode with Cmd/Ctrl+Enter.

### Manage context

Every mode shows a "Manage context" card with a checkbox for each piece of captured data — the page url, the element xpath, the component, its source file, the file hierarchy, props, and code. You untick anything you do not want to share, so the payload carries exactly what you intend.

## AI mode

AI mode turns a selection into a prompt you can paste into Claude, Cursor, ChatGPT, or any MCP-aware client. By default the prompt points the receiving AI at the Infa MCP server so it can read your board directly.

**Configurable prompt**
Teams can replace the default with their own template — see Configuring the AI prompt below.

### Configuring the AI prompt

Set `ai.prompt` in your repo's `.infa/config.yml`. The template supports these placeholders, substituted when you copy:

| Placeholder | Replaced with |
| --- | --- |
| `{context}` | the selected element's context block |
| `{question}` | what you typed in AI mode |
| `{board_id}` | the connected board id |
| `{paper_id}` | the current paper id |

```yaml title=".infa/config.yml"
ai:
  prompt: |
    You are helping with the ACME design system. Use our docs at https://acme.dev/docs.

    {context}

    Task:
    {question}
```

If `ai.prompt` is not set, Capture uses a built-in default that installs and uses the Infa MCP server from https://infa.ai/docs/mcp.

## Using it without the CLI

Capture ships as an npm package you can host yourself:

```bash
npm install infa-capture
```

It exposes the built overlay (`infa-capture/grab.js`) plus a small helper to serve it. The host you serve it from provides the backend for the comment and AI actions, while the evolve and AI clipboard flows work entirely on the client.

## Related Topics

- [Infa CLI](https://infa.ai/docs/infa-cli)
- [Installation](https://infa.ai/docs/infa-cli-installation)
- [MCP Server](https://infa.ai/docs/mcp)
