I can open the homepage for a Homebrew formula by running the command-line:

brew home <formula>

and for a Homebrew Cask by running the following command-line:

brew home --cask <cask>

How can I see just the homepage URL on the command-line?

How do I open the hyperlink in a specific Web-browser?

1 Answer 1


The homepage URL is a part of the output of brew info FORMULA, so you can run:

brew info FORMULA | grep -E '^https?:'

to extract just the link to the homepage. This also allows to run:

open -a Firefox.app "$(brew info FORMULA | grep -E '^https?:')"

to open the link in Firefox.app.

The respective command-lines for Homebrew Cask are:

brew info --cask CASK | grep -E '^https?:'


open -a Firefox.app "$(brew info --cask CASK | grep -E '^https?:')"
  • @NimeshNeema Not sure it needs -E here, works without as well.
    – nohillside
    Commented May 20, 2020 at 11:01
  • That's really strange. I originally tried without -E but it didn't appear to work. I read though the man page and tried adding support for extended regular expression and it worked. I am using the Apple installed grep in macOS 10.15.4 with version grep (BSD grep) 2.5.1-FreeBSD. Additionally, I also have Xcode Command Line Tools installed.
    – Nimesh Neema
    Commented May 20, 2020 at 11:24
  • I stand corrected, thanks for spotting this. So much for making a "small" change when copying the working solution from Terminal into the browser...
    – nohillside
    Commented May 20, 2020 at 11:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .