How to Open Files in VS Code from Finder on Mac

You're browsing files in Finder and spot a project folder you want to open in your editor. But there's no "Open in VS Code" option in the right-click menu. You have to open Terminal, cd to the folder, and type code . every single time.

Here are two ways to add "Open in Editor" to your Finder right-click menu — the manual way and the instant way.

Option 1: The Hard Way (Automator)

Free, but one workflow per editor.

  • 1
    Open Automator > New "Quick Action"
  • 2
    Set "Workflow receives" to "files or folders" in "Finder"
  • 3
    Add "Run Shell Script" action
  • 4
    Set "Pass input" to "as arguments"
  • 5
    Type code "$@" as the script
  • 6
    Save as "Open in VS Code"
  • 7
    Find it in the right-click menu under Quick Actions (More > Customize shows or hides it)
  • ✗
    Repeat entire process for Cursor, Xcode, etc.

Result: one Quick Action per editor, inside a submenu.

Option 2: The Sane Way (SaneClick)

Pre-built for VS Code, Cursor, and Xcode.

  • ✓
    Open in VS Code: Works on files and folders
  • ✓
    Open in Cursor: Same one-click experience
  • ✓
    Open in Xcode: Filters to .swift, .xcodeproj, .xcworkspace, .playground
  • ✓
    Multi-select: Open several files at once in any editor
  • ✓
    No setup: Toggle on from the script library, done

Or start the 14-day trial. No credit card. macOS 14 or later on Apple silicon.

What About the code Shell Command?

VS Code has a built-in shell command: open Terminal, type code . to open the current folder. It works, but you need Terminal open and you need to navigate to the right directory first. If you're already looking at the folder in Finder, that's two extra steps every time. SaneClick puts the action right where you are — in the right-click menu.

Smart File Filtering

SaneClick's "Open in Xcode" script only appears when you right-click .swift, .xcodeproj, .xcworkspace, or .playground files. The VS Code and Cursor scripts appear for all files and folders. This keeps your context menu clean — you only see what's relevant.

Conclusion

If you use one editor and don't mind Terminal, the code command is fine. If you switch between VS Code, Cursor, and Xcode and want instant right-click access from Finder, SaneClick gives you all three out of the box.

Questions

Do I need the code command for Open in VS Code?

Yes. The action runs code with the items you selected. In VS Code, open the Command Palette and run Shell Command: Install 'code' command in PATH. Open in Cursor needs Cursor's cursor command in the same way.

Why doesn't Open in Xcode show for every file?

It only appears for .swift, .xcodeproj, .xcworkspace and .playground items, so the menu stays short.

Can I open several files at once?

Yes. Select them in Finder and choose the action. SaneClick passes every selected item to the editor in one go.

Related guides