Run a shell command from a button
No shell action in Discover. Use AppleScript (do shell script) or a Shortcut that runs a shell script. Pro Macros can chain them.
Short answer
DeckPilot has no separate shell-command action in Discover. Run a command with the AppleScript action (Pro) using do shell script, or build a macOS Shortcut that uses Run Shell Script and fire it from the Shortcuts action. Pro Macros can chain that script with other steps. Test the command in Terminal first, and skip sudo.
5 steps
Confirm there is no shell action
Discover’s button actions include AppleScript, Shortcuts, and Macros. There is no Shell, Terminal, or Run Script action. The AppleScript and Shortcuts actions are both marked Pro.
Method 1 — AppleScript with do shell script
In the deck editor, click an empty cell and choose AppleScript. Paste a command you already ran in Terminal. do shell script works in DeckPilot 1.3.2 and later; older builds refuse it with “Shell script execution is not permitted.” Update from DeckPilot › Check for Updates if you see that. Quote paths that contain spaces, and prefer a full path to the binary — a menu-bar app gets a minimal environment, not your interactive shell.
do shell script "/usr/bin/git -C /Users/you/repo pull"Use Test in the script editor before you save. DeckPilot stops a script after 30 seconds, so keep the command short.
Method 2 — Shortcuts “Run Shell Script”
Open Shortcuts on the Mac, create a shortcut, and add the Run Shell Script action with the same command. In DeckPilot, add a button, choose Apple Shortcuts, and pick that shortcut. DeckPilot runs the Shortcut on the Mac. It does not add its own shell action.
Chain it with a Macro (Pro)
A Macro can include an AppleScript or a Shortcut as one step, next to an app launch, a keystroke, or a wait. The macros page describes this as chaining keyboard shortcuts, app launches, scripts, and waits. Up to 20 steps.
Terminal, iTerm2, and Warp templates are shortcut decks
The Terminal template fires the app’s own keys: new tab, split pane, clear, interrupt. iTerm2 and Warp templates on the templates page work the same way. They do not type a command into the shell. Use them when you want the terminal’s shortcuts, and use AppleScript when you want a specific command to run.
A second sample: open an app
Same action, different command. Swap the path for something you have already tried in Terminal.
do shell script "/usr/bin/open -a Finder"Safety
Run the exact line in Terminal first. If it fails there, it will fail on the button.
Do not put sudo on a button. DeckPilot does not document a password prompt for shell scripts, and a button is the wrong place for an admin password.
The phone does not show command output. The script runs on the Mac. If you need to see a result, write it to a file or post a notification from the script.
Quote arguments with quoted form of when the path might contain spaces.
Free vs Pro
Keyboard shortcuts and Open App are on the free tier (8 buttons per deck), which covers the Terminal template’s tab and pane keys. AppleScript, Shortcuts, and Macros are Pro. $7.99/month, $39/year, or $79 lifetime (US list prices; local price may vary with purchasing-power pricing.)
Questions
Is there a shell command action?
Not as its own type. Discover has no shell or terminal action. Use AppleScript (do shell script) or a Shortcut that runs a shell script.
Can a button open Terminal and type a command?
do shell script runs the command on the Mac. It does not open a Terminal window or print the result on your phone. The Terminal, iTerm2, and Warp templates only fire those apps’ keyboard shortcuts.
Can I use sudo?
Do not. There is no documented admin prompt for a button script. Test a non-sudo command in Terminal, then bind that.
Do I need Pro?
Yes for AppleScript, Shortcuts, and Macros. A free deck can still fire Terminal’s keyboard shortcuts. Pro is $7.99/mo, $39/yr, or $79 lifetime. US list prices; local price may vary with purchasing-power pricing.
Where does the output go?
Not to the phone. DeckPilot does not show a shell output panel. Check the files the command wrote, or have the script post a macOS notification.