How to Add Custom Scripts to Mac Right-Click Menu
You have a shell script (.sh) or a Python script that you use constantly. Opening Terminal, navigating to the folder, and typing the command is tedious. You want to just right-click a file and run it.
Here are the two ways to do it on macOS: the "Hard Way" (Apple's built-in Automator) and the "Sane Way" (SaneClick).
Option 1: The Hard Way (Automator)
Free, built-in, but fragile and complex.
- 1 Open Automator app
- 2 Create a new "Quick Action"
- 3 Set "Workflow receives current" to "files or folders" in "Finder"
- 4 Drag in "Run Shell Script" action
- 5 Change "Pass input" to "as arguments"
- 6 Paste your script code (hope you handle spaces in filenames correctly!)
- 7 Save it with a specific name
- 8 Find it in the right-click menu under Quick Actions (More > Customize shows or hides it)
Result: one item inside the Quick Actions submenu. Every change means reopening Automator.
Option 2: The Sane Way (SaneClick)
Fast, robust, designed for developers.
- ✓ Write Custom Action (under More Options) and paste your script
- ✓ Instant access in right-click menu
- ✓ Smart filters: Only show for specific file types (e.g. .jpg, .ts)
- ✓ Paths as arguments: each selected item arrives as its own argument, so
"$@"keeps names with spaces intact - ✓ No Subscription: $14.99 once after a 14-day trial
Or start the 14-day trial. No credit card. macOS 14 or later on Apple silicon.
Where Automator Gets Slow
Automator works, but it wasn't built for quick edits. Each change means opening the workflow in Automator again. In SaneClick, the Test button runs a shell or AppleScript action on the files you pick and shows the output before you save. After that, each action can copy its result, show it in a window, or post it as a notification.
Conclusion
If you have one script you use once a month, Automator is fine. If you live in your file system and want a fast, customized workflow, SaneClick is the tool you've been waiting for.
Questions
Can I run a Python script from the right-click menu?
Yes. Make a shell custom action that calls it, such as python3 ~/scripts/tidy.py "$@", if python3 is installed. SaneClick passes each selected file as its own argument.
Can I test an action before it goes in the menu?
Yes. In the custom action editor, click Test to run a shell or AppleScript action on files you choose and see its output before you save. Test isn't available for Automator workflows.
Are custom scripts in the Mac App Store version?
No. Custom actions are only in the download from saneclick.com. The Mac App Store version has built-in actions only.