Home

Documentation

Complete guide to creating, customizing, and publishing browser extensions with Extension Forge.

Getting Started

Extension Forge is an AI-powered platform that generates fully functional browser extensions from natural language descriptions. Whether you need a productivity tool, developer utility, or custom browser enhancement, our AI handles the boilerplate code so you can focus on functionality.

Quick Start (3 Steps)

  1. Describe your extension: Navigate to the Dashboard and enter a detailed description of what you want to build.
  2. Configure options: Choose extension type (popup, sidebar, new tab), permissions, and design preferences.
  3. Generate & Download: Click Generate, review the code, then download your extension.
Pro tip: The more detailed your prompt, the better the result. Instead of "a timer", try "a pomodoro timer with 25/5 minute cycles, dark theme, session counter, and browser notifications".

Example Prompts

  • "A bookmark manager that organizes links by category with drag-and-drop"
  • "A YouTube video speed controller with keyboard shortcuts"
  • "A reading time estimator that shows time-to-read on any article"
  • "A dark mode toggle that works on any website with custom color schemes"

Mastering Prompts

The quality of your extension depends heavily on how you describe it to the AI. Think of the AI as a junior developer: it knows how to write code, but it needs clear instructions on what to build.

The Anatomy of a Perfect Prompt

A great prompt typically includes four components:

  1. Goal: What is the main function? (e.g., "A cryptocurrency price tracker")
  2. UI/UX: How should it look? (e.g., "A popup with a large bold price, dark mode, and a refresh button")
  3. Logic: How does it work? (e.g., "Fetch data from CoinGecko API every 60 seconds")
  4. Permissions: specific needs (e.g., "Save user preferences for currency selection")

Bad Prompt

"Make a bitcoin tracker."

Too vague. The AI will guess the design and features, often leading to a generic result.

Good Prompt

"Create a popup extension that fetches the current Bitcoin price from the CoinGecko API. Display the price in large bold text. Include a settings page to switch between USD and EUR. Use a dark, modern theme."

Specific and actionable. Defines the API, features, and design style.

Extension Types

Extension Forge supports three main UI types that define how users interact with your extension. You can select multiple UI types for a single extension, allowing powerful combinations like a popup with a sidepanel.

New in v5.0: Even without framework build tools, our Standard Generator intelligently routes boilerplate HTML/CSS and manages multi-subdirectories for Popups, Options, and Panels natively!

UI Types

Popup

Opens when clicking the extension icon. Best for quick actions, toggles, and compact tools.

Side Panel

A persistent sidebar alongside web pages. Great for reference tools, AI assistants, and dashboards.

New Tab

Replaces the new tab page. Perfect for dashboards, start pages, or productivity hubs.

Feature Types

Additional capabilities that enhance your extension:

Content Scripts

Inject code into web pages to modify content, add features, or extract information. Runs in the context of the page.

DevTools Panel

Add custom panels to Chrome DevTools. Ideal for debugging tools, performance analyzers, and developer utilities.

Multi-UI Example: Create an extension with both a Popup (for quick toggles) and a Side Panel (for detailed controls). This provides users with flexible interaction options.

Customizing Your Project

After generation, you enter the Forge Core interface with multiple tabs:

  • Prompt Tab: Define your extension name, logo, and description.
  • Config Tab: Configure manifest settings, extension type, and icon.
  • Permissions Tab: Select required browser APIs and permissions.
  • Design Tab: Customize colors, typography, and visual style.
  • Output Tab: View generated code, live preview, and download controls.

WXT Architecture

Extension Forge projects are built on the WXT Framework, a next-generation toolchain that makes extension development feel like building a modern web app.

Why WXT?

  • Auto-Imports: No need to manually import `browser` or React hooks. WXT handles it for you.
  • HMR (Hot Module Reload): Changes to your code update the extension instantly without reloading.
  • File-System Routing: Files in `entrypoints/` automatically become extension pages.
  • TypeScript Support: Full type safety for the Web Extension APIs.

Project Structure Deep Dive

entrypoints/
├── popup/
│   ├── App.tsx       # The React UI for your popup
│   └── index.html    # Entry HTML
├── background.ts     # Service worker (background logic)
├── content.ts        # Content script logic
├── sidepanel/        # Side panel UI (if selected)
└── style.css         # Global styles (Tailwind directives)
wxt.config.ts        # WXT configuration file
Auto-Imports in Action: instead of import { browser } from 'wxt/browser', just use browser.runtime.sendMessage(...) anywhere in your code. It's globally available.

Permissions & Browser APIs

Chrome extensions require explicit permissions to access browser features. Common permissions include:

PermissionUse Case
storageSave user preferences and data locally
tabsAccess current tab URL, open/close tabs
activeTabRun scripts on the current page when clicked
notificationsShow browser notifications
alarmsSchedule recurring tasks and timers
contextMenusAdd items to the right-click menu
Request only what you need! Extensions with fewer permissions are more trustworthy to users and easier to get approved in the Chrome Web Store.

