Table of contents
Raycast Snippets in Practice
Snippets let you store reusable text and paste it instantly — by searching your library or typing a keyword that expands in place.
Getting Started
What Are Snippets
A snippet is any saved text — a single symbol like →, a command, a code block, or a full email template. You retrieve it without switching apps or searching through notes.
For example, instead of typing your email address every time, save it once:
oleh@example.com
Assign the keyword ;email and it expands wherever you type it.
Creating a Snippet
Run Create Snippet in Raycast and provide:
- Name — shown in search results.
- Text — content to insert.
- Keyword (optional) — triggers auto-expansion when typed.
Hi {name},
Thank you for reaching out. I'll get back to you shortly.
Best regards,
Oleh
Using Keywords for Auto-Expansion
Typing a keyword followed by a space replaces it with the snippet text in any text field. Prefix keywords with ; or // to avoid accidental triggers during normal typing.
| You type | Expands to |
|---|---|
|
|
|
|
|
|
|
|
|
Using Snippets
Searching and Pasting
Open Raycast, type the snippet name, and press Enter — it pastes directly into the focused field.
Keyword Expansion in Any App
Expansion works system-wide across browser, terminal, Slack, editor, or any macOS text field. Type ;standup in a Slack message box and it expands to your standup template the same way it would in your terminal or email client.
Dynamic Placeholders
Placeholders let snippets adapt their content at the moment of insertion.
Cursor Position
{cursor} sets where the cursor lands after expansion, so you can start typing at the right spot immediately.
[{cursor}](https://example.com)
Clipboard Text
{clipboard} injects the current clipboard content at that position.
[Read more]({clipboard})
Copy a URL, trigger the snippet — you get a complete Markdown link with no extra editing.
Nested Snippets
Snippets can reference other snippets. Embed a signature snippet inside an email template so updating it once propagates everywhere it's used.
For example, you have a signature snippet:
Best regards,
Oleh Baranovskyi
oleh@example.com
Your reply-template snippet references it:
Hi {argument name="Name"},
Thank you for your message.
{snippet name="Signature"}
Update {snippet name="Signature"} once — every template using it reflects the change.
Arguments
Arguments prompt for input on expansion and substitute the value wherever the argument name appears — including multiple times in one snippet.
Hi {argument name="Reviewer"},
I've opened PR #{argument name="PR Number"} for your review. Let me know if you have questions, {argument name="Reviewer"}.
Thanks!
Raycast asks for Reviewer once and fills both occurrences.
Practical Tips and Shortcuts
Exporting Snippets
To export your entire snippet library, open Raycast and run Export Snippets. Raycast saves all snippets as a .json file you can back up or import on another machine.
The exported file contains each snippet's name, text, and keyword:
[
{
"name": "Email greeting",
"text": "Hi, hope you're doing well!",
"keyword": ";greet"
},
{
"name": "Git log",
"text": "git log --oneline --graph --decorate --all",
"keyword": ";glog"
}
]
To restore, go to Settings → Snippets → Import and select the file. Useful when setting up a new Mac or syncing your library across machines.
Using Snippets with Claude
Press Alt+C to open Claude in Raycast, type your snippet syntax:
{snippet name="My email address"}
Hit Enter to send — the snippet expands and the full content is delivered to Claude in just a few keystrokes, no mouse, no copy-pasting, no context switching.
Developer Use Case
Snippets are ideal for long technical strings you don't want to memorize. Assign ;glog to:
git log --oneline --graph --decorate --all
The same applies to awk one-liners, Docker commands, API templates, or any string you reach for regularly.
