Raycast script
A Raycast Script Command for the Mac: paste an app link, press Enter, and the https link is on your clipboard.
- Works on
- macOS
- Sends
- The app link, to the LinkOpen API. Nothing else.
Add the script
A Script Command for Raycast on a Mac. Save it as linkopen.sh in a folder of its own. In Raycast settings, open Extensions, click the plus button, choose Add Script Directory and pick that folder.
Run Copy LinkOpen Link, paste an app link, press Enter, and the https link is on your clipboard. If Raycast can’t run the script, make it executable with chmod +x linkopen.sh.
linkopen.sh
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Copy LinkOpen Link
# @raycast.mode silent
# Optional parameters:
# @raycast.packageName LinkOpen
# @raycast.argument1 { "type": "text", "placeholder": "App link" }
# Documentation:
# @raycast.description Turn an app link into an https link and copy it.
link=$(curl -sS -G https://linkopen.app/api/link --data-urlencode "url=$1")
case "$link" in
https://*)
printf '%s' "$link" | pbcopy
echo "Copied $link"
;;
*)
echo "$link"
exit 1
;;
esac