Raycast Manual
Raycast Manual
Deeplinks

Deeplinks

Sometimes you may want to trigger Raycast from somewhere else – the browser, the terminal, a different application. This is possible with Deeplinks, by using the raycast:// URL scheme.

  • Supported URLs
  • Show confetti 🎉
  • Run a command
  • Pass fallbackText to a command
  • Run a script command
  • Troubleshooting
  • Running a Window Management command using its Deeplink doesn’t work

Supported URLs

Show confetti 🎉

Use raycast://confetti URL scheme to trigger confetti. Especially handy to spice up those long running scripts.

Run a command

You can run any command you have enabled in Raycast by using Deeplinks. To do so, your Deeplink needs to follow the following format:

raycast://extensions/<author-or-owner>/<extension-name>/<command-name>

However, it’s probably easier to find the command in Raycast and use the Copy Deeplink action.

image

Once the Deeplink is in your clipboard, you can then paste it in Raycast and use Open in Browser

image

Whenever a command is run using a Deeplink, Raycast will ask you to confirm that you actually want to run the command, instead of doing so by accident. Choosing Always Open Command will run the command and skip the confirmation in the future.

image

For more advanced uses, check out the Developer Docs.

Pass fallbackText to a command

You can use the fallbackText query parameter to pass initial data to a command. It works the same way as Fallback Commands. The following Deeplink will open File Search in the ~/Library/Application Support/ folder:

raycast://extensions/raycast/file-search/file-search?fallbackText=~/Library/Application%20Support/

You can also use it to open the Create Quicklink command with the Link input prefilled:

raycast://extensions/raycast/raycast/create-quicklink?fallbackText=https://raycast.com

Run a script command

You can also run any enabled script command by using Deeplinks. The Deeplink needs to follow the following format:

raycast://script-commands/<slugified-file-name-without-extension>

As with non-script commands, it’s probably easier to find the command in Raycast and use the Copy Deeplink action.

image

If your script command accepts arguments, like Color Conversion:

image

You can use the arguments query parameter in order to pass e.g. #FF0000 and rgb:

raycast://script-commands/color-conversion?arguments=%23FF0000&arguments=rgb

Note the %23FF0000 in the URL; that’s because query parameters need to be URL encoded, so # becomes %23.

Troubleshooting

Running a Window Management command using its Deeplink doesn’t work

Depending on how a Deeplink is opened, Raycast might become focused; since Window Management commands rely on the target app being focused, this will lead to the commands not working.

One way to ensure Raycast doesn’t get focused is to use a shell script. Running the following command in the terminal should result in the terminal being displayed in the left half of the screen:

open -g raycast://extensions/raycast/window-management/left-half

This can, then, be included in a Shortcut:

image

Community

Twitter