extension.config.* in dev, start, and preview.
Run a fork by name
These forks are first-class browser targets. Pass the name to--browser and Extension.js finds the installed binary on your system automatically, running it through its engine family’s launcher:
chromium:/firefox: prefixed fields resolve correctly (see Browser-specific manifest fields).
The
dev, build, start, and preview help output all list every fork
name. The start and preview lists leave out safari and webkit-based
because those two commands refuse Safari targets by design.Run a custom binary
To run a browser without a built-in locator, or to override the located binary, use one of these flags:--chromium-binary <path>--gecko-binary <path>(alias:--firefox-binary <path>)
- With no
--browser,--gecko-binaryalone runsgecko-based.--chromium-binaryalone keeps the browser namechromium. - Beside a
--browserof the other engine, such as--browser firefox --chromium-binary <path>, the command fails before any work. It answersE_INVALID_OPTIONwith statususage. - Both binary flags with no
--browserfail the same way. To run both binaries, pass--browser chromium-based,gecko-based. - A pinned binary that cannot run fails with
E_BROWSER_LAUNCH. - A pinned binary that exits before the extension loads fails with
E_BROWSER_EXITED. - Both messages name the pinned path and the flag or variable that pinned it.
- Both messages also say that the file may not be a browser.
- When the pinned binary cannot run, a
devserver keeps running. It tries the launch again on the next compile.
Binary capabilities
From the release after 4.3.0, a binary set in the config file follows these rules:
- It is read after the flag and before the binary variables.
- When that path is missing or cannot run, the error names the config key and file, for example
browser.chrome.chromiumBinary in extension.config.js. - A
chromiumBinaryis used only on Chromium targets, and ageckoBinaryonly on Gecko targets. A key for the other engine is left unused and is not an error. - A config key does not pick the browser. Name it with
--browser.
CLI examples
start and preview.
Find the binary path per OS
The binary flags expect an executable file. An invalid path fails fast with an error instead of launching.macOS
On macOS, an app such as/Applications/Brave Browser.app is a folder, not an executable. Pass the executable inside the bundle, at Contents/MacOS:
Windows
Quote the path and use forward slashes, which every shell accepts:C:\\Program Files\\....
Linux
Pass the executable that your package manager installed:which brave-browser to print the path when the binary is on your PATH.
Configure in extension.config.*
Target mapping behavior
Binary hints map to engine targets:chromiumBinary→chromium-basedgeckoBinary/firefoxBinary→gecko-based
Available browsers
Forks with a built-in locator run by name; anything else runs with a binary flag:Important constraints
-
chromium-basedrequires--chromium-binary(orchromiumBinaryin config). Without it the launch hard-exits with an error. There is no fallback to a system browser. -
gecko-based/firefox-basedrequire a validgeckoBinarypath. -
librewolfneeds remote debugging turned on once per machine. LibreWolf resetsdevtools.debugger.remote-enabledtofalseat every start, which overrides the profile Extension.js creates, so the launch checks~/.librewolf/librewolf.overrides.cfg(%USERPROFILE%\.librewolf\librewolf.overrides.cfgon Windows) and stops with the two lines to add when they are missing: - Invalid paths fail fast with a clear CLI/runtime error.
-
builddoes not accept binary flags. You can use binary-based launching only withdev,start, andpreview.
Binary variables
Set an environment variable to launch a named target from a specific binary, without touching config:
From the release after 4.1.39, every browser resolves its binary in one order. The flag comes first, then the variable, the managed binary, and the system install.
If the path does not exist or cannot run, the launch fails with
E_BROWSER_BINARY_INVALID instead of silently falling back. The identity card names the variable that chose the binary, as in (pinned with EDGE_BINARY). See How the binary is chosen.
Run without launching a browser
Sometimes the right browser count is zero, for example in containers, over SSH, or when you drive a browser yourself. Pass--no-browser to dev, start, or preview:
(no-browser mode) banner that names the output folder.
Load that dist/<browser> folder into a browser that you already run. In Chromium browsers, choose “Load unpacked” at chrome://extensions with Developer mode on. The loaded extension keeps updating on save. See dev for readiness synchronization with --wait.
To make this the default for a command, set noBrowser in config. The CLI flag wins over the config value:
Opt out of injected defaults
dev, start, and preview inject launch defaults into every session. One visible default is dark appearance. Chromium targets get the --force-dark-mode and --enable-features=WebUIDarkMode flags. Gecko targets get the matching dark preferences.
To keep your system appearance, list the flag in excludeBrowserFlags:
--force-dark-mode drops the whole appearance bundle, including the Gecko preferences. An exclude entry also matches by switch name, so --enable-features removes --enable-features=WebUIDarkMode. See Browser flags for the default flag list and the full exclusion rules.
Best practices
- Pair binaries with explicit browser target: Use
--browser=chromium-basedor--browser=gecko-basedfor predictable intent. - Use absolute paths: Avoid shell-dependent path resolution issues.
- Version-pin in continuous integration (CI) runners: Keep browser binary paths deterministic for automated checks.
- Combine with profile/flags carefully: Reuse the same profile and flag strategy used for named browser targets.
Next steps
- Learn more about Browser preferences.
- Learn more about Browser profile.

