Skip to content

Workflows

A workflow is any executable. Configure it in Settings › Workflows or in config.toml:

[[workflow]]
name = "Summarize"
command = "~/bin/summarize.sh"      # ~ is expanded; relative names are looked up on PATH
args = []
triggers = ["transcript-ready"]     # recording-started | recording-stopped | transcript-ready | error | manual
enabled = true
timeoutSec = 600
env = { REX_SUMMARIZER = "claude -p" }

Contract

Rex runs /usr/bin/env <command> <args…> <meeting-folder> with:

  • working directory = the meeting folder
  • meeting.json on stdin
  • environment: REX_EVENT, REX_MEETING_DIR, REX_MEETING_ID, REX_MEETING_JSON (path), REX_TRANSCRIPT_JSON (path, when it exists), REX_APP_VERSION, plus the workflow's env table. PATH gains ~/.local/bin, ~/bin, /opt/homebrew/bin, /usr/local/bin so user tools are found even when Rex was launched from Finder.
  • stdout + stderr → workflows/<name>-<yyyyMMdd-HHmmss>.log in the meeting folder (readable from the meeting detail view's Logs button and from Settings › Workflows › Test Run).

Writing summary.md into the meeting folder makes Rex show it in the meeting detail.

Rules

  • Workflows run any time, including while a recording is in progress — they are separate processes and cannot affect the capture. A recording-started run sees an incomplete folder: no transcript yet, audio still being written.
  • Runs against the same meeting are serialised; different meetings run in parallel.
  • timeoutSec kills a hung run (SIGTERM, then SIGKILL). Cancel in the UI does the same.
  • A non-zero exit is reported in the app (and as a macOS notification) and fires the error trigger once - never from an error run itself, never for a cancellation.
  • manual workflows show up as buttons on every meeting. Any configured workflow can also be run from a terminal: rex run-workflow <name> <meeting-folder>.

Examples

Examples/workflows/summarize.sh pipes transcript.md through $REX_SUMMARIZER (default claude -p) and writes summary.md; copy-to-obsidian.sh writes a note into $OBSIDIAN_VAULT/$OBSIDIAN_FOLDER. Both read every secret and path from environment variables and ship disabled - see Examples/workflows/README.md.