Open PhpStorm from Terminal/Command line

Open a file/project in PhpStorm using the command line

Solution 1:

Create Command-line launcher
Image for post
Image for post
Tools -> Create command line launcher
Image for post
Image for post
pstorm filename
pstrom projectname
pstorm

Solution 2:

alias pstorm='open -a /Applications/PhpStorm.app "`pwd`"'
alias pstrom="open -a 'phpstorm.app'"
source .zshrc
pstorm .

Solution 3:

open -a 'phpstorm.app' file-or-folder
https://www.jetbrains.com/help/phpstorm/opening-files-from-command-line.htmlhttps://www.jetbrains.com/help/phpstorm/working-with-the-ide-features-from-command-line.html#standalonehttps://www.jetbrains.com/help/phpstorm/opening-files-from-command-line.html

Written by

Web geek, Self-taught full-stack web developer, Learning Python, Laravel, Vuejs, UX/UI design, Nuclear Physicist PhD

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store