Chrome Flags Reference

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

--native-messaging-connect-host

What does --native-messaging-connect-host do?

Requests a native messaging connection be established between the native messaging host named by this switch and the extension with ID specified by kNativeMessagingConnectExtension.

Usage

CLILaunch Chrome with --native-messaging-connect-host using CLI

chrome --native-messaging-connect-host

PuppeteerLaunch Chrome with --native-messaging-connect-host using Puppeteer

const browser = await puppeteer.launch({
  args: ['--native-messaging-connect-host']
});

PlaywrightLaunch Chrome with --native-messaging-connect-host using Playwright

const browser = await chromium.launch({
  args: ['--native-messaging-connect-host']
});

SeleniumLaunch Chrome with --native-messaging-connect-host using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--native-messaging-connect-host')

driver = webdriver.Chrome(options=options)