WrAIter is a Chrome browser extension designed to enhance text editing on any webpage by providing AI-powered suggestions. I wrote it because it's a functionality I was missing myself, but also to learn vibe-coding. It allows users to select editable text, access a popup interface, and receive AI-generated alternatives based on their specific queries. The extension supports multiple AI models, including various Gemini and OpenAI GPT variants, and offers features like customizable quick queries, optional context input, and token usage tracking.
You can install WrAIter from its page on the Chrome web store.
- Node.js and npm
- Chrome browser
- API keys for desired AI providers
- Install dependencies:
npm install - Development mode:
npm run watch - Production build:
npm run build
After building the extension with npm:
- Open Chrome and navigate to
chrome://extensions/. - Enable "Developer mode" by toggling the switch in the top right corner.
- Click the "Load unpacked" button in the top left corner.
- Select the
distfolder from your project directory. - The extension should now appear in your list of extensions and be ready to use.
- Language: JavaScript (ES6+)
- Bundler: Webpack
- Styling: CSS3
- AI Integration: Gemini & OpenAI APIs
WrAIter/
├── dist/ # Bundled files
├── src/ # Source files
│ ├── assets/ # Static assets
│ │ └── icons/
│ ├── background/ # Background script
│ ├── content/ # Content script
│ ├── options/ # Options page
│ ├── popup/ # Popup interface
│ ├── shared/ # Shared utilities
│ └── manifest.json # Extension manifest
├── .gitignore
├── AGENTS.md
├── package.json
├── package-lock.json
└── webpack.config.js
- Popup (
popup/): Main user interface for input, displaying suggestions, and user interaction. - Content Script (
content/): Injected into webpages to handle text selection and apply changes. - Background Script (
background/): Manages extension state, communication between components, and API requests. - Options Page (
options/): Configuration interface for API keys, quick queries, and settings. - AI Service (
shared/ai_service.js): Module for interacting with various AI model APIs.
- User selects text on a webpage.
- Popup opens and displays selected text.
- User enters query and optional context.
- Background script processes request with AI service.
- Suggestions are displayed in popup.
- User selects and applies desired suggestion.
- Content script updates the webpage.

