-
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 15 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| # Cap Desktop Deeplinks | ||
|
|
||
| Cap desktop registers the `cap-desktop://` URL scheme for external automation and integrations (e.g. Raycast, Alfred, shell scripts). | ||
|
|
||
| ## URL Format | ||
|
|
||
| All actions use the `action` host with a JSON-encoded `value` query parameter: | ||
|
|
||
| ``` | ||
| cap-desktop://action?value=<url-encoded-json> | ||
| ``` | ||
|
|
||
| ### Unit actions (no parameters) | ||
|
|
||
| The JSON value is a quoted string: | ||
|
|
||
| ``` | ||
| cap-desktop://action?value=%22stop_recording%22 | ||
| ``` | ||
|
|
||
| ### Parameterized actions | ||
|
|
||
| The JSON value is an object keyed by the action name (shown unencoded for readability; URL-encode the JSON in actual deeplinks): | ||
|
|
||
| ``` | ||
| cap-desktop://action?value={"start_recording":{"capture_mode":null,"camera":null,"mic_label":null,"capture_system_audio":false,"mode":"studio"}} | ||
| ``` | ||
|
|
||
| ## Available Actions | ||
|
|
||
| ### Recording Controls | ||
|
|
||
| | Action | Type | Description | | ||
| | ------------------------- | ------------- | --------------------------------------------------- | | ||
| | `start_recording` | Parameterized | Start a new recording with explicit settings | | ||
| | `start_current_recording` | Parameterized | Start a recording using saved settings from the app | | ||
| | `stop_recording` | Unit | Stop the current recording | | ||
| | `pause_recording` | Unit | Pause the current recording | | ||
| | `resume_recording` | Unit | Resume a paused recording | | ||
| | `toggle_pause_recording` | Unit | Toggle pause/resume on the current recording | | ||
| | `restart_recording` | Unit | Restart the current recording | | ||
|
|
||
| ### Screenshots | ||
|
|
||
| | Action | Type | Description | | ||
| | ----------------- | ------------- | -------------------- | | ||
| | `take_screenshot` | Parameterized | Capture a screenshot | | ||
|
|
||
| ### Device Management | ||
|
|
||
| | Action | Type | Description | | ||
| | ------------------ | ------------- | ----------------------------------------------- | | ||
| | `list_cameras` | Unit | Copy available cameras as JSON to clipboard | | ||
| | `set_camera` | Parameterized | Set the active camera | | ||
| | `list_microphones` | Unit | Copy available microphones as JSON to clipboard | | ||
| | `set_microphone` | Parameterized | Set the active microphone | | ||
| | `list_displays` | Unit | Copy available displays as JSON to clipboard | | ||
| | `list_windows` | Unit | Copy available windows as JSON to clipboard | | ||
|
|
||
| ### Other | ||
|
|
||
| | Action | Type | Description | | ||
| | --------------- | ------------- | ---------------------------- | | ||
| | `open_editor` | Parameterized | Open a project in the editor | | ||
| | `open_settings` | Parameterized | Open the settings window | | ||
|
|
||
| ## Action Parameters | ||
|
|
||
| ### `start_recording` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | ---------------------- | -------------------------------------------------------- | -------- | ---------------------------------------------------------------------- | | ||
| | `capture_mode` | `null` \| `{"screen":"<name>"}` \| `{"window":"<name>"}` | No | Target to capture. Defaults to primary display when omitted or `null`. | | ||
| | `camera` | `null` \| device ID object | No | Camera device. Defaults to no camera when omitted or `null`. | | ||
| | `mic_label` | `null` \| `string` | No | Microphone label. Defaults to no microphone when omitted or `null`. | | ||
| | `capture_system_audio` | `boolean` | Yes | Whether to capture system audio. | | ||
| | `mode` | `"studio"` \| `"instant"` | Yes | Recording mode. | | ||
|
|
||
| ### `start_current_recording` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | ------ | ----------------------------------- | -------- | ----------------------------------------------------------------------------------- | | ||
| | `mode` | `null` \| `"studio"` \| `"instant"` | Yes | Override the saved recording mode. `null` uses the saved mode (defaults to studio). | | ||
|
|
||
| ### `take_screenshot` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | -------------- | -------------------------------------------------------- | -------- | --------------------------------------------------- | | ||
| | `capture_mode` | `null` \| `{"screen":"<name>"}` \| `{"window":"<name>"}` | No | Target to capture. `null` uses the primary display. | | ||
|
|
||
| ### `set_camera` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | ----- | -------------------------- | -------- | ----------------------------------------------- | | ||
| | `id` | `null` \| device ID object | Yes | Camera to activate. `null` disables the camera. | | ||
|
|
||
| ### `set_microphone` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | ------- | ------------------ | -------- | ------------------------------------------------- | | ||
| | `label` | `null` \| `string` | Yes | Microphone label. `null` disables the microphone. | | ||
|
|
||
| ### `open_editor` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | -------------- | -------- | -------- | --------------------------------------- | | ||
| | `project_path` | `string` | Yes | Absolute path to the project directory. | | ||
|
|
||
| ### `open_settings` | ||
|
|
||
| | Field | Type | Required | Description | | ||
| | ------ | ------------------ | -------- | ----------------------------------------------------- | | ||
| | `page` | `null` \| `string` | Yes | Settings page to open. `null` opens the default page. | | ||
|
tedy69 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Examples | ||
|
|
||
| Start a studio recording on the primary display: | ||
|
|
||
| ```bash | ||
| open "cap-desktop://action?value=$(python3 -c 'import urllib.parse, json; print(urllib.parse.quote(json.dumps({"start_recording":{"capture_mode":None,"camera":None,"mic_label":None,"capture_system_audio":False,"mode":"studio"}})))')" | ||
| ``` | ||
|
|
||
| Start a recording using saved app settings: | ||
|
|
||
| ```bash | ||
| open "cap-desktop://action?value=$(python3 -c 'import urllib.parse, json; print(urllib.parse.quote(json.dumps({"start_current_recording":{"mode":None}})))')" | ||
| ``` | ||
|
|
||
| Stop a recording: | ||
|
|
||
| ```bash | ||
| open "cap-desktop://action?value=%22stop_recording%22" | ||
| ``` | ||
|
|
||
| Take a screenshot: | ||
|
|
||
| ```bash | ||
| open "cap-desktop://action?value=$(python3 -c 'import urllib.parse, json; print(urllib.parse.quote(json.dumps({"take_screenshot":{"capture_mode":None}})))')" | ||
| ``` | ||
|
|
||
| List available microphones (copies JSON to clipboard): | ||
|
|
||
| ```bash | ||
| open "cap-desktop://action?value=%22list_microphones%22" | ||
| ``` | ||
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.