Relay Documentation

Everything you need to get the most out of Relay.

Installation

Relay can be installed as a DMG or via Homebrew.

Direct Download

Universal Binary for Apple Silicon and Intel.

Download Page

Homebrew

brew install --cask relay
Requirements: macOS 14 Sonoma+, Universal Binary (Apple Silicon & Intel)

First Steps

After installation, you're ready in three steps.

1

Choose a theme

Open Settings and pick one of 16 themes. The entire visual system changes instantly.

2

Set your prompt style

Choose one of 12 prompt styles. The change is applied live to the current shell.

3

Set up workspaces

Create workspaces for different projects. Each workspace has its own panes, themes, and layouts.

Keyboard Shortcuts

Essential keyboard shortcuts for fast workflows.

ShortcutAction
⌘TNew pane
⌘WClose pane
⌘DSplit horizontal
⌘⇧DSplit vertical
⌘⌥]Focus next pane
⌘⌥[Focus previous pane
⌘+Increase font size
⌘−Decrease font size
⌘0Reset font size (13)
⌘IToggle info panel
⌘\Toggle icon rail
⌘PCommand palette

Theme System

Relay's theme system consists of three layers that together control the entire look and feel of the app.

Three-Layer Architecture

Each theme is composed of three independent layers that work together.

Layer 1

AppTheme

Controls the app chrome: backgrounds, borders, accent color, glassmorphism, glow effects.

Layer 2

TerminalTheme

Defines the ANSI color palette: 8 normal + 8 bright colors, cursor, selection, background.

Layer 3

PromptStyle

Determines the prompt layout: symbols, colors, powerline segments, git info display.

Glass Themes

Six modern themes with glassmorphism, glow effects, and unique typography.

Relay Dark Midnight Aurora Obsidian Sunset Arctic

Retro Themes

Ten historical terminals (1971–1989) as complete visual identities with scanlines and period-accurate fonts.

BBC Micro Apple II Amstrad CPC VT100 Amber IBM 3270 Xerox Alto Game Boy ZX Spectrum Retro DOS C64

Design Tokens

Each theme defines 93 design tokens that control the entire visual appearance.

bg · bgElevated · bgTerm · bgTabBar accent · accentGlow · accentDim border · borderHi fg · fgSecond · fgTertiary glassTint · glassBorder · glassHighlight scanlines · suggestedFontName · suggestedPromptStyle

Light/Dark Mode

Relay supports a light and a dark theme with automatic switching based on macOS system appearance.

Color Scheme

ModeDescription
DarkUses the configured dark theme (default: Relay Dark).
LightUses the configured light theme (default: Relay Light).
SystemAutomatically switches between light and dark when macOS changes appearance.

Configure the mode in Settings → Appearance → Color Scheme. In System mode, Relay observes the macOS appearance and switches themes instantly.

Pane Layouts

Six layout presets let you split a workspace into up to 4 panes. Layouts are saved per workspace.

LayoutPanesDescription
Single1Default — a single pane
2 Side2Two panes side by side
2 Stack2Two panes stacked
1+23One large pane left, two small on the right
2×24Four panes in a 2×2 grid
Focus2One focused pane, one dimmed secondary pane
Layouts auto-adjust: adding a pane upgrades the layout, removing one downgrades it.

Prompt Styles

11 built-in prompt styles — selectable in Settings, applied live instantly. No .zshrc editing needed.

StyleOriginPowerline
Relay CompactBuilt-in
RobbyrussellOh My Zsh
BureauOh My Zsh
MinimalBuilt-in
BiraOh My Zsh
LambdaOh My Zsh
PowerblocksBuilt-in
AgnosterPlugin
SpaceshipPlugin
Powerlevel10kPlugin
StarshipExternal (Rust)
Powerline styles require a Nerd Font. Relay uses JetBrains Mono Nerd Font by default.

Workspaces

Workspaces are isolated environments with their own state. Each workspace stores:

  • Its own theme and terminal color palette
  • Its own pane layout (Single, 2×2, Focus, etc.)
  • Its own panes with individual shells
  • Persistence between sessions (tabs, CWD, layout)
  • Broadcast mode: send input to multiple panes at once
  • Optional custom shell path per workspace

Project Memory

Relay persists per-project context to disk. Commands, directories, and usage frequency survive across sessions.

  • Commands are deduplicated per project — stored with use count and last exit code
  • Visited directories are tracked with visit count and timestamp
  • Retention is configurable: 7 days, 30 days, or unlimited
  • Most-used commands appear in the sidebar under 'Project History'

Storage

One JSON file per project is stored under the configured path (default: ~/.config/relay/memory/). Max 500 commands and 200 directories per project.

~/.config/relay/memory/<hash>.json

On app launch, old entries are automatically pruned based on the retention setting. Empty project files are removed.

Shell Integration

Relay integrates deeply with the shell to track commands, exit codes, and working directories. The integration is installed automatically on every launch.

Supported Shells

ShellIntegrationHooks
zshZDOTDIR → ~/.config/relay/precmd / preexec
bash--rcfile ~/.config/relay/.bashrcPROMPT_COMMAND + DEBUG trap
fish-C source ~/.config/relay/fish/fish_preexec / fish_postexec

OSC Sequences

Relay uses Operating System Command (OSC) sequences for communication between shell and app.

OSCPurpose
OSC 133;APrompt start
OSC 133;BCommand start (user typing)
OSC 133;COutput start (command submitted)
OSC 133;D;exitCommand finished with exit code
OSC 7Current working directory
OSC 1337iTerm2 compatibility (CurrentDir)
OSC 9999;askRelay commands (ask, save)

Shell Modes

Relay offers two modes for shell configuration.

Relay Prompt

Isolated shell configuration. Relay manages the prompt entirely. Ideal for consistent behavior.

User .zshrc

Loads your own ~/.zshrc with Relay hooks. Compatible with oh-my-zsh, p10k, and Starship.

Per-Pane Shell Mode

Each pane can individually switch between Relay prompt and user zshrc — directly in the pane header, without opening settings.

  • A badge in the pane header shows the active mode: 'relay' (terminal icon) or 'zshrc' (person icon)
  • Clicking the badge terminates the current shell and relaunches it with the other mode immediately
  • Each pane keeps its own mode — independent of other panes and the global setting

Info Panel

The Info Panel (⌘I) shows contextual information about the active workspace and pane.

Project Memory

Shows the current project context: path, git branch, runtime. Persistent between sessions.

Recent Commands

The last 5 commands with exit code badge (green/red/orange) and timestamp.

Favorites

Favorited commands and directories. Marked via star icon, persistently stored.

Working Directories

History of visited directories. Click to navigate there instantly.

Open Ports

Relay automatically detects open ports and their associated processes on the system.

  • Automatic detection of all listening TCP ports
  • Display of port, process name, and PID
  • Process tree kill per click (getpgid + SIGKILL)
  • Sudo fallback for insufficient permissions (copies command to clipboard)

VPN Detection

Relay detects active VPN tunnels (OpenVPN, WireGuard, Tailscale, NordVPN, Mullvad, Cisco AnyConnect and 14+ more providers) and shows interface, IP, and provider in the Info Panel.

AI Agent

The built-in AI agent answers questions right in the terminal. It knows the shell context (recent commands, CWD, output) and can help with targeted assistance.

Usage

relay ask "What does this command do?"

Providers

ProviderModels
OpenAIgpt-4o-mini, gpt-4, gpt-4o
Anthropicclaude-haiku-4-5, claude-sonnet, claude-opus

Slash Commands

CommandDescription
/helpShow help
/saveSave conversation
/clearClear history
/modelSwitch model
/copyCopy last response
/contextShow shell context
/runExecute command
/tokensShow token usage
/exitExit agent

Automatic Error Explain

When a command exits with a non-zero exit code, Relay offers to have the AI agent explain the error.

  • Failed commands show a red dot and an 'Explain?' badge in the sidebar on hover
  • Clicking 'Explain?' sends 'relay explain' to the shell — the AI agent explains the last command
  • Requires a configured AI provider (Anthropic or OpenAI) in settings

Semantic Colorizer

Relay automatically colorizes terminal output: errors, warnings, URLs, paths, and numbers get context-aware colors — without overwriting existing ANSI output.

PatternColorExample
ErrorsRed (bold)error, fatal, exception
WarningsYellowwarning, deprecated
SuccessGreenOK, Done, PASSED, ✓
URLsBlue (underline)https://...
PathsCyan/usr/local/bin
IPv4Yellow192.168.1.1
Numbers + UnitsMagenta340ms, 18.4MB

Command Blocks

Every command and its output is treated as a discrete block with visual separators. Right-click any command in RECENT for block actions.

Visual Separators

Subtle gradient lines between commands make the terminal scannable at a glance.

Block Actions

Right-click in RECENT → Copy Output, Re-run, Scroll to Block, Add Favorite.

⌘⇧↑
Block Navigation

⌘⇧↑ / ⌘⇧↓ to jump between command blocks.

Inline Autocomplete

IDE-style dropdown that appears as you type, showing subcommands, flags, and descriptions.

git commit --message, --amend, --all, --no-edit...

Built-in completion specs for:

git docker npm cargo brew

Navigate with ↑/↓, accept with Tab, dismiss with Esc.

Inline Images

Display images directly in the terminal using the Kitty Graphics Protocol.

relay imgcat ~/Desktop/photo.png

Supports PNG, JPEG, GIF. Uses Kitty protocol with chunked base64 transmission for large files.

Automatic Profile Switching

Theme changes automatically based on context — visual safety net for dangerous environments.

🔴
SSH

SSH connections switch to a warning theme (e.g., Obsidian). Configurable per host pattern.

📁
Directory Rules

Switch theme when entering specific directories. Match with regex patterns.

Clickable Paths & URLs

File paths and URLs in terminal output are clickable. ⌘+Click to open — paths open in Finder, URLs in your browser. Uses the OSC 8 hyperlink standard.

⌘+Click → /usr/local/bin/node → opens in Finder

Regex Triggers

Automatic actions when terminal output matches a pattern. Configure in Settings → Appearance → Regex Triggers.

🔔
Notifications

macOS notification when output matches (e.g., 'BUILD SUCCEEDED').

🔊
Sound

Play a sound on pattern match (e.g., 'BUILD FAILED').

Parameterized Snippets

Reusable command templates with placeholder parameters. Double-click in the sidebar to run.

deploy {{service}} to {{env}}

When executed, a form appears for each placeholder. Live preview shows the resolved command before running.

Session Blueprints

Save workspace layouts as reusable templates. Each blueprint defines panes, starting directories, and auto-start commands.

Configure in Settings → Integration → Session Blueprints. Launch from the sidebar BLUEPRINTS section.

Pane Coloring

Assign colors to panes via right-click on the pane header. Choose from 7 preset colors (green, red, yellow, blue, purple, orange, cyan) to visually distinguish environments.

CI/CD Pipeline Monitor

Monitor GitHub Actions directly in Relay. After git push, the pipeline status appears live in the sidebar.

Auto-Detection

Detects git push from any shell (Relay, external terminal, IDE) via filesystem watching.

📊
Live Updates

Steps update every 5 seconds with animated progress bar and pulsing status dots.

📋
Job Logs

Click any step to view its logs in a popover. Copy logs to clipboard with one click.

Settings → CI/CD Pipeline → GitHub Token

Settings

Relay organizes 40+ settings into 7 pages. All settings are stored in UserDefaults and take effect immediately. Groups: General (Appearance, Keyboard) · Terminal (Shell & Environment, Notifications) · Advanced (Storage & Sessions, Shell Integration, AI Assistant).

Page 1: Appearance

Theme, color scheme, font, cursor, transparency, and semantic highlighting — all on one page.

SettingDefaultDescription
colorSchemeEnabledfalseEnable auto appearance (Light/Dark/System)
colorSchemedarkMode: dark · light · auto (follows macOS)
appThemeIDrelay-darkApp theme (17 themes: 7 glass + 10 retro)
themeIDdark-defaultTerminal color palette (ANSI colors)
promptStyleIDrobbyrussellPrompt style (11 styles)
fontSize13Font size (8–32)
fontNameJetBrains Mono NerdFont family (Nerd Font recommended)
backgroundOpacity0.7Background opacity
semanticHighlightingtrueAuto-colorize errors, paths, URLs
cursorShapeblockblock · bar · underline
cursorBlinktrueCursor blinking on/off
cursorColorHex#4af09aCursor color (hex)

Page 2: Keyboard

Overview of all 20 keyboard shortcuts — from ⌘T (new tab) to ⌘0 (reset font).

Page 3: Shell & Environment

Shell program, login mode, startup directory, environment variables, and PATH extensions.

SettingDefaultDescription
shellPath$SHELLShell path (auto-detected)
shellLoginModetrueLogin shell (-l flag)
shellArgsAdditional shell arguments at launch
useUserZshrcfalseUse own .zshrc
optionAsMetafalseOption key as Meta
inheritSystemEnvtrueInherit system environment (default: enabled)
pathExtensionsPATH extensions (prepended to PATH)
autoLoadDotenvfalseAuto-load .env files in the working directory

Page 4: Notifications

Bell behavior, long-running command notifications, and webhook integration.

SettingDefaultDescription
audibleBellfalseSystem sound on terminal bell
visualBelltrueBrief flash on terminal bell
notifyLongCommandtrueNotify on commands > N seconds (background only)
webhookURLPOST request to custom URL on command finish

Page 5: Storage & Sessions

Project memory, session persistence, backup, and broadcast controls.

SettingDefaultDescription
projectMemoryEnabledtrueEnable project memory (per-directory context)
projectMemoryRetention30 TageRetention: 7 days · 30 days · Unlimited
saveTabsOnQuittrueSave tabs on quit
restoreWorkspacesOnLaunchtrueRestore workspaces on launch

Page 6: Shell Integration

Optional shell script enabling precise command tracking via OSC 133/7. Can be toggled on/off.

Page 7: AI Assistant

Provider selection (Anthropic/OpenAI), API keys, model configuration, and context control.

SettingDefaultDescription
aiEnabledfalseEnable AI assistant (relay ask / relay explain)
aiProvideranthropicProvider: anthropic · openai
aiContextLines50Number of shell history lines as context (0 = no context)

Relay-specific Variables

RELAY_PROMPT_STYLE # Active prompt style RELAY_AI_PROVIDER # AI provider (anthropic/openai) RELAY_AI_API_KEY # API key RELAY_AI_MODEL # Model ID RELAY_AI_CONTEXT # Shell context for AI