Control Sorty using the sorty:// URL scheme for automation and shortcuts
Sorty provides comprehensive URL scheme support via the sorty:// protocol, enabling external automation, AppleScript integration, and custom workflow creation.
Route:sorty://organizeStart organizing a directory with optional persona selection and auto-start.Parameters:
Parameter
Type
Required
Description
path
string
No
Absolute path to directory to organize
persona
string
No
Persona ID (e.g., developer, photographer)
autostart
boolean
No
Auto-start organization (true/false)
Examples:
# Open organize viewopen "sorty://organize"# Organize specific directoryopen "sorty://organize?path=/Users/me/Downloads"# Use developer personaopen "sorty://organize?path=/Users/me/Projects&persona=developer"# Auto-start organizationopen "sorty://organize?path=/Users/me/Downloads&autostart=true"# Combine all parametersopen "sorty://organize?path=/Users/me/Downloads&persona=general&autostart=true"
Route:sorty://personaManage personas or generate new ones using AI.Parameters:
Parameter
Type
Required
Description
action
string
No
Action to perform (create or generate)
prompt
string
No*
Description for AI generation (*required if generate=true)
generate
boolean
No
Trigger AI generation immediately
Examples:
# Open persona managementopen "sorty://persona"# Open persona creatoropen "sorty://persona?action=create"# Generate persona from descriptionopen "sorty://persona?action=generate&generate=true&prompt=sci-fi%20ebook%20collector"# Another generation exampleopen "sorty://persona?action=generate&generate=true&prompt=organize%20client%20invoices%20by%20date"
Route:sorty://settingsOpen app settings, optionally jumping to a specific section.Parameters:
Parameter
Type
Required
Description
section
string
No
Settings section to open
Valid Sections:
rules - Exclusion rules
provider - AI provider configuration
strategy - Organization strategy
tuning - Temperature and model tuning
automation - Automation settings
finder - Finder extension
notifications - Notification preferences
advanced - Advanced settings
troubleshooting - Troubleshooting tools
help - Help documentation
Examples:
# Open general settingsopen "sorty://settings"# Open AI provider settingsopen "sorty://settings?section=provider"# Open automation settingsopen "sorty://settings?section=automation"
tell application "Finder" set downloadFolder to (path to downloads folder) as text set fileCount to count of (every file of folder downloadFolder)end tellif fileCount > 50 then open location "sorty://organize?path=/Users/me/Downloads&persona=general&autostart=true" display notification "Starting organization of " & fileCount & " files" with title "Sorty"else display notification "Only " & fileCount & " files. Skipping organization." with title "Sorty"end if
tell application "System Events" set promptText to text returned of (display dialog "Describe your organization needs:" default answer "")end tellset encodedPrompt to do shell script "python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1]))' " & quoted form of promptTextopen location "sorty://persona?action=generate&generate=true&prompt=" & encodedPrompt
Deeplinks can trigger file operations. When building automation:
Always validate paths before passing to deeplinks
Use absolute paths to avoid ambiguity
Test with --auto disabled first
Be cautious when running as scheduled tasks
For sensitive operations, consider requiring user confirmation even when using autostart=true by omitting the parameter and reviewing the preview first.