I can open a new single instance using open -na "Firefox" --args --new-window "https://website.com" however I can't seem to get my script to open a second tab populated with a second url address after that. It only opens with the first site and a blank tab


Set an alias to the executable inside Firefox.app.

alias firefox_cli=/Applications/Firefox.app/Contents/MacOS/firefox
firefox_cli --new-tab "site1"
firefox_cli --new-tab "site2"

For more help, run

firefox_cli --help

To remove alias,

unalias firefox_cli

I figured it out. Hope this is found useful

open -na "Firefox" --args --new-window "https://website1.com";
sleep 3
open "https://website2.com";

The sleep allows for a pause in between the 2 commands and seems to work. Please add a better solution if you know one.

You must log in to answer this question.

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