All pages
Docs · Configuration
Scripting (AppleScript & Shortcuts)
Availability: macOS only. AppleScript and the Shortcuts app.
TRMNLY is scriptable from the outside: an AppleScript dictionary for
Script Editor / osascript automation, and App Intents for the
Shortcuts app. Both drive real windows, tabs, and terminals — and both
pass through consent gates you control.
AppleScript
The dictionary (open TRMNLY in Script Editor's Library to browse it)
exposes application → windows → tabs → terminals, each with stable
ids and titles. Commands include:
new window,new tab,split— create surfaces (with an optional surface configuration: working directory, command, environment)input text,send key,send mouse button / position / scroll— synthesize input into a terminalqueue command,run next queued command,clear command queue— drive a terminal's command queue instead of typing blindfocus,activate window,select tab,close,perform action
Queueing is the reliable way to run commands from a script — each entry fires when the previous command finishes, rather than pasting into whatever happens to be running:
tell application "TRMNLY"
queue command "npm test" to terminal 1 of tab 1 of window 1
end tell
AppleScript support is gated by the macos-applescript configuration
option; when disabled, scripts get a clear "disabled by configuration"
error instead of silent no-ops.
Shortcuts (App Intents)
The Shortcuts app sees TRMNLY actions for the same surface: New Terminal, Focus Terminal, Close Terminal, Input Text to Terminal, keyboard/mouse event actions, Get Details of Terminal, Queue Command in Terminal, Run Next Queued Command, Clear Terminal Command Queue, Open the Quick Terminal, Invoke a Keybind Action, and Invoke Command Palette Action.
Terminals appear as first-class entities, so a shortcut can pick a specific pane, read its details, and chain actions — from an Automation, a Focus filter, or your Mac's menu bar.
Intents ask for permission before they touch a terminal; a denied intent fails with a permission error rather than partially running.
Consent and safety
Every scripted "run a command" request passes the same screening, whatever the entry point:
- Per-source toggles in Settings → Security — AppleScript, Shortcuts, and other scripted sources are enabled independently, so pausing one doesn't break the others.
- Rate limits — each source has its own per-minute budget; a runaway Shortcut can't machine-gun commands into your shell.
- Payload screening — command text containing terminal escape sequences, control characters, or Unicode trickery (BiDi overrides, zero-width characters) is rejected outright, so a script can never smuggle an escape sequence past a preview dialog.
See Agent safety for the broader posture these gates belong to.