Customize Raycast via Quicklinks
Approximately a year ago I discovered Raycast and wrote a blog post about it. Since then I learned a lot and Raycast also has got a lot of new features.
I decided to write a blog post series about general learnings and tips and tricks about Raycast to show others how to gain more productivity in their day workflows as well as demonstrate what Raycast is capable of beyond just productivity stuff.
In this blogpost I will show you the easiest way to create your own command ๐.
๐ Quicklinks
Quicklinks are the easiest form to extend Raycast with a new command. Quicklinks itself are the same thing as enter open <url>
from the terminal. But in Raycast you get a nice decoration on top of it.
Let’s say we wanna search stuff on the amazon website.
The typical workflow for that would be
- Open the browser of your choice or create a new tab
- Move to the address bar and type in
https://amazon.com
and wait for the page to load - Click into the amazon search bar
- Type in whatever you wanna search
These are a lot of steps just to search for something on amazon. Let’s do this with a Quicklink in Raycast itself.
- Press
โฅ
+Space
to activate Raycast - Type
ama
and press enter onSearch Amazon
- Now the
Query
field get the focus and you just type in what you would normal search on amazon website and hitEnter
The result is that the amazon website is opened in your default browser with the search query which you entered in Raycast.
As you can see it’s one step less to get there. You may think that is not much, but this workflow has some significant benefits.
- Activating Raycast and typing on
ama
is pretty fast in comparison to opening a browser. - The
Query
field is instantaneously loaded and requires no extra loading time because it is already loaded. - No mouse moving is required in the whole workflow
The result of both workflows is the same, but the Raycast one is much faster for the user. You also gain a lot of productivity when you have multiple commands like this one and it would always be the same workflow to get there.
Bonus tip: You can also set a hotkey for the command. This has the great benefit that you just need to press the key combination and Raycast will activate the command for you and jump directly into the query field. This would remove step 1. and 2. and short the whole thing to just 2 actions for the user.
๐ Creating the Quicklink “Search Amazon”
How do we get such a Quicklink? The answer is the same answer as for most questions in Raycast - there is a Raycast command for that ๐.
The one we are looking for is called Create Quicklink
.
Creating a Quicklink is a straightforward process.
-
Give your command a name
First you need to give your Quicklink command a name. In our case this is
Search Amazon
. -
Which link should be opened?
After that we need to enter the Link aka URL. As you can already see, there is a magic text block named
{Query}
in the placeholder text of that Link field. This is the text part which gets replaced with the text you type in theQuery
field of the command. You would not get aQuery
field in Raycast if you omit the{Query}
in the Link when you just want to open a website.Also Raycast will make the
${Query}
part url safe, so you can e.g. type in spaces, which are normally not supported in url, and it will add the url safe characters for you.But how do we know which url we need? Most of the time you just need to go to the website and the search term of your choice. After that you look into the address bar and search for your search term. In that way you will see which url you need and which part of it is the
{Query}
part.In the case of
amazon.com
the link would be https://www.amazon.com/s?k=raycast (I omit the other parameter because they are not required). You will see the amazon website with the search termraycast
when you click on the link. To make this now queryable from Raycast itself, we replaceraycast
with${Query}
.The full link to paste into Raycast would be
https://www.amazon.com/s?k={Query}
-
Which application should get loaded?
As the last step we can define which application should get opened. By default Raycast will select your default browser which is what we want in our case.
After that you get the Search Amazon
command you see above.
If you want to change the Quicklink: Just select it and press โ
+ K
and activate Edit Quicklink
or just press โ
+ E
.
๐ Conclusion
Quicklinks are the easiest form of creating a custom command in Raycast. There is much more to cover like script commands or extensions, but these are topics for other blog posts ๐.