AI Integrations

Extension Forge integrates with state-of-the-art AI models to power intelligent features within your extensions. You can choose between Cloud Providers (via OpenRouter or Direct API) and Native AI (for total privacy and offline capability).

Supported Models & Providers

Cloud AI (OpenRouter)

  • OpenAIGPT-5.2 (Pro/Thinking/Codex), O1-Preview, GPT-4o
  • AnthropicClaude 4.5 (Opus/Sonnet/Haiku), Claude 4 Opus
  • GoogleGemini 3 (Flash/Pro/Deep Think), Gemini 2.5 Pro
  • Meta & OthersLlama 4 (Scout/Maverick), DeepSeek V3.2, Mistral Large 2

Native AI (Ollama)

  • Qwen 2.5 CoderState-of-the-art coding model (1.5B - 32B).
  • Gemma 2 (Google)Google's efficient local model (Default choice).
  • Llama 3.2 / MistralFast and robust general purpose models.
  • Chrome Built-inGemini Nano (Offline experimental API).
🔒 No Data Leaves Your Machine

Integration Guide (BYOK)

We use a Bring Your Own Key approach. The AI functionality behaves differently depending on whether it's used for Generation (making the extension) or Runtime (inside the extension).

1. For Generating Extensions

Configure your keys in the Settings menu of Extension Forge. These keys are stored locally in your browser and used only to write the code.

2. For Inside Your Extension

If you want your extension to call AI models (e.g. valid "Summarize this page"), follow these steps:

  1. Select the desired provider in the Integrations tab before generating.
  2. Once generated, open the .env file in the code editor.
  3. Paste your API keys into the corresponding variables (e.g., OPENAI_API_KEY).
  4. These keys will be securely injected into your extension's build integration.
Security Best Practice: When deploying public extensions, avoid embedding high-privilege keys. Instead, create a proxy server or ask users to input their own keys in your extension's Options page.
# .env file example (inside generated project)
VITE_OPENAI_API_KEY=sk-...
VITE_GEMINI_API_KEY=AIza...
VITE_ANTHROPIC_API_KEY=sk-ant-...

AI Refinement

After generating your extension, use the Refinement Console to make iterative improvements. Simply describe what you want to change and the AI will update your code.

Refinement Examples

  • "Make the button bigger and add a hover animation"
  • "Add a settings page where users can change the color theme"
  • "Fix the bug where data isn't saving between sessions"
  • "Add keyboard shortcut Ctrl+Shift+T to toggle the feature"
Use Ctrl+Enter to quickly send refinements.

Exporting & Installing

Click Export to download your extension as a ZIP file.

Install in Chrome/Edge

  1. Extract the downloaded ZIP file
  2. Open chrome://extensions in your browser
  3. Enable Developer Mode (toggle in top-right corner)
  4. Click Load Unpacked
  5. Select the extracted folder
For WXT/React-Vite projects, run npm install and npm run build first, then load the dist/ or .output/chrome-mv3 folder.

Technical Details

Projects generated by Extension Forge use modern web technologies:

  • Manifest V3: Latest Chrome extension standard with improved security
  • WXT Framework: Next-gen framework for web extensions with HMR support
  • React 18+: Component-based UI for popup/sidebar interfaces
  • Vite: Fast build tool for development and production
  • TailwindCSS: Utility-first styling for rapid UI development
  • TypeScript: Optional type safety for larger projects

Project Structure

my-extension/
├── manifest.json      # Extension configuration
├── popup.html         # Main popup interface
├── popup.js           # Popup logic
├── popup.css          # Popup styles
├── background.js      # Service worker (background tasks)
├── content.js         # Content script (page injection)
└── icons/             # Extension icons

Troubleshooting

Extension won't load

Check chrome://extensions for error messages. Common issues: missing manifest.json, syntax errors in JSON, or incorrect file paths.

Content script not running

Verify the matches pattern in manifest.json. Try "*://*/*" for all sites, or specific patterns like "*://example.com/*".

Storage not persisting

Ensure storage permission is enabled. Use chrome.storage.sync or chrome.storage.local to save data.

Popup closes too quickly

This is normal behavior—popups close when focus is lost. For persistent UI, consider using a side panel instead.

Inline Scripts Blocked (CSP Error)

Manifest V3 strictly forbids inline JavaScript (e.g., `<button onclick="...">`). All logic must be in separate `.js` or `.tsx` files. Extension Forge automatically handles this by bundling your code.

Service Worker Inactivity

Background scripts in Manifest V3 (Service Workers) go to sleep after ~30 seconds of inactivity.Do not use global variables to store state; use `chrome.storage` instead. Events (like alarms or listeners) will wake up the worker.

Need more help? Paste the error message into the Refinement Console and ask the AI to fix it!

Still have questions?

Check our FAQ