Activate Raycast Commands faster

Featured image

Raycast itself is quite powerful. Press a shortcut and Raycast opens in the middle of your screen. Typing any command you need and press enter to activate the command. Quite powerful, right?

But there are multiple ways to shorten also this workflow when you use the same command over and over again πŸš€.

πŸ“† A daily workflow example

Let’s assume that you are using the GitLab My Todos command (from my GitLab extension) on a daily basis to check your todos. The typical workflow would be as follows.

  1. Press βŒ₯ + Space to activate Raycast
  2. Type gitlab todo and press enter

This seems not to be much work to activate the command, but when you do this multiple times a day this can decrease your productivity. There are also downsides of that approach when you wanna do this fast.

  • There are multiple commands which are in the GitLab extension which will automatically show up when you type in gitlab.
  • When you just use the search term todo could also have multiple results and maybe the gitlab one is not the first one.

There are multiple ways to give Raycast a hint what your preferred command is or even make it 100% the correct command.

✨ Favorites

The simplest form of this hint are favorites. You can simply tell Raycast what your favorite command is by pressing CMD + K and choose the action Add to Favorites or the shortcut CMD + ⬆ + F when you have you command selected. This will add the command to your favorites and Raycast will always show them at the top of all your commands. Raycast will rank your favorites higher than all other commands, so there is a higher chance to have the right command. You can also use the arrow keys to navigate through your favorites instead of searching it via text.

favorites

🍬 Bonus: You can also move your favorite commands up (CMD + βŒ₯ + ⬆) and down (CMD + βŒ₯ + ⬆) in the list.

Favorites make your daily workflow easier, but when you have a lot of them the same problem can occur over time as without favorites.

πŸ’¬ Aliases

Another way to activate your commands faster are aliases. This process is well known from the terminal and is thankfully also available in Raycast ☺️.

A command alias gives you the possibility to use an alternative word for searching the command of your choice. This gives you the possibility to define a shorter search term for your command. When we apply an alias to our GitLab My Todos command, we could type in much less text and also have a precise search fit when we use the exact search term.

So let go to the Extension preferences page via the command Extensions Raycast Preferences and search our command where we wanna apply the alias. In my case that is the GitLab My Todos command and I apply the alias glt for it by clicking onto Add Alias and typing glt.

cmd-alias

After switching back to the main Raycast window I can now simply type glt and it will select the GitLab My Todos command for me, which is a perfect match. Raycast also displays the alias next to the command name.

cmd-search-alias

You can now type much faster and you don’t need to wait for the GUI response before hitting enter because you know that there is only one match for the command/alias search.

This is a great way to type lesser keystrokes to activate often used Raycast commands.

πŸ”₯ Global Hotkeys

Aliases makes thing much faster, but the workflow always includes the Raycast command βŒ₯ + Space first. Raycast creators also thought about that problem in your workflow and built in the Global hotkey to solve exactly that problem.

Global hotkeys make it possible to activate a specific Raycast command without pressing the Raycast command in the first place.

Open the Extension preferences page via the command Extensions Raycast Preferences and search for the command where you want to apply the hotkey (in my case GitLab My Todos as before). There is a Hotkey column right next to the Alias column. Just click on the Record Hotkey area and enter your shortcut of your choice (I choose CMD + ⬆ + T).

⚠️ Be aware that a lot of shortcuts are already used be MacOS or the application which is active, so try the shortcut in your daily used applications to make sure they work everywhere.

You can now use the shortcut to activate the applied command regardless if the Raycast main window is opened or not. This is of course also a perfect match and you don’t need to think about accidentally activating the wrong Raycast command.

The only downside of a Global Hotkey is that there is a high chance that the shortcut is already used by MacOS or your applications which you are using.

πŸ“– Conclusion

There are 3 described ways that let you activate your Raycast commands faster. Every way has its pros and cons. The best thing you can do is to apply different “ways” for different commands.

  • Commands which you are using very often during a day are good candidates for hotkeys
  • Applying aliases for regularly used command safe you a lot of keystrokes during the day
  • Mark commands as your favorites will list them higher in the search results than other commands

Of course you can also have a command which has an alias, a hotkey and be also marked as a favorite 😎.

PS: Raycast also have suggestions which are based on the commands you are using which automatically affect the search results as well πŸš€.