Overview
The Finder Extension provides:- Right-click “Organize with AI…” menu item in Finder
- Direct folder organization from context menu
- Seamless integration with Sorty’s organization workflow
- Quick access without switching to the Sorty app
The Finder extension is disabled by default via a feature flag. You must build and enable it manually.
Prerequisites
Before setting up the Finder extension:- macOS 15.1 or later - Required for extension support
- Xcode 16.0 or later - Needed to build the extension
- Sorty.app installed - Main app must be in
/Applications - App Groups configured - Required for inter-process communication
Installation
Step 1: Build the Extension
The Finder extension must be built from source: Using Xcode:- Open
Sorty.xcodeprojin Xcode - Select the SortyExtension scheme from the scheme picker
- Select your Mac as the destination
- Press
⌘Bto build the extension - Press
⌘Rto run (this will help with initial setup)
Step 2: Configure App Groups
The extension requires App Groups to communicate with the main app:- Open the project in Xcode
- Select the Sorty target
- Go to Signing & Capabilities tab
- Add App Groups capability if not present
- Enable the group:
group.com.sorty.app - Repeat for the SortyExtension target
Step 3: Enable in System Settings
After building the extension:- Open System Settings (or System Preferences on older macOS)
- Navigate to Privacy & Security
- Click Extensions in the sidebar
- Find and click Finder Extensions
- Enable SortyExtension by toggling the checkbox

