How to open a project in WebStorm, using the command line (Windows 10)
Asked Answered
K

2

5

I would like to open WebStorm from the command line.

My goal is, when I have navigated to the right directory on my PC, to use a command, which opens the current directory as a project in WebStorm.

Kerbstone answered 31/10, 2016 at 10:40 Comment(2)
AFAIK there is no special launcher/script that comes with WebStorm for Windows platform (it only exist for Mac/Linux). But you can create it yourself -- some wstorm.cmd where you specify full path to the webstorm.exe (or webstorm64.exe if you are using 64-bit Java) and full path to your project folder as a parameter -- IDE will either open existing project there (if it exists -- based on .idea subfolder presence and content) or will create brand new project from those files.Dyke
Thanks LazyOne.. :) Do you know of any guide to setup this configuration.? a tutorial or something.?Jenaejenda
J
7

The syntax to open a project from command line on Windows is path/to/WebStorm.exe path/to/your/project - see https://www.jetbrains.com/help/webstorm/2016.2/working-with-webstorm-features-from-command-line.html#d279626e72. You can add %WebStorm installation directory%/bin to your system %PATH% to be able to run WebStorm using WebStorm command instead of entering a full path to exe.

To open current directory as a project, you can (in principle) just run WebStorm .. But this doesn't currently work (IDEA-108586). You can try using WebStorm.bat . instead

Jeggar answered 31/10, 2016 at 13:9 Comment(0)
T
3

This happened to me recently on my MBP-M2. When I tried to open webstorm from the terminal, I received an error stating that webstorm is not a command. I fixed it by performing the following steps:

  1. Press the shift key twice to bring up the quick search menu.
  2. I then looked up 'command line lanchuer' and clicked on it.
  3. I continued by pressing OK on the next window.
  4. It will ask for system access permission; grant it.

It worked post this fix.

Search command line launcher

enter image description here

Tristantristas answered 6/10, 2022 at 15:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.