...
github-icon
GitHub
4.41kstar-icon
Created 5 years ago, last commit a day ago
22 contributors
1.08k commits
Stars added on GitHub, month by month
8
9
10
11
12
1
2
3
4
5
6
7
2024
2025
Stars added on GitHub, per day, on average
Yesterday
+5star-icon
Last week
+2.1
star-icon /day
Last month
+1.7
star-icon /day
Last 12 months
+2.2
star-icon /day
npmPackage on NPM
Monthly downloads on NPM
8
9
10
11
12
1
2
3
4
5
6
7
2024
2025
README

The cross-browser extension framework

Extension.js Version Downloads workflow coverage discord

Logo

Extension.js makes it very easy to develop cross-browser extensions.
Developers prefer it for its fast builds, unified interface, and zero configuration setup.

Create A New Extension

Use the create command to generate a new extension. Also works with pnpm, yarn, and bun.

npx extension@latest create my-extension
cd my-extension
npm run dev

Watch Demo

create-a-new-extension.mp4

Web Standards and Framework Support

ESNext
latest
TypeScript
latest
WASM
latest
React
18+
Vue
3+
Svelte
5+
Preact
10+
Angular
👋
Solid
👋

👋 = PR Welcome!

Get Started Immediately

Start developing an extension using a sample from Chrome Extension Samples

See the example below where we request the sample page-redder from Google Chrome Extension Samples.

Watch Demo

chrome-extension-sample-page-redder-on-edge.mp4

Try Yourself

npx extension@latest dev https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/sample.page-redder --browser=edge

I have An Extension

If you have an existing extension which is using a package manager, you can install the Extension.js package and manually create the scripts used to run your extension.

See How It Works

usage-with-an-existing-extension.mp4

Step 1 - Install extension as a devDependency

npm install extension@latest --save-dev

Step 2 - Link your npm scripts with the executable Extension.js commands

{
  "scripts": {
    "build": "extension build",
    "dev": "extension dev",
    "preview": "extension preview"
  },
  "devDependencies": {
    // ...other dependencies
    "extension": "latest"
  }
}

Done. You are all set!

  • To develop the extension, run npm run dev.
  • To build the extension in production mode, run npm run build.
  • To visualize the extension in production mode, run npm run build and npm run preview.

Using a specific browser for development

Chrome browser
Edge browser
Firefox browser
Opera browser
☑️
Safari browser
Chromium-based
☑️
Gecko-based
☑️
Firefox (Android)
Safari (iOS)

Browser flags and custom binaries

Use these flags with extension dev, extension start, or extension preview:

  • Select a browser: --browser <chrome | edge | firefox>
  • Custom Chromium binary: --chromium-binary <path-to-binary>
  • Custom Gecko (Firefox) binary: --gecko-binary <path-to-binary>

Examples:

# Chrome (system default)
npx extension@latest dev --browser=chrome

# Edge
npx extension@latest dev --browser=edge

# Custom Chrome/Chromium path
npx extension@latest dev --chromium-binary "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# Custom Firefox path
npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacOS/firefox"

License

MIT (c) Cezar Augusto and the Extension.js Authors.