Step 4: Restart Finder
Restart Finder to activate the extension:Option and right-click the Finder icon in the Dock, then select Relaunch.
Usage
Basic Organization
- Navigate to any folder in Finder
- Right-click (or Control+click) on the folder
- Select Organize with AI… from the context menu
- Sorty will launch and load the selected folder
- Review and apply the organization as usual
Supported Locations
The extension works with:- Local folders on your Mac
- External drives and volumes
- Network locations (if accessible)
- iCloud Drive folders
- User directories (Documents, Downloads, Desktop, etc.)
Multiple Selection
The extension currently supports single folder selection only. If multiple items are selected, only the first folder will be organized.
How It Works
Extension Architecture
The Finder extension operates through this workflow:- User selects folder → Right-clicks in Finder
- Extension activated → Menu item appears
- Folder path captured → Selected folder path is stored
- Deeplink generated → Extension creates
sorty://organize?path=... - Main app launched → Sorty.app opens via URL scheme
- Organization begins → Folder is loaded and ready to organize
Communication Flow
- NSExtensionContext - To receive selected items from Finder
- App Groups - For shared data container
- URL Schemes - To launch and communicate with main app
- Security-scoped bookmarks - To maintain folder access
Troubleshooting
Extension doesn't appear in Finder
Extension doesn't appear in Finder
Possible causes:
- Extension not built or installed
- Extension not enabled in System Settings
- Finder hasn’t been restarted
- Rebuild the SortyExtension target in Xcode
- Check System Settings → Privacy & Security → Extensions → Finder Extensions
- Restart Finder:
killall Finder - Log out and log back in to refresh system extensions
Menu item appears but nothing happens
Menu item appears but nothing happens
Permission denied errors
Permission denied errors
Possible causes:
- Security-scoped bookmark issues
- App Sandbox restrictions
- Folder access permissions
- Grant Full Disk Access to Sorty in System Settings
- Try organizing a folder in
~/Documentsfirst (test case) - Check folder permissions with
ls -la - Remove and re-add the extension in System Settings
Extension shows for files instead of folders
Extension shows for files instead of folders
This is expected behavior. The extension should only activate for folders, but macOS may show it for all items in some cases. The extension will gracefully handle non-folder selections by doing nothing.
App Groups configuration error
App Groups configuration error
Error message: “App Groups not configured” or “Container not found”Solutions:
- Open Xcode and select the Sorty target
- Go to Signing & Capabilities
- Ensure App Groups capability is present
- Enable
group.com.sorty.app - Repeat for SortyExtension target
- Clean build folder (
⌘⇧K) and rebuild
Security Considerations
App Sandbox
The Finder extension runs in an App Sandbox with restricted permissions:- Can only access folders explicitly selected by the user
- Uses security-scoped bookmarks for persistent access
- Cannot access system directories without Full Disk Access
- Requires user grant for each new folder location
Data Privacy
The extension:- Does not upload any file data
- Only sends folder paths to the main app
- Uses App Groups for secure inter-process communication
- Stores minimal metadata (folder path, timestamp)
Permissions Required
For full functionality, grant these permissions:| Permission | Required For | How to Grant |
|---|---|---|
| Finder Extension | Context menu item | System Settings → Extensions → Finder |
| File Access | Reading folder contents | Automatic on folder selection |
| Full Disk Access | System folders | System Settings → Privacy & Security → Full Disk Access |
| App Groups | Extension ↔ App communication | Configured in Xcode signing |
Advanced Configuration
Custom Extension Behavior
Modify the extension’s behavior by editing:Building for Distribution
To distribute the extension with your app:- Code sign both app and extension with the same certificate
- Embed the extension in the app bundle
- Notarize the complete app (requires Apple Developer account)
- Distribute as a
.dmgor via App Store
Debugging the Extension
View extension logs:- Select SortyExtension scheme
- Run with
⌘R - Xcode will attach to Finder process
- Set breakpoints in
FinderSync.swift - Trigger extension in Finder
Feature Flag Control
The Finder extension is controlled by a feature flag: Enable extension:Changing the feature flag requires rebuilding the app to take effect.
Uninstallation
To remove the Finder extension:-
Disable in System Settings:
- System Settings → Extensions → Finder Extensions
- Uncheck SortyExtension
-
Remove the app:
-
Clean extension cache:
-
Remove App Group data (optional):
Comparison with CLI
| Feature | Finder Extension | CLI (sorty) |
|---|---|---|
| Invocation | Right-click menu | Terminal command |
| Selection | Visual (Finder) | Path argument |
| Automation | Limited | Full scripting |
| Persona | Default only | Specify any |
| Auto-start | Manual edit | --auto flag |
| Batch ops | One at a time | Loop/parallel |
| Learning curve | None | Basic shell |
FAQ
Do I need the Finder extension?
Do I need the Finder extension?
No, it’s optional. You can always organize folders by:
- Using the CLI:
sorty organize /path/to/folder - Dragging folders onto Sorty.app
- Using File → Open Directory in the app
- Creating Shortcuts workflows
Can I customize the menu item?
Can I customize the menu item?
Does it work with network drives?
Does it work with network drives?
Yes, as long as the network location is mounted and accessible. However, security-scoped bookmarks may not persist across network disconnections.
Can I use it for multiple folders at once?
Can I use it for multiple folders at once?
Currently, no. The extension handles one folder at a time. For batch operations, use the CLI with a shell loop.
Why isn't it enabled by default?
Why isn't it enabled by default?
The extension requires additional setup (App Groups, system permissions) and adds complexity to the installation. It’s designed for power users who want Finder integration.
Technical Details
Extension Info
| Property | Value |
|---|---|
| Bundle ID | com.sorty.extension |
| Extension Point | com.apple.FinderSync |
| Supported Types | public.folder |
| Container | group.com.sorty.app |
| Min macOS | 15.1 |
File Locations
Source Files
- Extension:
Sources/SortyExtension/FinderSync.swift - Main app deeplink handler:
Sources/SortyLib/Utilities/DeeplinkHandler.swift - App Groups setup: Xcode project settings
Next Steps
CLI Tools
Automate Sorty from the command line
Deeplinks
Build custom workflows with URL schemes
Related Documentation
- Architecture Guide - Understanding Sorty’s MVVM structure
- Contributing Guide - Development guidelines
- AI Providers - Adding new AI providers