Skip to content

Help page: Custom AI Commands

Muzhen Gaming edited this page Jun 22, 2024 · 4 revisions

Custom AI Commands allow you to create your own commands!

As opposed to using predefined commands like Summarize or Explain, you can write your own custom instructions and prompts.

Getting started

Launch the "Custom AI Commands" command.

Press enter or select "Create Command" to make your first custom command!

Example

Let's say you want to tell the AI to rephrase some text as a tweet. To do this is extremely simple with Custom AI commands!

  1. Enter a memorable name so you can easily find and run it later, e.g. "Rephrase as Tweet".
  2. Enter a suitable prompt. For example, you can write something like "Rephrase the following text to make it a tweet".
  3. Here's the fun part! To achieve the required functionality, you'll need to add a special parameter that tells the extension to pass the selected text or input text to the AI. For instance, {input} or {selection} gets the input (selected) text.

ℹ️ We call this feature dynamic placeholders, and you can read more about them here.

Your final product would look something like this! Just press Save to create your custom command.

Now, your custom AI commands list would look like this!

Running Custom AI Commands

To run a custom AI command, you'll also need to first launch the "Custom AI Commands" command, where all the commands you created will be displayed in a list. Just select one of the commands and run it!

Example

Using our "Rephrase as Tweet" command from earlier.

Let's select some sample text:

To run, first launch Raycast and open "Custom AI Commands":

Then, hit enter to run the command. Voila!

More tips

To speed up your workflow with Custom AI Commands, I recommend assigning a hotkey to launch Custom AI Commands! For example, I use Control-C: