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

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
  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 "" — 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



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