Addfox: A new open-source browser extension framework

(addfox.dev)

14 points | by gxy5202 2 days ago ago

6 comments

  • h4ch1 2 days ago

    How does this compare to WXT[0]? I recently built a new tab extension[1] which uses quite a few permissions and browser APIs and building for Chrome and Firefox was a non-thought with how seamless compilation and distribution was.

    It even separates the built extension code and the source and packages it nicely for firefox's review process.

    [0] https://wxt.dev [1] https://chromewebstore.google.com/detail/commander/pgfpnakgi...

    • Valodim 2 days ago

      There is a faq entry about that on tfa. The main differences are use of rsbuild (not a big diff down the line I expect, since vite uses rolldown now), and design to accommodate llm agentic development.

      • h4ch1 2 days ago

        I did read that LLM generated paragraph but I was thinking there was some architectural difference/some improvement to existing tooling.

        I don't mean to sound too dismissive but just slapping on rsbuild and well formatted errors + llms.txt doesn't seem that useful?

        • gxy5202 7 hours ago

          Yes, the overall framework design is different. This isn't just a superficial Vibe coding project (although AI was used in its development), but rather the result of my long-term experience developing browser plugins. Incidentally, I'm also the author of the browser extension Video Roll (https://videoroll.app). The main differences are as follows: 1. First, it's based on Rsbuild. If you install it via `pnpm create addfox-app`, you can quickly integrate unit tests (Rstest) and analytics reports (Rsdoctor), and use it simply with `addfox test` and `addfox dev --report`. 2. The extension supports three paradigms for entry point identification: first, automatic file-based identification (which needs to follow AddFox rules); second, it supports directly writing the source file address in various fields of the manifest (e.g., `background.service_worker: 'myBackground.ts'`); and third, it supports custom entries. 3. For automatic browser startup, a default address is set for most Chromium-based browsers (if no custom address was selected during browser installation), so you don't need to configure it to start automatically (supports Vivaldi, Opera, Arc, Yandex, etc.). 4. Using the Rsbuild plugin, if --debug is enabled, error monitoring code will be injected in dev mode, which will output errors such as content_script and background to the terminal, making it easy to directly copy and tell the AI without having to open the browser's devtools. 5. llms.txt/meta.md/error.md were generated, containing basic source information for the project, including the entry file, version used, framework, etc. These files will be useful if you are using Agent in conjunction with Skills for development.

          I agree that Vite and Rsbuild are just choices of build tools, and the difference in development experience may not be significant.

          AddFox is not a perfect framework and is still in a very early stage. WXT and Plasmo are both excellent; you just need to find the one that suits your needs. Thank you very much for trying it and providing feedback.

  • ramon156 2 days ago

    Wow a bunch of generated text that tells me everything is covered. Also using the same style as FF, along with suffixing kt with fox.

    I sure wonder where you got the inspiration from! (If there was any).

    • gxy5202 6 hours ago

      Thanks for the reply. I must mention that I am the author of the browser extension Video Roll (https://videoroll.app). Therefore, I've incorporated all my experience developing browser extensions into this framework. I initially used Parcel, then Plasmo and WXT; each has its advantages, but I created AddFox based on my own development habits. Regarding the name AddFox, I initially considered Extenzo(extension + enzo) and Addmo(Addon), but similar names already existed on NPM, and NPM no longer allows registration. So I chose AddFox(Addon + fox). I know it's somewhat similar to Firefox, but they are definitely not the same.