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
    Enable in System Settings > Extensions
  • Repeat entire process for Cursor, Xcode, etc.

Result: Slow Quick Actions buried in a submenu. One per editor.

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

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.