How can I get the Chromium version of a particular Brave version via the command line?

Hi guys,

So I have the exact same question as the OP of this thread that was closed after 60 days due to inactivity. If I could simply reply to the last post in that thread, I would. But since it’s been closed, here’s my 2 cents on the matter.

The question is pretty straight-forward really…we want the Chromium version that a particular Brave version is based upon, not the Brave version number itself. These two numbers are very different, and can be used for different purposes.

For example, I am trying to run Selenium tests with Brave on my MacBook Pro for which the ChromeDriver version has to match the Chromium version of the browser exactly. I am also trying to automate the process of downloading this ChromeDriver version, so that no matter which version of Brave is installed, the correct ChromeDriver is downloaded when necessary.

To facilitate this, my Python program is basically doing the equivalent of running <path to Brave executable> --version in a terminal. But this currently gives me the Brave version number, not the Chromium version that I need!

Google suggests the existence of a --product-version argument that does this, but it doesn’t work for me. So is this currently possible or not? If not, could it please be implemented?

MTIA for reading this lengthy post and for your kind consideration of this matter :grinning_face:.

@CoopMeisterFresh due to the holidays there are going to be some delays before hearing back from anyone at Brave (they typically get Thanksgiving and the corresponding weekend off).

I don’t have a Mac and am clueless on what you’re trying to do. I was trying to do a bit of research after reading your post and deferred a bit to ChatGPT. I’m curious to hear if perhaps any of the bits below might work?



CHATGPT Answer Below:

Yes. There are a few reliable ways to get the Chromium version that Brave is using, even though Brave --version does not show it directly.

Below are the solutions that actually work today.


1. Use brave://version (works everywhere)

Brave exposes the Chromium version on its internal version page.

You can read it manually by opening this URL in Brave:

brave://version

You will see a line labeled “Chromium” with the exact version number.

If you need to extract it programmatically:

Mac example:

/Applications/Brave\ Browser.app/Contents/MacOS/Brave --user-data-dir=/tmp/brave-temp \
  --headless --disable-gpu --dump-dom brave://version

The dumped HTML contains the Chromium version, and you can parse it.

This is the most consistent method since Brave already exposes the number there.


2. Read the “Last Chromium Version” from Brave’s release metadata

Brave publishes release metadata for each version. The Chromium base version is always included.

You can grab it programmatically from their GitHub releases API:

Example for stable channel:

https://api.github.com/repos/brave/brave-browser/releases/latest

Look for a line in the release body like:

Chromium: 128.0.6613.119

This is guaranteed accurate since it is the number Brave used during the build.


3. Read it out of the Brave installation bundle (Mac specific)

On macOS, Brave includes a version.plist file inside the app bundle.

You can extract the underlying Chromium version like this:

defaults read "/Applications/Brave Browser.app/Contents/Info" LSCFBundleVersion

or sometimes in:

/Applications/Brave\ Browser.app/Contents/Frameworks/Brave\ Browser\ Framework.framework/Resources/version

That file usually contains the Chromium version string.


4. Use Selenium’s webdriver manager instead of matching manually

If they are using Python, they can avoid all of this entirely by using webdriver_manager which supports Brave. It automatically detects the matching driver.

Example:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

options = webdriver.ChromeOptions()
options.binary_location = "/Applications/Brave Browser.app/Contents/MacOS/Brave"

driver = webdriver.Chrome(
    ChromeDriverManager().install(),
    options=options,
)

The manager automatically inspects the installed browser to determine the correct driver version.

This is usually the simplest option for Selenium users.

1 Like

…And the “Quickest gun in the west” award goes to…Saoiray! :tada:

Thanks mate; really appreciate the super-fast response and the effort taken to understand something completely new to you! I did try using AI to do this myself, but I guess your prompt was better than mine…and I used Claude instead of ChatGPT, which is usually more accurate IME, but I guess you’ve proven that theory wrong!

Anyway its first two options definitely sound promising! I’ll give them a go and let you know how it works out.

I did try its third and fourth options before posting here, but with no luck. So yeah, parsing a HTML response sounds like the way to go! Wish me luck! :grinning_face:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.