Customize Raycast via Quicklinks

Featured image

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 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

  1. Open the browser of your choice or create a new tab
  2. Move to the address bar and type in https://amazon.com and wait for the page to load
  3. Click into the amazon search bar
  4. 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.

  1. Press โŒฅ + Space to activate Raycast
  2. Type ama and press enter on Search Amazon
  3. Now the Query field get the focus and you just type in what you would normal search on amazon website and hit Enter

amazon-search

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.

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.

create-quicklink

quicklink-gui

Creating a Quicklink is a straightforward process.

  1. Give your command a name

    First you need to give your Quicklink command a name. In our case this is Search Amazon.

  2. 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 the Query field of the command. You would not get a Query 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 term raycast when you click on the link. To make this now queryable from Raycast itself, we replace raycast with ${Query}.

    The full link to paste into Raycast would be https://www.amazon.com/s?k={Query}

  3. 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 ๐Ÿ˜€.