Skip to content

Global flags

Flag reference

FlagApplies toDefaultDescription
--browserdev, build, packagechrome (dev) / all (build, package)Target browser. Must match a value in config.browsers.
--devbuildfalseBuild in development mode: source maps on, HMR client injected.
--sourcemapbuildfalseInclude source maps. Implied by --dev.
--strictbuildfalseTreat cross-browser compat warnings as errors. Exits 1 on any compat issue.
--quietdev, build, validate, doctorfalseSuppress info-level log output. Warnings and errors still print.
--verbosedevfalseLog every file change, the chosen reload strategy, and each message sent to clients.
--jsondev, build, validate, doctorfalseEmit newline-delimited JSON log objects. Human-readable output is suppressed.
--oncedevfalseRun a single dev build then exit. No watcher, no WebSocket server.
--portdev35729HMR WebSocket port. Overrides config.dev.port.
--hostdevlocalhostHMR host. Overrides config.dev.host.

Notes on --json

Each JSON line has at minimum { "level": "...", "message": "..." }. Some lines include "data" with structured context. The format is stable within a major version.

{"level":"info","message":"HMR server started on ws://localhost:35729"}
{"level":"warn","message":"EXT_COMPAT_UNSUPPORTED","data":{"api":"tabGroups.query","file":"src/background/index.ts","line":12}}

Notes on --strict

Without --strict, compat issues from the cross-browser scanner are logged as warnings and the build succeeds. With --strict, the first compat issue causes the build to exit 1.

Equivalent to setting dev.strictCompat: true in config for dev mode, or passing --strict per-command for build.


Exit codes

CodeMeaning
0Success. All builds or checks passed.
1Error. Build failed, config invalid, or doctor has at least one fail result.
130SIGINT received (Ctrl-C). The dev server or build was interrupted by the user.
143SIGTERM received. The process was terminated externally.

doctor exit code detail

extforge doctor exits 0 if no check has status fail. A check with status warn does not set a non-zero exit code. Use --json and jq to filter:

Terminal window
extforge doctor --json | jq '.results[] | select(.status == "fail")'