Raycast Script Commands let you run shell scripts from the Raycast launcher. You can fuzzy-search your codebase, convert formats, manage Docker, or trigger any CLI tool — all from a single hotkey.
Unlike full extensions (which need TypeScript and React), script commands are just shell scripts with a special header. If you can write a bash script, you can build a Raycast command.
Install Raycast from raycast.com (it's free). Script commands need no additional setup — Raycast reads them from a configured directory.
Each script starts with special header comments that Raycast parses as metadata:
#!/bin/bash
# @raycast.title Clean Git Branches
# @raycast.author Your Name
# @raycast.authorURL https://example.com
# @raycast.description Delete local branches that have been merged to main
# @raycast.icon 🧹
# @raycast.mode fullOutput
git branch --merged main | grep -v "main" | xargs git branch -d
echo "Cleaned merged branches!"Key header fields:
@raycast.title — name shown in the search bar@raycast.description — subtitle text@raycast.icon — emoji or image path@raycast.mode — compact (toast), fullOutput (window), or inline (list)Here are real-world scripts that save time every day:
docker system prune -af --volumes wrapped in a nice UIcd ~/projects/Real-World Script Recipes
&& code . — fuzzy-find a project and open itcurl ifconfig.me | pbcopy — copy your public IP instantly@raycast.argument to accept input from the search bar. Raycast shows an input field when the command runs.Arguments example:
#!/bin/bash
# @raycast.title DNS Lookup
# @raycast.argument1 {"type":"text","placeholder":"domain.com"}
# @raycast.mode fullOutput
dig +short "Real-World Script Recipes
" | head -5Take script commands further with these advanced techniques:
@raycast.mode inline to return a list of items the user can select — great for search scriptsraycast://command/name deeplinksScript debugging tips:
chmod +x script.sh@raycast.mode fullOutput to see all stdout/stderr in a windowexport PATH="/opt/homebrew/bin:$PATH" at the topScript commands are just the beginning. Explore more: