# Visual vibe coding. Right in your codebase.
npm install @frontextai/agent-interface  
frontext is a browser toolbar that connects your frontend UI to your code ai agents in your code editor.
* π§ Select any element(s) in your web app
* π¬ Leave a comment on it
* π‘ Let your AI-Agent do the magic
> Perfect for devs tired of pasting folder paths into prompts. frontext gives your AI real-time, browser-powered context.
The frontext Toolbar makes it incredibly easy to edit your frontend code with AI agents:
* β‘ Works out of the box
* π§© Customise and extend functionality with Plugins
* π§ Sends DOM elements & more metadata to your AI agent
* π§ͺ Comes with examples for React, Vue, Svelte and more
Install the extension from the extension store of your code editor:
- Cursor: cursor:extension/frontext.frontext-vscode-extension
- VS Code: vscode:extension/frontext.frontext-vscode-extension
- Trae: trae:extension/frontext.frontext-vscode-extension
- Windsurf: windsurf:extension/frontext.frontext-vscode-extension
> [!TIP]
> πͺ AI-Assisted Setup (recommended):
> 1. In Cursor, Press CMD + Shift + P
> 2. Enter setupToolbar
> 3. Execute the command and the toolbar will init automatically π¦
Or follow the Manual Setup:
Install @frontext/toolbar:
``bash`
pnpm i -D @frontext/toolbar
Inject the toolbar into your app dev-mode:
`ts
// 1. Import the toolbar
import { initToolbar } from '@frontext/toolbar';
// 2. Define your toolbar configuration
const frontextConfig = {
plugins: [],
};
// 3. Initialize the toolbar when your app starts
// Framework-agnostic approach - call this when your app initializes
function setupStagewise() {
// Only initialize once and only in development mode
if (process.env.NODE_ENV === 'development') {
initToolbar(frontextConfig);
}
}
// Call the setup function when appropriate for your framework
setupStagewise();
`
> β‘οΈ The toolbar will automatically connect to the extension!
The toolbar should appear in the bottom right corner of your web app. If not, please reach out via Discord.
For easier integration, we provide framework-specific NPM packages that come with dedicated toolbar components (e.g., ). You can usually import these from @frontext/toolbar-[framework-name].
React.js
We provide the @frontext/toolbar-react package for React projects. Initialize the toolbar in your main entry file (e.g., src/main.tsx) by creating a separate React root for it. This ensures it doesn't interfere with your main application tree.
`tsx
// src/main.tsx
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.tsx';
import { StagewiseToolbar } from '@frontext/toolbar-react';
import './index.css';
// Render the main app
createRoot(document.getElementById('root')!).render(
);
// Initialize toolbar separately
const toolbarConfig = {
plugins: [], // Add your custom plugins here
};
document.addEventListener('DOMContentLoaded', () => {
const toolbarRoot = document.createElement('div');
toolbarRoot.id = 'frontext-toolbar-root'; // Ensure a unique ID
document.body.appendChild(toolbarRoot);
createRoot(toolbarRoot).render(
);
});
`
Next.js
Use the @frontext/toolbar-next package for Next.js applications. Include the component in your root layout file (src/app/layout.tsx).
`tsx
// src/app/layout.tsx
import { StagewiseToolbar } from '@frontext/toolbar-next';
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
Nuxt.js
For Nuxt.js projects, you can use the
@frontext/toolbar-vue package. Place the component in your app.vue or a relevant layout file.`vue
// app.vue
`
Vue.js
Use the
@frontext/toolbar-vue package for Vue.js projects. Add the component to your main App component (e.g., App.vue).`vue
// src/App.vue
`
SvelteKit
For SvelteKit, you can integrate the toolbar using
@frontext/toolbar and Svelte's lifecycle functions, or look for a dedicated @frontext/toolbar-svelte package if available. Create a component that conditionally renders/initializes the toolbar on the client side (e.g., src/lib/components/StagewiseToolbarLoader.svelte or directly in src/routes/+layout.svelte).Using
onMount in +layout.svelte (with @frontext/toolbar):
`svelte
`Using a loader component (example from repository):
The example repository uses a
ToolbarLoader.svelte which wraps ToolbarWrapper.svelte. ToolbarWrapper.svelte would then call initToolbar from @frontext/toolbar.`svelte
{#if browser}
{/if}
`
You would then use StagewiseToolbarLoader in your src/routes/+layout.svelte.
π€ Agent support
| Agent | Supported |
| -------------- | -------------- |
| Cursor | β
|
| GitHub Copilot | β
|
| Windsurf | β
|
| Cline | β
|
| Roo Code | β
|
| Kilo Code | β
|
| Trae | β
|
π£οΈ Roadmap
Check out our project roadmap for upcoming features, bug fixes, and progress.
π License
frontext is developed by tiq UG (haftungsbeschrΓ€nkt) and offered under the AGPLv3 license.
For more information on the license model, visit the FAQ about the GNU Licenses.
For use cases that fall outside the scope permitted by the AGPLv3 license, feel free to π¬ Contact Us.
π€ Contributing
We're just getting started and love contributions! Check out our CONTRIBUTING.md guide to get involved. For bugs and fresh ideas, please Open an issue!
π» Test frontext locally
1.
git clone https://github.com/frontext-io/frontext && cd frontext
2. pnpm i && pnpm dev
3. Open the frontext project in your IDE
4. Uninstall/ Disable the official frontext extension
5. Press F5 (a new IDE window with the local extension-version installed will open up)
6. Visit http://localhost:3002
> You will see a next.js example application with the frontext-toolbar already set up.
> It will be connected to the local vscode-extension in apps/vscode-extension` and reflect all the extension-changes you apply locally.* πΎ Join our Discord
* π Open an issue on GitHub for dev support.
Got questions or want to license frontext for commercial or enterprise use?
π§ sales@frontext.io