Open Clion from terminal
Start CLion using the GUI interface, then start Terminal and run the following to find what process is running:
ps -ae| grep lion
Output
57257 ?? 0:20.45 /Applications/CLion.app/Contents/MacOS/clion
57434 ttys000 0:00.00 grep lion
So the command I need to use, in my case, to start CLion from the command line is:
/Applications/CLion.app/Contents/MacOS/clion
Then you need to pass the directory containing your project, so you could make a function like this:
function CLion { /Applications/CLion.app/Contents/MacOS/clion "$1"; }
Then you can just type:
Clion ~/CLionProjects/someProject
In researching this question, I just discovered that there is an officially supported method for doing this is via CLion
's Tools|Create Command Line Launcher...
menu item.
Full details are posted here: https://www.jetbrains.com/help/clion/working-with-the-ide-features-from-command-line.html