Skip to content

Add bettercapture extension - #28828

Merged
raycastbot merged 10 commits into
raycast:mainfrom
qlaffont:ext/bettercapture
Jul 21, 2026
Merged

Add bettercapture extension#28828
raycastbot merged 10 commits into
raycast:mainfrom
qlaffont:ext/bettercapture

Conversation

@qlaffont

@qlaffont qlaffont commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new extension to control BetterCapture — a free, open-source macOS screen recorder — from Raycast.

BetterCapture has no CLI or AppleScript API today. This extension integrates via two strategies:

  1. URL scheme (preferred) — When BetterCapture supports bettercapture:// URLs, commands use deep links with no extra permissions.
  2. Keyboard shortcut relay (fallback) — On current releases, Toggle Record relays the user's configured BetterCapture global shortcut via AppleScript.

Commands

Command Action
Toggle Record Stop an active recording, or open content selection (Pick Content / Select Area) to start a new one
Open Recordings Open the BetterCapture output folder in Finder (~/Movies/BetterCapture by default)

Both commands are no-view and show a HUD on success or a failure toast with actionable setup instructions.

Integration details

  • Toggle Record
    • If bettercapture://toggle is available → opens URL (BetterCapture handles stop vs. content selection)
    • Otherwise → launches BetterCapture if needed, reads KeyboardShortcuts_toggleRecording from UserDefaults, relays keystroke via System Events
    • Requires BetterCapture Toggle Recording shortcut configured + Raycast Accessibility permission on current releases
  • Open Recordings
    • If bettercapture://open-recordings is available → opens URL (respects custom output folder inside BetterCapture)
    • Otherwise → opens ~/Movies/BetterCapture in Finder

Upstream URL scheme proposal: jsattler/BetterCapture#170 · Discussion: jsattler/BetterCapture#169

Source repo: qlaffont/bettercapture-raycast

Screencast

Recommended demo flow:

  1. Run Toggle Record while BetterCapture is idle → content picker opens
  2. Select content, run Toggle Record again → recording stops
  3. Run Open Recordings → Finder opens the output folder

Use Raycast Window Capture (Preferences → Advanced) with "Save to Metadata" to add store screenshots.

Setup (for reviewers)

  1. Install BetterCapture: brew install bettercapture
  2. Open BetterCapture → Settings → Shortcuts → set Toggle Recording (required for fallback path)
  3. Grant Raycast Accessibility in System Settings → Privacy & Security (required for fallback path)
  4. Run npm run build in extensions/bettercapture and test the distribution build in Raycast

Checklist

@raycastbot raycastbot added new extension Label for PRs with new extensions platform: macOS labels Jun 17, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@qlaffont
qlaffont marked this pull request as ready for review June 17, 2026 08:06
@socket-security

socket-security Bot commented Jun 17, 2026

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a new bettercapture extension that lets Raycast users control BetterCapture (a macOS screen recorder) via two commands: Toggle Record and Open Recordings. Integration uses a URL-scheme path when BetterCapture supports it, and a keyboard-shortcut-relay fallback via AppleScript when it does not.

  • Toggle Record detects whether bettercapture://toggle is available; if not, it reads the user's configured global shortcut from UserDefaults and relays it through System Events, requiring Accessibility access.
  • Open Recordings similarly prefers the URL scheme, falling back to opening ~/Movies/BetterCapture in Finder using Raycast's open() API.
  • Previous review feedback (category, execSync for Finder open, plain Error wrapping in the shortcut relay) has been addressed in the current diff.

Confidence Score: 5/5

New extension with no existing code to regress; the only outstanding change is a one-line fix to the changelog date placeholder.

The extension is straightforward and all shell command inputs are hardcoded constants with no user-controlled data. The only outstanding item is the hardcoded date in CHANGELOG.md, which has no runtime impact.

CHANGELOG.md — needs the date replaced with {PR_MERGE_DATE}.

Important Files Changed

Filename Overview
extensions/bettercapture/src/lib/bettercapture.ts Core integration logic: URL-scheme detection, UserDefaults shortcut reading, AppleScript relay, and Finder open. Previous review findings (execSync for open, plain Error wrapping) have been addressed.
extensions/bettercapture/src/lib/carbon-keys.ts Carbon key-code to AppleScript translation; correctly prioritises keystroke for printable characters and falls back to key code for special keys.
extensions/bettercapture/src/toggle-record.ts Clean no-view command wrapper; surfaces BetterCaptureError messages to users and shows a generic toast for unexpected errors.
extensions/bettercapture/src/open-recordings.ts Straightforward no-view command; delegates to openRecordings() and shows HUD or failure toast.
extensions/bettercapture/package.json Well-formed; includes $schema, macOS-only platform, category correctly set to Applications, and all dependencies actually imported.
extensions/bettercapture/CHANGELOG.md Heading and bullet content are correct, but the date is a hardcoded literal instead of the required {PR_MERGE_DATE} placeholder.

Reviews (7): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile

Comment thread extensions/bettercapture/package.json
Comment thread extensions/bettercapture/CHANGELOG.md Outdated
Comment thread extensions/bettercapture/src/lib/bettercapture.ts
qlaffont and others added 4 commits June 17, 2026 10:12
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread extensions/bettercapture/src/lib/bettercapture.ts Outdated
@raycastbot

Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Jul 14, 2026
@qlaffont

Copy link
Copy Markdown
Contributor Author

Still waiting review ...

@qlaffont

Copy link
Copy Markdown
Contributor Author

@raycastbot the issue is not stalled

@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Jul 17, 2026
@0xdhrv 0xdhrv self-assigned this Jul 21, 2026
- Upgrade Raycast, TypeScript, ESLint, and type dependencies
- Target ESNext libraries and syntax with Node.js type definitions
- Refresh ignored Raycast build artifacts and remove obsolete metadata

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved ✅

@raycastbot
raycastbot merged commit 77f73ec into raycast:main Jul 21, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/qlaffont/bettercapture

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants