Skip to content

Repository files navigation

Addfox

Addfox

The browser extension framework built on Rstack.
Fast builds, real HMR, powerful browser launching β€” one project for Chrome & Firefox.

GitHub stars npm version npm downloads MIT license
Documentation Β· npm Β· Benchmark Β· Skills Β· English | δΈ­ζ–‡

Why Addfox?

  • Rstack performance β€” built on Rsbuild (Rspack): fast cold starts, fast HMR, fast production builds.
  • Real HMR everywhere β€” background, content scripts, popup, options… all hot-reload, no manual extension refresh.
  • Powerful browser launching β€” auto-detects and launches Chromium browsers and Firefox, with profile and cache control built in.
  • Any UI framework β€” Vue, React, Preact, Svelte, Solid, or vanilla. No wrappers, no adapters.
  • One project, every browser β€” shared codebase with per-browser manifest overrides.

Benchmarks

The same extension project, built with each framework (lower is better):

Framework Build tool Dev startup Production build Output size
Addfox 0.2.9 Rsbuild 2.2.1 1.56s 1.04s 837KB
WXT 0.21.4 Vite 8.1.2 1.99s 1.64s 810KB
Extension.js 4.1.5 Rspack 2.2.1 2.86s 1.61s 1.91MB
Plasmo 0.90.5 Parcel 2.9.3 2.91s 2.54s 1.37MB

Benchmarked on identical projects; results may vary with project complexity. Methodology & reproduction: addfox/benchmark.

How it compares

WXT (Vite), Plasmo (Parcel), and Extension.js (Rspack) are all excellent tools. Addfox carves its own path:

Solution Build tool Dev experience Flexibility
Plasmo Parcel Out-of-the-box Convention-based, with cloud features
WXT Vite Out-of-the-box Convention-based, with plugin ecosystem
Extension.js Rspack Out-of-the-box Zero-config, minimal setup
Addfox Rsbuild Out-of-the-box Minimal conventions, full Rsbuild ecosystem

Where Addfox is different:

  • Rsbuild speed β€” fastest dev startup and build in its class (see benchmarks above).
  • Full Rstack ecosystem β€” Rsdoctor bundle analysis and Rstest testing built in.
  • Maximum freedom β€” no enforced file structures or custom APIs; use your preferred patterns.
  • AI-ready β€” generates llms.txt metadata, streams runtime errors to the terminal (--debug), and supports skills for AI-assisted workflows.

Features

πŸ”₯ Fast dev + HMR Dedicated reload plugin; content scripts and background hot-update
πŸš€ Browser launcher Auto-detect & launch Chromium / Firefox; profile and cache control; --keep-browser-profile
πŸ“ File-based entries Auto-discovers app/ entries (background / content / popup / options / sidepanel / devtools)
🌐 Cross-browser Chromium browsers + Firefox, per-browser manifest overrides
βš›οΈ Any framework Vanilla, Vue, React, Preact, Svelte, Solid β€” TS or JS
🧩 Content UI Built-in createContentUI: Iframe, Shadow DOM, or inline injection
πŸ“¦ Zip on build addfox build outputs the extension and a store-ready zip
πŸ§ͺ Testing addfox test forwards to Rstest for unit and e2e workflows
πŸ“Š Bundle analysis --report generates Rsdoctor reports in dev/build
πŸ” Env control Loads .env, exposes variables via envPrefix rules
πŸ€– AI-ready llms.txt metadata, terminal error output, skills integration

Architecture

Addfox wraps Rsbuild with extension-specific plugins; build output loads directly in Chrome or Firefox.

addfox β†’ Rsbuild β†’ Extension β†’ Browsers

Quick start

New project:

npx addfox@latest create
# or: pnpm dlx addfox@latest create
# or: pnpm create addfox-app (legacy)

Pick a framework, language, package manager, and entries β€” a full project with addfox.config is generated. Then:

cd my-extension
pnpm dev

Edit app/popup/index.tsx, save, and the extension reloads itself.

Existing project:

pnpm add -D addfox

Add addfox.config.ts and entries under app/. Then:

  • addfox dev β€” dev server with watch + HMR
  • addfox build β€” output to .addfox/extension (plus optional zip)

Use -b chrome or -b firefox to pick a target browser.

Examples

The examples/ directory contains ready-to-run projects: React, Vue, Svelte, Solid, content UI, devtools, i18n, env vars, Firefox targets, and more.

Repository structure

addfox/
β”œβ”€β”€ packages/            # Monorepo packages
β”‚   β”œβ”€β”€ addfox/          # The `addfox` npm package (CLI entry)
β”‚   β”œβ”€β”€ cli/             # @addfox/cli β€” dev / build / test commands
β”‚   β”œβ”€β”€ core/            # @addfox/core β€” config resolution & Rsbuild pipeline
β”‚   β”œβ”€β”€ launcher/        # @addfox/launcher β€” browser detection & launch
β”‚   β”œβ”€β”€ plugins/         # Rsbuild plugins (HMR, manifest, zip, …)
β”‚   └── create-addfox-app/  # Project scaffolding
β”œβ”€β”€ examples/            # Example extensions (React, Vue, Svelte, …)
β”œβ”€β”€ e2e/                 # Playwright end-to-end tests
└── docs/                # Documentation site source (https://addfox.dev)

Contributing

Issues and pull requests are welcome at github.com/addfox/addfox. When reporting a bug, please include steps to reproduce, expected vs actual behavior, and your browser / OS details.

Show your support

If Addfox makes your extension development easier, give us a ⭐ on GitHub β€” it helps more developers discover the project.

License

MIT


Full docs, config reference, and guides: https://addfox.dev Skills (AI workflow modules): https://github.com/addfox/skills

About

🧩 Accelerate your browser extension development. Built on Rsbuild β€” fast, simple, and free

Topics

Resources

Stars

120 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages