I keep my work and user profiles separate on my Mac. I wanted an easy way of opening a notion page to make a note using a macro on my Stream Deck. I often am in my user profile when I want to make a note, so I needed to open Chrome from the commandline using a particular one. Here’s how you do that.
open -a "Google Chrome" https://duckduckgo.com --args --profile-directory=Profile 2
The names Chrome uses for the
--profile-directory argument are not what you might think. They’re not as listed in the Profile dropdown menubar. Finding out what they’re named is a bit convoluted using Chrome alone.
However, you can find out the name of the profiles on your Mac using jq:
cat ~/Library/Application\ Support/Google/Chrome/Local\ State | jq -r '.profile.info_cache|to_entries|map(.key + ": " + .value.name)|.' | sort -k2,2n
Here’s what that might look like locally:
Default: Person 1 Profile 2: [niftydigits.com](http://niftydigits.com/)