How to open webstorm from terminal

To edit files from the terminal, I use subl (for sublime text) to edit the file; For example: if I need to edit the app.js file, I use subl app.js. Is there a way to configure webstorm to open from the terminal?

+78
terminal alias webstorm
Nov 12 '14 at 4:15
source share
11 answers
  • Try in the terminal " wstorm " and " webstorm "
  • If the commands do not work, you can run in WebStorm: "Tools" -> "Create Command Line Launcher..."

Note. Solution works only for Linux / MacOS

+178
Nov 12 '14 at 14:44
source share

January 2016 update using Webstorm 11.0.3 on mac os x

There were no parameters in the accepted answer.

Instead, simply use the already installed binary wstorm command line designed for this purpose. Location shown below:

enter image description here

If you really want to open webstorm and load the contents of the current working directory, for example, put it . after the command:

 wstorm . 

It was noted that others made similar comments in this section of the responses and wished to clarify the situation.

+23
Jan 25 '16 at 15:04
source share

I also downloaded WebStorm and wanted to use a similar shortcut to open files directly from the terminal.

I was surprised to find that I already have a shortcut in my command line tools for webstorm:

subl is Sublime since wstorm is for Webstorm.

Otherwise, as anstarovoyt kindly noted, you can simply create your own shortcut using "Tools"> "Create Command Line Launcher"

+18
Feb 23 '15 at 21:43
source share

Another way to do this:

 open -a /Applications/WebStorm.app #Open last project open -a /Applications/WebStorm.app Desktop #Open particular folder open -a /Applications/WebStorm.app Desktop myscript.js #Open particular file 

You can add an alias to your configuration file:

 #Edit your config: vim ~/.bashrc #add line: alias ws='open -a /Applications/WebStorm.app' #Read your config file: source ~/.bashrc 

Now you can use it:

 ws . myscript.js 
+7
Mar 04 '15 at 16:59
source share

I know this is an older thread, but trying to achieve this with Windows became a bit of a pain, and I could not find anything specifically designed for my purposes. I created a Bash function that you can add as an alias (for Git Bash on Windows), which works similar to the command line functions in Visual Studio Code .

Here's a link to the Gist .

If you change the built-in terminal in WebStorm to Git Bash (instructions included in Gist), you can follow these steps:

Create a new file in the current working directory and open it in the editor:

 wstorm foo.js 

Create a new file in the existing relative path and open it in the editor:

 wstorm foo/bar.js 

This also works with subdirectories that do not exist:

 wstorm this/path/doesnt/exist/file.js 

If you are working in the Git Bash terminal (and not in WebStorm) and want to open WebStorm in the current directory, you can open it in the same way as Visual Studio Code:

 wstorm . 

Note. This must be done in the directory with the .idea folder.

+4
Mar 02 '17 at 17:22
source share

In Ubuntu terminal terminal:

 /var/opt/webstorm6/WebStorm-129.664/bin/webstorm.sh 

Note: look at the version of WebStorm, my code is 129.664

+2
Jun 26 '15 at 8:41
source share

In the terminal, being in this project folder:

 webstorm . 
+2
May 9 '18 at 5:14
source share

The wstorm command did not work in my Git bash, so I added the following function to my .bash_profile:

 wstorm() { /c/Program\ Files\ \(x86\)/JetBrains/WebStorm\ 2016.2.2/bin/WebStorm.exe $PWD/$1 } 
+1
Sep 01 '16 at 10:45
source share

After setting up WebStorm to create a wedge, you really want to run

 wstorm . & 

to start IntelliJ in the background, otherwise IntelliJ closes if you close the terminal from which you started the application.

+1
Feb 17 '17 at 19:44
source share
  • In the WebStorm IDE, click the " DOUBLE CLICK ON SHIFT " button and enter the " Create Command Line Launcher panel Create Command Line Launcher then click the" OK button from the "Run Launch Script" item.

  • cd project_folder_path using the terminal and type webstorm./ .

it is not for windows

0
Jan 06 '19 at 18:29
source share

I am using Windows 10 and have run a batch file (ws.bat) which implements this with an optional command line argument for the boot path).

 :: place this batch file in your path and set to your WS EXE :: ref: https://www.robvanderwoude.com/battech_defined.php :: author: bob@bobchesley.net @echo off set target=%1 if defined target (goto passedarg) else (goto noarg) :passedarg echo Starting WebStorm with '%target%' "C:\Program Files\JetBrains\WebStorm 2018.3.2\bin\webstorm.exe" %target% goto:EOF :noarg echo Starting WebStorm with 'Current Dir' "C:\Program Files\JetBrains\WebStorm 2018.3.2\bin\webstorm.exe" . 

Pretty simple, but it works.

0
Jan 15 '19 at 20:22
source share



All Articles