DEV Community

Oleksandr Demian
Oleksandr Demian

Posted on

How to open a project/folder with your favorite IDE from command line

The esiest way to open a project/folder from terminal is to use open-ide npm package. Here is how:

1) Installation

Install open-ide globaly from npm:

npm i -g open-ide

2) Add your editors

open-ide add <alias> <path>

Example:

open-ide add vscode C:\PATH\TO\VSCODE\Code.exe

3) Enjoy

Now, you can execute open-ide in any folder, and it will be opened inside of your editor. If you have multiple editors, you can specify the one you want to use by passing it as first argument to the command:

open-ide vscode

Otherwise open-ide will ask you to choose the editor (from a list)

Note: if you have only one editor declared, it will be used as default

open-ide is an open source project hosted on Github

Discussion (0)