Skip to main content
Use global flags to control CLI behavior consistently across commands, especially for telemetry and machine-readable output. Extension.js telemetry is intentionally anonymous and privacy-safe. It sends at most two event types (command_executed and command_failed). Each event carries command, success, and version, and create runs add template and source. Coarse environment facts ride along (os, arch, node_major, is_ci, is_source_build).

Global flag capabilities

Global options

--format is a deprecated alias for --output. It still works, and the CLI prints a deprecation warning on stderr once per run. The same applies to the older --wait-format alias. Flag misuse fails with a stable code: --no-reload outside dev and --no-browser outside dev/start/preview fail with E_FLAG_NOT_SUPPORTED_HERE. The removed --no-runner flag fails with E_REMOVED_FLAG, use --no-browser instead. You can also set no-browser mode per command in extension.config.js with commands.<command>.noBrowser: true. The CLI flag wins when both are present.

Optional boolean flags

Flags documented as [boolean] (for example, --polyfill, --zip, --zip-source, --silent, --wait, --install) accept an explicit value, so you can enable or disable them without a separate --no-* flag:
  • A bare flag enables it: extension dev --polyfill
  • false, 0, no, and off disable it: extension dev --polyfill false
  • true, 1, and yes enable it: extension build --zip true
This is useful for overriding a default set in extension.config.* from the command line, or for passing a computed value in a script (extension build --zip "$SHOULD_ZIP").

Telemetry opt-out options

You can disable telemetry in three ways (listed in precedence order):
Set EXTENSION_TELEMETRY_DISABLED=1 in continuous integration (CI) when policy requires no telemetry across all runs.

Practical examples

Disable telemetry for a CI build

Use this when policy requires explicitly disabling telemetry for automation runs.

Generate machine-readable help for tooling

Use this for AI tooling, wrappers, or scripts that parse command help output.

Keep readable help output for local debugging

Use pretty mode when you want assistant-friendly output that still reads well in terminal sessions.

Behavior notes

  • The CLI parses global flags before command-specific options.
  • See docs/TELEMETRY.md in the Extension.js repository and Telemetry and privacy for telemetry behavior and privacy details.
  • Use extension telemetry status to check the current consent state.
  • Command pages document command-specific flags separately.
  • You can combine global flags with command-specific options.
  • Automated tools (AI assistants and CI scripts) should read command readiness from dist/extension-js/<browser>/ready.json, not from terminal log parsing. See ready.json.

Next steps