Deeplinks Overview
Sorty provides a comprehensive URL scheme (sorty://) that allows you to control all aspects of the application from external sources. This enables powerful automation through tools like Alfred, Shortcuts, scripts, or the command-line interface.
What are Deeplinks?
Deeplinks are special URLs that open Sorty and navigate directly to specific features or trigger actions. Instead of manually clicking through the app, you can use a single URL to:- Start organizing a specific folder
- Open settings to a particular section
- Scan for duplicates
- Generate AI personas
- Add watched folders or exclusion rules
- Access The Learnings dashboard
URL Scheme Format
All Sorty deeplinks follow this pattern:- Scheme:
sorty://(required) - Route: The destination or action (e.g.,
organize,settings,duplicates) - Parameters: Optional query parameters that modify behavior (e.g.,
path,autostart,persona)
Basic Examples
Open Settings
Open Help
Open Learnings Dashboard
Open Workspace Health
Open History
Using Deeplinks
From Terminal
Use theopen command:
From CLI Tool
Thesorty CLI provides a friendly wrapper around deeplinks:
From Shortcuts (macOS)
- Create a new Shortcut
- Add “Open URLs” action
- Enter your deeplink URL
- Run the shortcut
From Alfred Workflows
Create a workflow with a “Open URL” action:From AppleScript
URL Encoding
When passing paths or text as parameters, you must URL-encode special characters:| Character | Encoded |
|---|---|
| Space | %20 |
/ | %2F |
& | %26 |
? | %3F |
= | %3D |
sorty CLI handles URL encoding automatically:
Available Routes
Sorty deeplinks are organized into three main categories:1. Organization & Duplicate Management
Control file organization and duplicate scanning:sorty://organize- Start organizing a directorysorty://duplicates- Scan for duplicate files
2. Settings, Persona & Utility
Manage app configuration and AI personas:sorty://settings- Open settingssorty://persona- Manage personassorty://learnings- Access The Learnings dashboardsorty://history- View organization historysorty://health- Open Workspace Healthsorty://help- Open help documentation
3. Watched Folders & Rules
Configure automatic organization and exclusions:sorty://watched- Manage watched folderssorty://rules- Manage exclusion rulessorty://exclusions- View exclusion rulessorty://storage- Manage storage locations
Common Parameters
Many deeplinks share common parameters:| Parameter | Type | Description |
|---|---|---|
path | String | Absolute file system path (must be URL-encoded) |
autostart | Boolean | Automatically begin the action (true/false) |
action | String | Specific action to perform (e.g., add, generate, honing) |
section | String | Navigate to a specific section (used in settings/help) |
Security Considerations
Path Validation
Sorty validates all paths provided via deeplinks:- Path must exist on the file system
- Path must be a valid directory (for organization/duplicates)
- User must have read/write permissions
API Key Protection
Deeplinks cannot be used to extract or modify API keys stored in the Keychain.Safe Defaults
autostart=falseis the default (preview before action)- Destructive operations require explicit confirmation
- Exclusion rules protect important files
Troubleshooting
Deeplink Not Working
- Verify the scheme: Must be
sorty://(notsorty:orsorty:/) - Check URL encoding: Paths with spaces or special characters must be encoded
- Validate the route: Ensure the route exists (see documentation)
- Test in Terminal: Use
open "sorty://..."to see error messages
Permission Denied
- Sorty requires Full Disk Access for some directories
- Check System Settings → Privacy & Security → Full Disk Access
- Ensure the path provided is readable
Autostart Not Working
- Verify
autostart=true(notautostart=1orauto=true) - Some actions require configuration (e.g., AI provider for organization)
- Check app logs for error messages
CLI vs Direct Deeplinks
Thesorty CLI is recommended over direct deeplinks for most use cases:
Advantages of CLI
- Automatic URL encoding
- Path validation and error messages
- Friendly syntax (
--autoinstead ofautostart=true) - Built-in help (
sorty help)
When to Use Direct Deeplinks
- Integration with Shortcuts or AppleScript
- Custom automation workflows
- When you need precise control over parameters
Example Workflows
Alfred: Quick Organization
Create an Alfred workflow that organizes the current Finder selection:Keyboard Maestro: Scheduled Cleanup
Schedule duplicate scans:Hazel: Post-Download Organization
Organize files dropped into Downloads:Next Steps
- Organization & Duplicate Deeplinks - File organization and duplicate scanning
- Management Deeplinks - Settings, personas, and utilities
- sorty CLI Reference - Command-line interface documentation