Open Safari with specific profile through CLI open command

I use Safari profiles (e.g., "Work," "Personal") to separate browsing sessions. While I can manually switch profiles via the UI, I need to automate launching a specific profile through the terminal. Currently, the "open" command only starts Safari in the last active profile.

Ideally, Apple would support a native CLI solution such as open -a Safari --args --profile "Work" or a URL scheme like safari://?profile=Work to enable profile targeting automations. Applescript doesn't work for me as it requires permissions to "System Events".


Are there any plans to implement this? Happy to hear your thoughts.

Posted on Aug 9, 2025 04:05 PM

Reply
1 reply

Open Safari with specific profile through CLI open command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.