Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--pack-extension

What does --pack-extension do?

Packages an extension to a .crx installable file from a given directory.

Usage

CLILaunch Chrome with --pack-extension using CLI

chrome --pack-extension

PuppeteerLaunch Chrome with --pack-extension using Puppeteer

const browser = await puppeteer.launch({
  args: ['--pack-extension']
});

PlaywrightLaunch Chrome with --pack-extension using Playwright

const browser = await chromium.launch({
  args: ['--pack-extension']
});

SeleniumLaunch Chrome with --pack-extension using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--pack-extension')

driver = webdriver.Chrome(options=options)