Can I open a new Brave window in a particular profile from the terminal?

Description of the issue:
How can I open a new Brave window in a particular profile from the terminal? MacOS, but bonus points for other platforms.

I’d like to be able to open a new Brave window from the terminal with a specified profile and set of tabs to open with. Is it possible?

Thanks in advance for any response!

Hello @7oby7

sure you can

open -a "Brave Browser.app" --profile-directory = "profile Name"

to get the profile name open brave and switch to the required profile then go to brave://version/ the look for Profile Path it will be the last word of it so it be default and profile 1 and 2 and so on

by the way when you want to look for command in brave search for it in chrome and it will work

and here command line and flags available https://support.brave.com/hc/en-us/articles/360044860011-How-Do-I-Use-Command-Line-Flags-in-Brave-

hope that help and have a nice day :slight_smile:

1 Like

Thanks so much for this response. I tried out the commands you gave me, but I still struggled to get it to work. I’ll outline below:

  1. I had to add a --args to make the open command happy:

open -a "Brave Browser.app" --args --profile-directory=$PROFILE_PATH

  1. When the Brave process isn’t running yet, this command doesn’t launch Brave on my Mac (shown in video below)
  2. When the Brave process is running, it opens the last used window, not a new window
  3. When the Brave process is running, this command ignores the --profile-directory argument and opens the most recently used profile

Maybe it is some issue with my script? Grateful again for any pointers :pray:t2:

Link to video demo of the above: https://youtu.be/RhAOgPwQCpU

Hello @7oby7

i think the issue here --profile-directory=$PROFILE_PATH replace it with the profile name like Default or profile one and so on i guess this $PROFILE_PATH mean the path of your mac profile not the profile of the brave

sorry for late replay
hope that help and have a nice day :slight_smile: