Back to rankings

extension-js/extension.js

TypeScriptextension.js.org

The cross-browser extension framework.

webextensionbrowser-extensionclichrome-extensioncross-browseredge-extensionmanifest-v3playwrightpreactreactscaffoldstarter-template
Star Growth
Stars
5k
Forks
131
Weekly Growth
Issues
4
2k4k
Nov 2020Sep 2022Aug 2024Jul 2026
Artifactsnpmnpm install extension.js
README

Extension.js Version Downloads Stars CI Discord

The cross-browser extension framework. Build for Chrome, Edge, and Firefox with no build config required.

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

Works with npm, pnpm, yarn, bun, and deno.

Documentation · Templates · Examples · Discord

Why Extension.js

Browser extensions ship with the worst dev experience in modern web. Manifest V3 fragmentation, browser-specific quirks, no hot reload for content scripts, and a separate build pipeline for every target. Extension.js fixes that.

  • Hot Module Replacement for background, content, popup, and options scripts, including React, Vue, Svelte, and Preact components
  • Manifest V3 by default, with automatic adapters for Chrome, Edge, and Firefox targets
  • One CLI for Chrome, Edge, Firefox, and any Chromium or Gecko binary
  • Zero config, no webpack, no rollup, no plugins to maintain
  • First-class TypeScript, React, Vue, Svelte, and Preact support
  • Production builds with extension build --zip, ready for the Chrome Web Store and Firefox Add-ons
  • Drop-in for existing extensions with one devDependency

Watch it work

60-second demo

Or skip the install and try a live template in your browser.

How is this different

If you have used Plasmo, WXT, or CRXJS, here is what Extension.js does that the others do not:

Capability Extension.js
Run any GitHub sample directly extension dev https://github.com/.../sample
Managed browser binaries extension install firefox downloads an isolated build
Cross-browser HMR for content scripts Built in, no plugin glue
Production zip for the stores extension build --zip
Framework agnostic Vanilla, TS, React, Vue, Svelte, Preact, no lock-in
Custom Chromium and Gecko binaries --chromium-binary, --gecko-binary

Frameworks

ESNext TypeScript WASM React Vue Svelte Preact
ESNext
Try out
TypeScript
Try out
WASM
Try out
React
Try out
Vue
Try out
Svelte
Try out
Preact
Try out

Browsers

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>
# 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"
Chrome Edge Firefox Safari Chromium Gecko
Google Chrome
✅ Supported
Microsoft Edge
✅ Supported
Mozilla Firefox
✅ Supported
Apple Safari
🧪 Alpha
Chromium-based
✅ Supported
Gecko-based
✅ Supported

Ship to the store

Build a production-ready bundle and zip it for submission to the Chrome Web Store, Edge Add-ons, or Firefox AMO:

# Production build
npx extension@latest build

# Production build packaged as a ZIP
npx extension@latest build --zip

# Per-browser builds
npx extension@latest build --browser=firefox --zip

Useful flags:

  • --zip packages the build into a ZIP ready for store upload
  • --zip-source includes source files for store source-code review
  • --zip-filename <name> controls the output filename
  • --polyfill enables the cross-browser webextension polyfill

Manage browser binaries

Skip the system-install dance. Extension.js can download and manage isolated browser binaries for clean dev sessions:

# Install a managed Firefox build
npx extension@latest install firefox

# Install Chrome and Edge in one go
npx extension@latest install --browser=all

# Print where managed browsers live
npx extension@latest install --where

Add to an existing extension

Install Extension.js as a dev dependency and wire up your scripts.

npm install extension@latest --save-dev
{
  "scripts": {
    "build": "extension build",
    "dev": "extension dev",
    "preview": "extension preview"
  }
}

Run npm run dev to develop, npm run build for production, and npm run preview to inspect the production output. See it in action.

Start from a Chrome sample

Pull any sample from Chrome Extension Samples and run it directly:

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

Watch demo

Community

  • Star the repo if Extension.js helped you ship faster
  • Join the Discord for help and feedback
  • Open issues and feature requests on GitHub
  • Browse production-ready examples

License

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

Related repositories
bitwarden/clients

Bitwarden client apps (web, browser extension, desktop, and cli).

TypeScriptnpmOtherwebextensionjavascript
bitwarden.com
13.3k1.9k
crimx/ext-saladict

🥗 All-in-one professional pop-up dictionary and page translator which supports multiple search modes, page translations, new word notebook and PDF selection searching.

TypeScriptnpmMIT Licensechromeextension
saladict.crimx.com
13.2k843
floccusaddon/floccus

:cloud: Sync your bookmarks privately across browsers and devices

JavaScriptnpmMozilla Public License 2.0owncloudnextcloud
floccus.org
8.2k311
tridactyl/tridactyl

A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.

TypeScriptnpmOtherhacktoberfestfirefox
tridactyl.xyz
6.3k432
FilipePS/Traduzir-paginas-web

Translate your page in real time using Google, Bing or Yandex

JavaScriptnpmMozilla Public License 2.0translatetranslation
addons.mozilla.org/firefox/addon/traduzir-paginas-web/
5.9k728
scriptscat/scriptcat

ScriptCat, a browser extension that can execute userscript; 脚本猫,一个可以执行用户脚本的浏览器扩展

TypeScriptnpmGNU General Public License v3.0userscriptchrome-extension
docs.scriptcat.org
4.9k367
Authenticator-Extension/Authenticator

Authenticator generates 2-Step Verification codes in your browser.

TypeScriptnpmMIT Licenseauthenticator2fa
authenticator.cc
4.6k1.1k
gdh1995/vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar

TypeScriptnpmOtherkeyboard-shortcutchrome-extension
chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
4.5k315
code-charity/youtube

YouTube / Video Browser-Extension. [Top1 FOSS.] Enrich your experience & choice! 🧰Smart features📌set & forget📌350+ tweaks. Longest-standing. Join🧩us?👨‍👩‍👧‍👧 ⋮ {playback|discovery|extra player buttons|quality|codec|full tab|full screen|no distraction|shorts}

JavaScriptnpmOtherextensionchrome-extension
improvedtube.com
4.5k965
libredirect/browser_extension

A browser extension that redirects popular sites to alternative privacy friendly frontends

JavaScriptnpmGNU General Public License v3.0firefox-extensionprivacy
libredirect.manerakai.com
4k144
EFForg/privacybadger

Privacy Badger is a browser extension that automatically learns to block hidden trackers

JavaScriptnpmOtherprivacyjavascript
privacybadger.org
3.8k431
antfu-collective/vitesse-webext

⚡️ WebExtension Vite Starter Template

TypeScriptnpmMIT Licensewebextensionvite
3.4k250