🎯 Bounty Submission for Issue https://github.com/CapSoftware/Cap/issues/1540 /claim https://github.com/CapSoftware/Cap/issues/1540
This pull request adds a new Raycast extension for controlling the Cap screen recorder directly from Raycast, and extends the Cap desktop app’s deeplink API to support additional recording and device actions. The main changes include new deeplink actions in the desktop app, new Raycast extension commands, and supporting documentation and configuration.
Raycast Extension Integration:
raycast-extensions directory, with commands for starting, stopping, pausing, resuming, toggling pause, and taking screenshots in Cap. Each command sends the appropriate deeplink to the Cap desktop app.README.md explaining installation, usage, and the deeplink protocol for the Raycast extension.Cap Desktop Deeplink API Enhancements:
DeepLinkAction enum and handler in deeplink_actions.rs to support new actions: pause, resume, toggle pause recording, take screenshot, set camera, and set microphone. These are now callable via deeplinks. [1] [2]Dependency and Configuration Updates:
@raycast/api dependency to the main package.json to support Raycast extension development.package.json for the Raycast extension, specifying commands, dependencies, devDependencies, and scripts for building and publishing the extension.These changes enable users to control Cap’s core recording features from Raycast, improving workflow efficiency and automation.
This PR adds Raycast extension support to Cap by creating a new extension in raycast-extensions/ and extending the desktop app’s deeplink API with 6 new actions (pause, resume, toggle-pause, take-screenshot, set-camera, set-microphone).
Key Changes:
DeepLinkAction enum in deeplink_actions.rs with 6 new recording control actionscap-desktop:// deeplinksCritical Issues Found:
SetMicrophone handler - label is extracted but mic_label is passed to function (line 192-194)@raycast/api added to root package.json instead of staying isolated in raycast-extensions/{} while stop/toggle use null for empty actionsapps/desktop/src-tauri/src/deeplink_actions.rs requires immediate fixes for comments and variable bug; raycast-extensions/src/start-recording.tsx needs complete reimplementation| Filename | Overview |
|---|---|
| apps/desktop/src-tauri/src/deeplink_actions.rs | Added 6 new deeplink actions (pause, resume, toggle-pause, screenshot, set-camera, set-mic) with code comment violations and variable shadowing bug |
| raycast-extensions/src/start-recording.tsx | Start recording command opens settings page instead of starting recording - doesn’t match intended functionality |
| raycast-extensions/src/pause-recording.tsx | Sends pause_recording deeplink with inconsistent format ({} vs null) |
| raycast-extensions/src/resume-recording.tsx | Sends resume_recording deeplink with inconsistent format ({} vs null) |
| package.json | Added @raycast/api to root package.json dependencies, should be isolated to raycast-extensions directory |
sequenceDiagram
participant User
participant Raycast
participant RaycastExtension
participant Desktop as Cap Desktop App
participant DeeplinkHandler as Deeplink Handler
participant RecordingModule as Recording Module
User->>Raycast: Execute command (e.g. "Pause Recording")
Raycast->>RaycastExtension: Trigger command handler
RaycastExtension->>RaycastExtension: Build deeplink action JSON
Note over RaycastExtension: Format: {"pause_recording": {}}
RaycastExtension->>RaycastExtension: Encode to cap-desktop:// URL
RaycastExtension->>Desktop: Open deeplink URL
Desktop->>DeeplinkHandler: Parse URL & extract action
DeeplinkHandler->>DeeplinkHandler: Deserialize JSON to DeepLinkAction enum
DeeplinkHandler->>RecordingModule: Execute action (e.g. pause_recording)
RecordingModule->>Desktop: Update recording state
Desktop-->>User: Recording paused
RaycastExtension->>User: Show toast notification
(2/5) Greptile learns from your feedback when you react with thumbs up/down!
Context used:
dashboard - CLAUDE.md (source)David Pratama
@daviddprtma
Cap
@CapSoftware
Abhishek Verma
@w3Abhishek