How to Automate Your Clipboard with URL Schemes
Your clipboard is the most-used data transfer mechanism on your Mac, yet it has limited automation support by default. SaneClip exposes URL schemes and App Intents so Shortcuts, Alfred, Raycast, and scripts can open history, search, copy, paste, or clear with confirmation.
Option 1: The Hard Way (Scripts)
- 1 Write a background script that polls
pbpasteevery second. - 2 Parse the clipboard content yourself and fire HTTP requests.
- 3 Handle failures, retries, and authentication. Maintain the script forever.
Option 2: The Sane Way (SaneClip)
- ✓ URL Schemes: Control SaneClip from Shortcuts, Alfred, Raycast, or scripts.
saneclip://paste?index=0,saneclip://search?q=keyword,saneclip://copy?text=Hello. - ✓ Siri Shortcuts: Full App Intents support — "Get clipboard history", "Search clips", "Paste snippet by name". Build entire workflows in Shortcuts.app.
- ✓ Safety: Destructive URL-scheme commands require confirmation, and Touch ID protection applies when history lock is enabled.