Mac Launch Script Generator

Pick your apps and the exact Chrome profile you want, then copy one block into Terminal. You get a reusable shell script that opens your whole setup — including the right browser profile, which is the part that is genuinely fiddly to get right by hand.

How to find your Chrome profile directory name

The name shown in Chrome’s profile switcher is a label. The value --profile-directory needs is the folder on disk, which is almost never the same string. Open a Chrome window belonging to that profile, go to chrome://version, and read the Profile Path row. The last path component is the value — typically Default for the first profile ever created, then Profile 1, Profile 2 and so on in creation order.

Brave, Microsoft Edge and Chrome Canary are all Chromium-based and use the same flag and the same folder convention, each under its own application support directory.

Why the script uses open -na and not open -a

For a browser that is already running, open -a hands the URLs to the existing instance, which opens them in whatever profile is currently frontmost — so the profile flag is silently ignored. -n forces a new instance, which is what makes --profile-directory take effect. The --args separator is required: everything after it is passed to the application rather than interpreted by open itself.

Common flags in the generated script

-aOpen by application name.
-bOpen by bundle identifier, e.g. com.microsoft.VSCode.
-nForce a new instance instead of reusing a running one.
--argsEverything after this is passed to the application.

Where a launch script stops

A launch script reliably solves the launching half of a morning setup. It cannot restore window geometry, cannot assign windows to a particular Space, and cannot reproduce a multi-monitor arrangement, because none of that is exposed to a shell. ShiftPlus saves and restores apps, window positions, Spaces and browser profiles as one workspace.