The invisible thread connecting text selection to instant media & document actions.
π§΅ SutraKey (also known as Sutra Key): Hold Shift + Select any URL to summon a radial wheel that downloads video, audio, subtitles, or clean PDFs straight to
~/Downloads. Native Swift macOS utility. 100% Free & Open Source.
"Sutra" (ΰ€Έΰ₯ΰ€€ΰ₯ΰ€°) is Sanskrit for a thread or string holding pearls together. "Key" represents the Shift key physical interaction.
SutraKey (also written as Sutra Key) is designed as an extension of the macOS compositor: it runs completely invisibly (LSUIElement = YES), consumes 0% CPU when idle, creates no clutter in the Dock or Menu Bar until needed, and reacts with zero latency to your muscular habit of holding Shift while highlighting text.
flowchart TD
A["User Holds ONLY Shift"] --> B["Select Text / URL via Mouse"]
B --> C["ModifierExclusivityValidator"]
C -- "Any Other Modifier Key Pressed?" --> D["Dismiss / Abort (Zero Pollution)"]
C -- "Shift Only" --> E["TextSelectionExtractor"]
E --> F["URLSanitizer"]
F --> G["RadialPieMenu (Under-Cursor HUD)"]
G --> H{"Radial Slices (72Β° Each)"}
H -->|Slice 1| I["Video (MP4 via yt-dlp + ffmpeg)"]
H -->|Slice 2| J["Audio (320kbps MP3 + Metadata)"]
H -->|Slice 3| K["Subtitles (Clean SRT)"]
H -->|Slice 4| L["Images / High-Res Gallery"]
H -->|Slice 5| M["Clean PDF (Reader Mode offscreen WKWebView)"]
H -->|Center Dead-Zone < 28pt| N["Cancel"]
I & J & K & L & M --> O["ConversionTaskActor (Queue & Process)"]
O --> P["Ephemeral Menu Bar Icon Appears (Live Progress)"]
O --> Q["SutraToastPanel HUD (Frosted Glass Notification)"]
O --> R["Direct Save to ~/Downloads"]
- Mouse Gesture: Hold
Shift+ click-and-drag to select any URL or link across macOS. - Global Hotkey: Press
ββ§S(Cmd + Shift + S) orβ₯β§S(Option + Shift + S) anywhere in your workspace (Terminal, WhatsApp, Slack, Apple Notes, VS Code) to capture highlighted text or clipboard URLs instantly. - Strict Exclusivity Guard: A bitwise evaluation (
NSEvent.modifierFlags.intersection(.deviceIndependentFlagsMask)) guarantees that mouse triggers ignore extraneous modifiers to avoid collision with standard system shortcuts. - If you hit
Escor press another modifier key while the radial wheel is open, it dismisses instantly without stealing focus.
- Frameless, transparent, non-activating
NSPanelcentered exactly at the cursor coordinates. - Fluid 60fps spring animation with haptic alignment ticks (
NSHapticFeedbackManager.defaultPerformer) as your cursor enters each slice. - Center circular dead-zone (< 28pt) allows instantaneous flick-cancelling.
| Slice | Name | Target Format | Engine |
|---|---|---|---|
| 1 | Video | Highest resolution MP4 (Video + Audio merged) | yt-dlp + ffmpeg |
| 2 | Audio | 320kbps .mp3 with embedded artwork |
yt-dlp extract audio |
| 3 | Subtitles | .srt subtitle file |
yt-dlp --write-sub |
| 4 | Gallery | High-res thumbnail or full album | yt-dlp / gallery-dl |
| 5 | Clean PDF | Ad-free reader-mode formatted PDF | Offscreen WKWebView |
- When idle: invisible (no clutter in your menu bar).
- When a task begins: the monochrome template icon smoothly appears in the menu bar with real-time percentage or circular progress.
- Once all jobs finish, the icon automatically vanishes after a 1.5-second grace period.
- Clicking the status item reveals an
NSPopovershowing active downloads, live transfer speeds (MB/s), ETA, and a one-click cancel (SIGTERM) button.
- Floating toast panel in the top-right corner beneath the menu bar (
.ultraThinMaterial, hairline border, auto-dismiss 3.5s). - Start: Displays format badge and host domain.
- Finished: Shows checkmark and one-click "Show in Finder" button.
- Error: Displays concise failure explanation and "Copy Error Log" button.
- Saves strictly into
~/Downloads. - Command arguments enforce
--no-execand--restrict-filenamesto protect against path-traversal or malicious shell sequences.
brew install --cask halcyon-past/tap/sutrakeyOr tap first and install:
brew tap halcyon-past/tap
brew install --cask sutrakeyTo upgrade:
brew upgrade --cask sutrakey- π Universal DMG: SutraKey.dmg (Latest)
- π¦ In-Place Auto-Updater ZIP: SutraKey.zip (Latest)
- πΊ Homebrew Tap: halcyon-past/homebrew-tap
git clone https://github.com/halcyon-past/SutraKey.git
cd SutraKey
./Scripts/package_and_install.sh- π Support & User Guide β Installation, Accessibility permission guide, shortcuts, and troubleshooting.
- π Privacy Policy β Zero-telemetry on-device processing guarantees.
- π Terms of Service β Fair use guidelines and open-source terms.
- π€ Code of Conduct β Community standards and enforcement.
- π‘οΈ Security Policy β Vulnerability reporting and process isolation.
- π Changelog β Release history and semantic versioning notes.
- π€ LLM Summary (llms.txt) β Machine-readable project overview for LLM agents.
- π§ Full Technical Knowledge Base (llms-full.txt) β Complete system architecture for AI search.
- π‘ AI Crawler Policy (ai.txt) β Permissions and verified entity identities.
SutraKey includes strict unit test suites verifying every layer:
swift testModifierExclusivityTests: Verifies bitwise rejection of modifier pollution (Cmd+Shift,Opt+Shift, etc.).RadialGeometryTests: Asserts exact 72Β° mathematical slice mapping and center dead-zone threshold (< 28pt).YTDLPProgressParserTests: Validates regex parsing ofyt-dlpdownload percentage, speed, ETA, and post-processing states.EphemeralMenuBarStateTests: Ensures the menu bar icon is invisible when idle and reveals itself only during active workloads.URLSanitizerTests: Ensures URL cleaning, punctuation stripping, and valid scheme enforcement.DownloadsPathResolutionTests: Asserts strict target resolution to~/Downloadsand path traversal safety.
- License: 100% Free & Open Source under the Apache License 2.0.
- Privacy: 0% telemetry, 0 analytics trackers, 0 cloud dependencies. Read our full Privacy Policy.
- Author: Aritro Saha (@halcyon-past)