Skip to main content
Raycast provides four output modes that determine how your script’s output is displayed. Choose the mode that best fits your use case.

Mode Overview

ModeBest ForOutput Display
fullOutputDetailed information, terminal-like outputSeparate view showing all output
compactQuick feedback, status messagesLast line in toast notification
silentBackground tasks, minimal interruptionHUD overlay after Raycast closes
inlineLive dashboards, status monitoringFirst line directly in command item

fullOutput Mode

Displays the entire output in a separate view, similar to a terminal window. Perfect for scripts that generate detailed output you need to read.
# @raycast.mode fullOutput

Use Cases

  • Translation tools
  • Data conversions
  • Search results
  • Detailed status reports
  • Any output requiring review

Example: Translate Text

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Translate
# @raycast.mode fullOutput

# Optional parameters:
# @raycast.icon 📖
# @raycast.argument1 { "type": "text", "placeholder": "Word or Sentence" }
# @raycast.packageName Terminal Translate

if ! command -v tl &> /dev/null; then
	echo "trans command is required (https://github.com/ShanaMaid/terminal-translate).";
	exit 1;
fi

tl $1
Source: translate.sh

compact Mode

Shows the last line of standard output in a toast notification. Great for quick confirmations and status updates.
# @raycast.mode compact

Use Cases

  • Confirmation messages
  • Simple status updates
  • Quick actions with feedback
  • Settings toggles

Example: Change App Icon

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Change Application Icon
# @raycast.mode compact

# Optional parameters:
# @raycast.icon 🅱️
# @raycast.argument1 { "type": "text", "placeholder": "Application" }
# @raycast.packageName iconsur

# Test iconsur
t=$(which iconsur)
if [ -z "$t" ]; then
    echo "Iconsur not found, install using brew install iconsur"
    exit 1
fi

# Process application icon...
# (script logic omitted for brevity)

echo "Icon changed successfully"
Source: iconsur.sh:9
In compact mode, only the last line of output is shown. Make sure your final echo statement contains the message you want to display.

silent Mode

Displays the last line (if it exists) in an overlaying HUD toast after the Raycast window closes. Perfect for background tasks that shouldn’t interrupt your workflow.
# @raycast.mode silent

Use Cases

  • Opening URLs or applications
  • File operations
  • Background processes
  • Quick actions without feedback

Example: Set Dock Position

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Dock Position
# @raycast.mode silent

# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "dropdown", "placeholder": "Position on Screen", "data": [{"title": "Left", "value": "left"}, {"title": "Right", "value": "right"}, {"title": "Bottom", "value": "bottom"}]  }
# @raycast.packageName System

defaults write com.apple.dock orientation -string $1; killall Dock
Source: dock-set-position.sh:6

Example: Create Bear Note

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Add Note
# @raycast.mode silent

# Optional parameters:
# @raycast.icon images/bear-light.png
# @raycast.iconDark images/bear-dark.png
# @raycast.packageName Bear
# @raycast.argument1 { "type": "text", "placeholder": "Title", "percentEncoded": true}
# @raycast.argument2 { "type": "text", "placeholder": "Content", "optional": true, "percentEncoded": true}

open "bear://x-callback-url/create?title=${1}&text=${2}"

echo "Note created!"
Source: bear-add-note.sh:13

inline Mode

Displays the first line of output directly in the command item. Updates automatically according to the refreshTime parameter. Perfect for creating live dashboards.
# @raycast.mode inline
# @raycast.refreshTime 10s
The refreshTime parameter is required for inline mode. Without it, Raycast will use compact mode instead.

Use Cases

  • System monitoring (CPU, memory, disk)
  • API dashboards (revenue, metrics)
  • Live status displays
  • Weather information
  • Any real-time data

Example: CPU Usage Monitor

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title CPU Usage
# @raycast.mode inline
# @raycast.refreshTime 10s

# Optional parameters:
# @raycast.icon 🖥️
# @raycast.packageName System

output=$(top -l 1 | grep "CPU usage")
cpu_usage=$(echo "$output" | awk -F " " '{print $3}' | cut -d% -f1)

echo "CPU Usage: ${cpu_usage}%"
Source: inline-cpu-usage-percent.sh:6

Example: Revenue Dashboard

#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Revenue
# @raycast.mode inline
# @raycast.refreshTime 1h

# Optional parameters:
# @raycast.icon images/baremetrics.png
# @raycast.packageName Baremetrics

DATE=`gdate -d today '+%Y-%m-%d'`

# Fetch metrics from API...
# (API calls omitted for brevity)

echo "MRR: $MRR | ARR: $ARR | LTV: $LTV | ARPU: $ARPU"
Source: simple-dashboard.sh:8-9
Press Cmd+K while hovering over an inline script to add it to favorites or reorder it in your root search.

Refresh Time Examples

# Refresh every 10 seconds (minimum)
# @raycast.refreshTime 10s

# Refresh every minute
# @raycast.refreshTime 1m

# Refresh every hour
# @raycast.refreshTime 1h

# Refresh once per day
# @raycast.refreshTime 1d
Only the first 10 inline commands refresh automatically. Additional inline commands must be manually refreshed by navigating to them and pressing Return.

ANSI Color Support

Both fullOutput and inline modes support ANSI escape codes for colorizing output. Colors automatically adapt to your appearance settings (light/dark theme).

Supported Colors

Escape code format: \033[<fg>;<bg>m or \x1b[<fg>;<bg>m
ColorForegroundBackgroundLight ThemeDark Theme
Black3040#000000#000000
Red3141#B12424#FF6363
Green3242#006B4F#59D499
Yellow3343#F8A300#FFC531
Blue3444#138AF2#56C2FF
Magenta3545#9A1B6E#CF2F98
Cyan3646#3EB8BF#52EEE5
White97107#FFFFFF#FFFFFF

Text Formatting Codes

CodeEffect
0Reset (normal)
4Underline
9Crossed out
24Not underlined
29Not crossed out

Color Examples

echo -e '\033[31;42mred text on green background\033[0m'
Raycast also supports 8-bit and 24-bit color codes for a wider color palette. Unsupported terminal codes are stripped from output.

Long-Running Tasks

Long-running tasks that generate partial data aren’t supported in compact, silent, and inline modes.
For example, the zip command generates many partial logs when compressing folders. Scripts using zip will work in fullOutput but not in other modes. Solution: Use quiet flags to suppress partial output:
# Won't work in compact/silent/inline modes
zip -r archive.zip folder/

# Works in all modes
zip -q -r archive.zip folder/

Choosing the Right Mode

Use this decision tree to select the appropriate mode:

Arguments

Add custom input fields to your scripts

Metadata Reference

Explore all metadata parameters

Build docs developers (and LLMs) love