Open PhpStorm from Terminal/Command line

Solution 1:

For opening your current working directory in PhpStorm

You need first open Phpstrom and then go to Tools menu and find the

Create Command-line launcher
Tools -> Create command line launcher

Then it will open a window which is for “Create Launcher Script”

It says specify the name of the script you want to use in the terminal. By default it choose “pstorm” and we can change it, but it’s ok for me.

and that’s it!

After this we can open any file or project from terminal. To do this, Navigate to the project/folder you want to open.

We need to use what is written after “/usr/local/bin/ “ that is pstorm.

pstorm filename


pstrom projectname

or go inside the project and just type


Solution 2:

Open the .zshrc file or bash file and put this alias:

alias pstorm='open -a /Applications/ "`pwd`"'


alias pstrom="open -a ''"

source the bash file

source .zshrc

and then use pstorm like solution 1

Navigate to the inside of the desired directory and do

pstorm .

It will open the whole current directory

Solution 3:

Type in terminal this:

open -a '' file-or-folder

See more here:

Posting about Python and Laravel

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Is a Specification Pattern?

Dockerizing a Spring Boot Application and Using the Jib Maven Plugin

Make where clause more readable in laravel

Designing and implementing shared safe objects in Multithreading

How to Shrinker may have failed to optimize the Java bytecode

How to Setup Symfony 4 on LAMP Based Debian 9 Server

Check variable is a Laravel collection

Jitter: A Ruby on Rails coffee shop locator

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


Posting about Python and Laravel

More from Medium

Top 5 Free Hosting Providers

Jquery appendTo And prependTo Example

Lilut: add CLUTter to your photos