Install
Prerequisites
- Node.js 20 or later. ExtForge uses native ESM and requires the
fetchglobal available in Node 18+, but Node 20 LTS is the tested baseline. - A package manager. pnpm is recommended; npm, yarn, and bun all work.
- A Chromium-based browser for local testing (Chrome, Edge, or Brave). Firefox requires a separate profile. Safari requires Xcode.
Run extforge doctor after installing to confirm your environment is ready. See Verifying the install below.
Per-project install
Install extforge as a dev dependency in your project:
pnpm add -D extforgenpm install --save-dev extforgeyarn add --dev extforgebun add --dev extforgeGlobal install
A global install gives you extforge on your PATH for running extforge init outside a project directory.
pnpm add -g extforgenpm install -g extforgeyarn global add extforgebun add -g extforgeScaffolding a new project
Run extforge init with a project name to start the interactive wizard:
pnpm dlx extforge init my-extensionThe wizard asks:
| Prompt | Options |
|---|---|
| Extension name | Free text (letters, numbers, hyphens; max 45 chars) |
| Description | Free text |
| Version | Semver (e.g. 0.1.0) |
| UI framework | React, Vanilla |
| CSS framework | Tailwind CSS, Vanilla CSS, None |
| Target browsers | Chrome, Firefox, Edge, Safari (multi-select) |
| Extension features | Popup, Background, Content Script, Options Page, Side Panel |
| Permissions | Storage, activeTab, and others (multi-select) |
To skip the prompts and accept defaults (React, Tailwind, Chrome + Firefox, popup + background, storage + activeTab):
pnpm dlx extforge init my-extension --defaultsAfter the wizard completes, the project directory is ready. Install dependencies:
cd my-extension && pnpm installSee extforge init in the CLI reference for all flags.
Verifying the install
Check the version:
pnpm exec extforge --versionRun the environment check:
pnpm exec extforge doctorextforge doctor reports:
- Node.js version (✓ if 20+, ✗ if below)
- Package manager detected
extforge.config.tspresent and validicons/directory present with required sizes- HMR port 9100 availability
See extforge doctor for the full list of checks.
Loading the extension
Chrome
- Open
chrome://extensions. - Enable Developer mode (toggle in the top-right).
- Click Load unpacked and select
dist/chrome/in your project directory.
The extension loads immediately. The dev server prints the full path to dist/chrome/ on startup.
Firefox
- Open
about:debugging#/runtime/this-firefox. - Click Load Temporary Add-on.
- Select
dist/firefox/manifest.json(Firefox requires a file, not a directory).
Temporary add-ons are removed when Firefox restarts. For persistent loading, use a dedicated Firefox profile via extforge dev --browser firefox.
Edge
- Open
edge://extensions. - Enable Developer mode (left sidebar toggle).
- Click Load unpacked and select
dist/edge/.
Edge uses the same Chromium extension loader as Chrome.
Safari
Safari requires converting your extension using Apple’s tool before it can be loaded.
- Build the extension:
pnpm build. - Run the converter:
xcrun safari-web-extension-converter dist/chrome/ --project-location ./safari-ext --app-name MyExtension. - Open the generated Xcode project and run the app target on your Mac.
- In Safari, go to Settings → Extensions and enable the extension.