-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Extend deeplinks support + Raycast extension #1644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tedy69
wants to merge
29
commits into
CapSoftware:main
Choose a base branch
from
tedy69:feat/deeplinks-raycast-extension
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
fefb099
feat: extend deeplinks support + add Raycast extension\n\nExtends the…
tedy69 5b02801
fix: address review feedback for deeplinks + Raycast extension
tedy69 46e42a5
feat: enhance error handling in Raycast commands for better user feed…
tedy69 9f4f555
feat: simplify display selection for screen capture in deeplink actions
tedy69 03996ed
fix: update README
tedy69 f05b959
improve: toast labels and review feedback for Raycast extension
tedy69 f5ade32
improve: rework deeplinks + Raycast extension quality
tedy69 dffef12
fix: destructure RecordingSettingsStore to avoid partial move
tedy69 8c8538a
fix: address all PR review feedback
tedy69 25ee746
fix: use Display::primary() for default capture target
tedy69 50bd1ac
fix: address review feedback for deeplinks and Raycast extension
tedy69 eb713c1
fix: use Display::primary() for default target with empty-list guard
tedy69 cc849a4
fix: update capture_mode field to be optional and add permission chec…
tedy69 a517229
Update extensions/raycast/src/lib/deeplink.ts
tedy69 5dcca4a
Update apps/desktop/src-tauri/src/deeplink_actions.rs
tedy69 84b584c
fix: remove redundant screen recording permission check in TakeScreen…
tedy69 220f8a0
Update extensions/raycast/src/lib/deeplink.ts
tedy69 097ce4b
Update extensions/raycast/src/pause-recording.ts
tedy69 724f818
fix: add microphone permission checks in ListMicrophones and SetMicro…
tedy69 a0893ff
Merge branch 'feat/deeplinks-raycast-extension' of https://github.com…
tedy69 0547982
fix: update required fields in DEEPLINKS.md and standardize quotes in…
tedy69 8e704e6
fix: add permission guards to recording actions and improve Raycast UX
tedy69 4cdd3d6
fix: only gate SetCamera/SetMicrophone permission on activation, not …
tedy69 bc08204
fix: include organization ID in StartRecordingInputs for better context
tedy69 b0bcc1b
fix: improve error message for failed deep link action in Raycast ext…
tedy69 3165b74
fix: update required fields for camera and microphone in DEEPLINKS.md
tedy69 68b2560
fix: handle invalid file path in OpenEditor deep link action
tedy69 312152d
fix: add clipboard output formats for cameras, microphones, displays,…
tedy69 d377b34
fix: update deeplink documentation for set_camera id field and improv…
tedy69 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Cap Raycast Extension | ||
|
|
||
| Control [Cap](https://cap.so) screen recorder directly from Raycast. | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | Description | | ||
| | ----------------------- | --------------------------------- | | ||
| | Start Instant Recording | Start an instant screen recording | | ||
| | Start Studio Recording | Start a studio screen recording | | ||
| | Stop Recording | Stop the current recording | | ||
| | Pause Recording | Pause the current recording | | ||
| | Resume Recording | Resume a paused recording | | ||
| | Toggle Pause Recording | Toggle pause/resume | | ||
| | Restart Recording | Restart the current recording | | ||
| | Take Screenshot | Take a screenshot | | ||
| | Open Settings | Open Cap settings | | ||
|
|
||
| ## How It Works | ||
|
|
||
| The extension communicates with the Cap desktop app through deeplinks using the `cap-desktop://` URL scheme. All commands dispatch actions via deeplink URLs that Cap handles natively. | ||
|
|
||
| ### Deeplink Format | ||
|
|
||
| Unit actions (no parameters): | ||
|
|
||
| ``` | ||
| cap-desktop://action?value="stop_recording" | ||
| ``` | ||
|
|
||
| Actions with parameters: | ||
|
|
||
| ``` | ||
| cap-desktop://action?value={"start_recording":{"capture_mode":{"screen":"Built-in Retina Display"},"camera":null,"mic_label":null,"capture_system_audio":false,"mode":"studio"}} | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ### Available Deeplink Actions | ||
|
|
||
| | Action | Type | Parameters | | ||
| | ------------------------ | ------------- | --------------------------------------------------------------------- | | ||
| | `start_recording` | Parameterized | `capture_mode`, `camera`, `mic_label`, `capture_system_audio`, `mode` | | ||
| | `stop_recording` | Unit | — | | ||
| | `pause_recording` | Unit | — | | ||
| | `resume_recording` | Unit | — | | ||
| | `toggle_pause_recording` | Unit | — | | ||
| | `restart_recording` | Unit | — | | ||
| | `take_screenshot` | Parameterized | `capture_mode` (optional) | | ||
| | `list_cameras` | Unit | — | | ||
| | `set_camera` | Parameterized | `id` | | ||
| | `list_microphones` | Unit | — | | ||
| | `set_microphone` | Parameterized | `label` | | ||
| | `list_displays` | Unit | — | | ||
| | `list_windows` | Unit | — | | ||
| | `open_editor` | Parameterized | `project_path` | | ||
| | `open_settings` | Parameterized | `page` (optional) | | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Cap](https://cap.so) desktop app installed and running | ||
| - [Raycast](https://raycast.com) installed | ||
|
|
||
| ## Development | ||
|
|
||
| ```bash | ||
| cd apps/raycast | ||
| npm install | ||
| npm run dev | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
| ``` | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| { | ||
| "$schema": "https://www.raycast.com/schemas/extension.json", | ||
| "name": "cap", | ||
| "title": "Cap", | ||
| "description": "Control Cap screen recorder — start, stop, pause, resume recordings, take screenshots, and manage devices.", | ||
| "icon": "cap-icon.png", | ||
| "author": "cap", | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
| "categories": [ | ||
| "Productivity", | ||
| "Developer Tools" | ||
| ], | ||
| "license": "MIT", | ||
| "commands": [ | ||
| { | ||
| "name": "start-instant-recording", | ||
| "title": "Start Instant Recording", | ||
| "description": "Start an instant screen recording with Cap", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "start-studio-recording", | ||
| "title": "Start Studio Recording", | ||
| "description": "Start a studio screen recording with Cap", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "stop-recording", | ||
| "title": "Stop Recording", | ||
| "description": "Stop the current Cap recording", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "pause-recording", | ||
| "title": "Pause Recording", | ||
| "description": "Pause the current Cap recording", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "resume-recording", | ||
| "title": "Resume Recording", | ||
| "description": "Resume a paused Cap recording", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "toggle-pause-recording", | ||
| "title": "Toggle Pause Recording", | ||
| "description": "Toggle pause/resume on the current Cap recording", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "restart-recording", | ||
| "title": "Restart Recording", | ||
| "description": "Restart the current Cap recording", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "take-screenshot", | ||
| "title": "Take Screenshot", | ||
| "description": "Take a screenshot with Cap", | ||
| "mode": "no-view" | ||
| }, | ||
| { | ||
| "name": "open-settings", | ||
| "title": "Open Settings", | ||
| "description": "Open Cap settings", | ||
| "mode": "no-view" | ||
| } | ||
| ], | ||
| "dependencies": { | ||
| "@raycast/api": "^1.93.3", | ||
| "@raycast/utils": "^1.19.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@raycast/eslint-config": "^1.0.11", | ||
| "@types/node": "22.13.14", | ||
| "@types/react": "19.0.10", | ||
| "eslint": "^9.22.0", | ||
| "typescript": "^5.8.2" | ||
| }, | ||
| "scripts": { | ||
| "build": "ray build", | ||
| "dev": "ray develop", | ||
| "fix-lint": "ray lint --fix", | ||
| "lint": "ray lint" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { dispatchAction } from './utils'; | ||
| import { showToast, Toast } from '@raycast/api'; | ||
|
|
||
| export default async function openSettings() { | ||
| await showToast({ style: Toast.Style.Animated, title: 'Opening Cap settings...' }); | ||
|
|
||
| await dispatchAction({ | ||
| open_settings: { | ||
| page: null, | ||
| }, | ||
| }); | ||
|
|
||
| await showToast({ style: Toast.Style.Success, title: 'Settings opened' }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { fireSimpleAction } from './utils'; | ||
|
|
||
| export default async function pauseRecording() { | ||
| await fireSimpleAction('pause_recording', 'Recording paused'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { fireSimpleAction } from './utils'; | ||
|
|
||
| export default async function restartRecording() { | ||
| await fireSimpleAction('restart_recording', 'Recording restarted'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { fireSimpleAction } from './utils'; | ||
|
|
||
| export default async function resumeRecording() { | ||
| await fireSimpleAction('resume_recording', 'Recording resumed'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { dispatchAction } from './utils'; | ||
| import { showToast, Toast } from '@raycast/api'; | ||
|
|
||
| export default async function startInstantRecording() { | ||
| await showToast({ style: Toast.Style.Animated, title: 'Starting instant recording...' }); | ||
|
|
||
| await dispatchAction({ | ||
| start_recording: { | ||
| capture_mode: null, | ||
| camera: null, | ||
| mic_label: null, | ||
| capture_system_audio: false, | ||
| mode: 'instant', | ||
| }, | ||
| }); | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
|
|
||
| await showToast({ style: Toast.Style.Success, title: 'Instant recording started' }); | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { dispatchAction } from './utils'; | ||
| import { showToast, Toast } from '@raycast/api'; | ||
|
|
||
| export default async function startStudioRecording() { | ||
| await showToast({ style: Toast.Style.Animated, title: 'Starting studio recording...' }); | ||
|
|
||
| await dispatchAction({ | ||
| start_recording: { | ||
| capture_mode: null, | ||
| camera: null, | ||
| mic_label: null, | ||
| capture_system_audio: false, | ||
| mode: 'studio', | ||
| }, | ||
| }); | ||
|
|
||
| await showToast({ style: Toast.Style.Success, title: 'Studio recording started' }); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.