Skip to main content

Documentation Index

Fetch the complete documentation index at: https://extension.js.org/llms.txt

Use this file to discover all available pages before exploring further.

Extension.js
Build browser extensions for Chrome, Edge, and Firefox with one modern workflow. Extension.js handles manifest compilation, browser-specific output, reload behavior, and packaging. Focus on product features instead of build tooling. Use familiar web tooling like TypeScript, React, Vue, and Tailwind CSS. Keep direct access to native extension APIs.
CLI version: Run extension --version (or npx extension@latest --version) for the build you are using. The extension package on npm lists the latest publish. GitHub releases track changelog-style notes without tying these docs to a specific patch number.

Video walkthrough

Choose your path

If you are…Start here
New to browser extensions altogetherWhat is a browser extension? and Create your first extension
Moving fast with AI tools and templatesTemplates and Get started immediately
A seasoned web developer new to extensionsCreate your first extension and Manifest
Debugging Manifest V3 service workersManifest V3 troubleshooting and Background scripts
Shipping production extensions across browsersCross-browser compatibility and Workflows overview

Choose the right command

GoalCommandExample
Scaffold a projectcreatenpx extension@latest create my-extension --template=new-react
Develop with watch modedevextension dev --browser=firefox
Build production artifactsbuildextension build --browser=chrome,firefox --zip
Build and launch production outputstartextension start --browser=edge
Launch existing build outputpreviewextension preview --browser=chrome

Start a new extension

Use the create command to scaffold a new project and --template to start from a stack-specific baseline.
npx extension@latest create <your-extension-name>
For a list of all supported templates, browse the Templates page.

Use Extension.js with an existing extension

If you already have an extension, install the extension package and wire scripts once. This keeps local development, testing, and release builds consistent.

Step 1: install the extension package as a devDependency

npm install extension@latest --save-dev
package.json
{
  "scripts": {
    "build": "extension build",
    "dev": "extension dev",
    "start": "extension start"
  },
  "devDependencies": {
    "extension": "latest"
  }
}
Done. Your extension is ready to use.
  • Run npm run dev for daily iteration and watch mode.
  • Run npm run start for production build + immediate launch.
  • Run npm run build for store-ready production artifacts.

Best practices

  • Keep one command flow: Use create β†’ dev β†’ build as your default loop.
  • Target browsers explicitly: Validate with --browser=chrome,firefox before release.
  • Centralize defaults: Put shared command/browser settings in extension.config.js.

Next steps

Create your first extension

Guided walkthrough for your first build.

Templates

Browse starter templates for every stack.

Playwright E2E

Add quality gates to your workflow.

Telemetry and privacy

Review the privacy contract.