How to add open in Visual Studio Code to Finder (vsc / osx)

Damian Pieszczyński
2 min readMay 7, 2020
Open in Visual Studio Code in Finder

While most of us will just launch VSC from our cozy command line using the code . command there is also a use case to be able to launch visual studio code from finder. Here’s how: (fyi: I’ve added also instruction to install code command if you don’t know how to do it at the bottom)

  1. Open Automator.app
  2. Choose “Quick Action”

3. In the next screen set “Workflow receives current” to files or folders

4. Select Library -> Utilities -> Run Shell Script, pick preferred Shell (or default) and change Pass input to as arguments

5.In the text area insert following command:
open -n -b "com.microsoft.VSCode" — args "$*"

6. Save the script (you can press Command + S) — enter some name (this will be displayed in the Finder — so pick something like “Open in Code” or “Open in VSC”

7. The command will be available under Quick Actions like this:

How to install “code” command:

Open VSC, press Shift+Command+P enter install and pick:

Shell Command: Install ‘code’ command in PATH

--

--