Select / Copy some text and use the Pipe [Selection, Clipboard] to Command command.
Use the Create Script Command command to generate a new script command, then change the @raycast.mode value to pipe.
The Pipe command syntax is very similar to the script command syntax, with some caveats:
mode field must be set to pipe.refreshTime, argument1, argument2, argument3 fields are not supported and will be ignored.input field is available to specify the input type. It can be text (default), file or tab.
The user input (text selection or clipboard) will be passed as stdin. If it is not empty, the standard output stream of the script will be copied to the clipboard or replace the current selection depending on the user choice.
The silent script commands with a single argument are supported. The user input will be used as first argument to the script.
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Google Search
# @raycast.packageName Web Searches
# @raycast.mode silent
# @raycast.icon 🌐
# @raycast.argument1 {"type": "text", "percentEncoded": true, "placeholder": "Query"}
# Open the url in the default browser
open "https://www.google.com/search?q=$1"
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Prettify JSON
# @raycast.packageName Developer Utils
# @raycast.mode pipe
# @raycast.inputType text
# @raycast.icon 🔨
python3 -m json.tool --indent 2
Apply a script to clipboard contents.
Apply a script to selected text.
Apply a script on a file.
Apply a script on a tab.
BREAKING CHANGE: the text command no longer falls back to the clipboard contents. Now, there is a dedicated clipboard command to pipe clipboard input.
@raycast.inputType and @raycast.outputType to specify the input and output for pipe modesilent mode now supports setting the @raycast.argument1 type to file or tabAdding two new pipe command scripts:
unique line and count-character commands@raycast.iconDark metadatacompact modeneedsConfirmation mode@raycast.icon and @raycast.iconDark now support emojis, relative filepaths and remote urlsRead Text scriptpaste and copy modes in favor of pipe modeManage Pipe Commands command