Raycast script commands are shell scripts, Python, or Node.js files that run from the Raycast command palette. Good for single-purpose utilities that don’t warrant a full KM macro.
Script Location
Script commands live in a directory registered in Raycast โ Preferences โ Extensions โ Script Commands. Add a directory and Raycast will scan it for scripts with the required comment headers.
Typical location: ~/Scripts/raycast/ or ~/Developer/raycast-scripts/
Script Anatomy
Every script needs a header block:
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title My Script
# @raycast.mode compact
# @raycast.packageName My Scripts
# @raycast.description Does something useful
echo "Result shown in Raycast"
Modes:
compactโ result shown inline in RaycastfullOutputโ opens a dedicated output windowsilentโ no output shown
Arguments
# @raycast.argument1 { "type": "text", "placeholder": "Enter value" }
echo "You entered: $1"
Raycast prompts for the argument before running.