Skip to content

Add bettercapture:// URL scheme for external automation#170

Merged
jsattler merged 2 commits into
jsattler:mainfrom
qlaffont:feat/url-scheme
Jun 26, 2026
Merged

Add bettercapture:// URL scheme for external automation#170
jsattler merged 2 commits into
jsattler:mainfrom
qlaffont:feat/url-scheme

Conversation

@qlaffont

Copy link
Copy Markdown
Contributor

Summary

  • Register bettercapture URL scheme in Info.plist
  • Handle bettercapture://toggle and bettercapture://open-recordings in BetterCaptureApp.swift
  • Document supported URLs in README

Motivation

External tools (Raycast, Shortcuts, Alfred) currently have no way to control BetterCapture except relaying configured keyboard shortcuts via Accessibility APIs. A URL scheme enables reliable automation without extra permissions.

Related discussion: #169

Supported URLs

URL Action
bettercapture://toggle Calls toggleRecording() (same as Toggle Recording shortcut)
bettercapture://open-recordings Opens output folder in Finder (same as menu bar action)

Test plan

  • open "bettercapture://toggle" starts/stops recording
  • open "bettercapture://open-recordings" opens output folder (including custom directory)
  • URLs work when app was previously quit (macOS launches handler)

Made with Cursor

qlaffont and others added 2 commits June 17, 2026 09:36
Register a custom URL scheme so tools like Raycast and Shortcuts can
toggle recording and open the output folder without keyboard relay.

Closes discussion: #169

Co-authored-by: Cursor <cursoragent@cursor.com>
When idle, bettercapture://toggle now opens Pick Content or Select Area
instead of auto-starting with a previously selected source.

Co-authored-by: Cursor <cursoragent@cursor.com>
@qlaffont

Copy link
Copy Markdown
Contributor Author

Updated toggle behavior per feedback:

  • While recording: bettercapture://toggle calls stopRecording()
  • While idle: opens content selection (Pick Content or Select Area based on user preference) instead of auto-starting with a previously selected source

This matches the expected Raycast flow: choose content before recording, stop when recording.

@jsattler

Copy link
Copy Markdown
Owner

Great idea, thanks for contributing! I will take a look in the coming days.

@jsattler jsattler merged commit 2559318 into jsattler:main Jun 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants