Skip to content
All platform editions

Platform edition

Script Runner for macOS

Bundled

Processes transcriptions with custom shell scripts through stdin and stdout.

Version
1.1.5
Plugin ID
com.typewhisper.script
Requirements
TypeWhisper 0.9.0 or newer · macOS 14.0 or newer

Inside this edition

Script Runner macOS settings

Features in this edition

  • Post-processing of transcription text
  • Custom shell commands
  • Text passed through stdin and returned through stdout
  • Optional execution rules

Settings in this edition

  • Set the command, timeout, and optional execution rules

About

The Script Runner plugin pipes transcribed text through any shell command or script. Your text is passed via stdin, and whatever the command writes to stdout becomes the final output. This gives you full flexibility to transform, filter, or enrich transcriptions using standard Unix tools, custom scripts, or any command-line program.

Features

  • Run any shell command on transcribed text
  • Text flows through stdin/stdout - works with standard Unix pipes
  • Environment variables with context (app name, URL, language, profile)
  • Configurable timeout to prevent runaway scripts
  • Profile filter to limit execution to specific profiles
  • Execution log for debugging

Environment Variables

The following environment variables are available to your scripts:

  • TYPEWHISPER_APP_NAME - Name of the frontmost application (e.g. “Safari”)
  • TYPEWHISPER_BUNDLE_ID - Bundle identifier of the frontmost app (e.g. “com.apple.Safari”)
  • TYPEWHISPER_URL - Current URL from the browser, if available
  • TYPEWHISPER_LANGUAGE - Language code of the transcription (e.g. “en”)
  • TYPEWHISPER_PROFILE - Name of the active TypeWhisper profile

Examples

UPPERCASE - Convert all text to uppercase:

tr '[:lower:]' '[:upper:]'

Sentence Case - Capitalize the first letter of each sentence:

sed 's/\.\s*\([a-z]\)/. \U\1/g; s/^\([a-z]\)/\U\1/'

Search & Replace - Replace specific words or phrases:

sed 's/old/new/g'

Append Timestamp - Add the current date and time at the end:

cat; echo " ($(date '+%Y-%m-%d %H:%M'))"

Remove Filler Words - Strip out common filler words:

sed 's/ \(uhm\|uh\|um\|like\|you know\) / /g; s/  */ /g'

Pipe to Clipboard + Return - Copy text to clipboard and still return it:

tee >(pbcopy)

Custom Script File - Run an external script:

~/scripts/process.sh

Configuration

  • Script Command - The shell command to execute. Text is passed via stdin, output is read from stdout.
  • Timeout - Maximum execution time in seconds before the script is killed (default: 10s).
  • Profile Filter - Optionally limit execution to specific profiles.

Setup

  1. Open TypeWhisper Settings > Integrations
  2. Find the Script Runner plugin and click Configure
  3. Enter your shell command or path to a script
  4. Optionally set a timeout and profile filter
  5. Transcriptions will be processed through your script automatically