Skip to content
All posts
2 min read

How to Add Open in VS Code to the Finder Right-Click Menu on Mac

Amit Raz

Amit Raz

Founder, RZ AI Labs

Since I moved to Mac I've been missing "open in VS Code" in the right click on folders.

Don't know why I waited until today, but today I lost it over this and went to see how it's done.

So for whoever is interested:

The original version was a thread in Hebrew on X, published August 31, 2026.

Step 1: Create a Quick Action in Automator

Open Automator and choose Quick Action.

Automator new document dialog, Choose a type for your document, with Quick Action selected

Step 2: Add a Run Shell Script action

Filter on the left by Utilities and drag Run Shell Script to the right side, and then the window for which shell script to run opens. Replace what's written there with:

for f in "$@"; do
  open -na "Visual Studio Code" --args "$f"
done

And change the following settings according to the markings:

Automator Quick Action with Workflow receives current set to files or folders in Finder, and a Run Shell Script action using /bin/zsh with Pass input set to as arguments
Workflow receives current: files or folders, in Finder. Pass input: as arguments.

Step 3: Save it and use it from Finder

Press CMD+S, give it a name and that's it. Now in Finder we'll see the action we added under Quick Actions.

Finder right-click menu with Quick Actions expanded, showing the new Open in VSCode action

FAQ

How do I add Open in VS Code to the right-click menu on a Mac?

Open Automator and choose Quick Action. Drag Run Shell Script to the right side and replace its contents with a loop that runs open -na "Visual Studio Code" --args on each selected item. Set it to receive files or folders in Finder, with input passed as arguments, then save with CMD+S. The action shows up in Finder under Quick Actions.

Building something with AI?

I help teams ship custom agents, AI strategy, and software that works.