Custom Finder context menu scripts for macOS.
- Script Types: Bash, AppleScript, and Automator workflows
- File Type Filters: Show scripts only for specific file extensions
- Script Categories: Organize scripts into custom groups
- Test Scripts: Run scripts on selected files before saving
- Import/Export: Share scripts as JSON files
- Search: Filter scripts by name or content
- Keyboard Shortcuts: Full keyboard navigation support
- macOS 14.0+
- Xcode 16.0+ (for building)
- XcodeGen (for project generation)
-
Generate the Xcode project:
xcodegen generate
-
Build with Xcode or command line:
xcodebuild -project SaneScript.xcodeproj -scheme SaneScript build
-
Run tests:
xcodebuild -project SaneScript.xcodeproj -scheme SaneScript test
- Build the app
- Move
SaneScript.appto Applications - Launch SaneScript
- Enable the Finder extension in System Settings > Privacy & Security > Extensions > Finder
- Add Scripts: Click the + button and choose "New Script"
- Configure: Set name, type, content, and file filters
- Test: Use the Test button to try your script on files
- Organize: Create categories and drag scripts between them
- Use: Right-click files in Finder to see your scripts
- Bash:
$1,$2, etc. for file paths, or$@for all - AppleScript: Use
item 1 of argvto access paths - Automator: File paths are passed via standard input
SaneScript/
├── SaneScript/ # Host app (settings UI)
│ ├── App/ # App entry
│ ├── Models/ # Script, Category models
│ ├── Services/ # ScriptExecutor, ScriptStore
│ └── Views/ # SwiftUI views
├── SaneScriptExtension/ # Finder Sync Extension
│ ├── FinderSync.swift # FIFinderSync subclass
│ └── Info.plist # Extension config
├── Tests/ # Unit tests
└── project.yml # XcodeGen config
- Fork the repository
- Create a feature branch
- Make changes with tests
- Submit a pull request
MIT License - See LICENSE file for details
