How to run a Terminal command from your iPhone or iPad

TouchDeck never runs shell commands itself, on purpose. A macOS Shortcut can, and a key can run that Shortcut.

Dev serverGit pullTests
  1. On your Mac, open the Shortcuts app and make a new shortcut.
  2. Add the Run Shell Script action. For a command in a new Terminal window, paste: osascript -e 'tell application "Terminal" to do script "npm run dev"' (change npm run dev to your command).
  3. Name the shortcut, for example Start dev server.
  4. In TouchDeck, add a key and choose the macOS Shortcut action, then pick that shortcut from the list.
  5. Press the key. The command runs on your Mac, in a script you wrote.

The list comes from your Mac, so connect to it first. The command stays on the Mac and the iPhone only presses the key.

Related tips

Updated 2026-11-18. New to TouchDeck? Start with the help guide, or see what it does.

Launch offer · limited time

Your first month of TouchDeck Pro, free.

Every feature on all your iPhones and iPads for one month. After that it's $2.99 a month, and you can cancel any time before then.

QR code that opens the offer on your iPhone or iPad

Scan with your iPhone or iPad to redeem it there. Or open the offer link on your device.

Offer code LAUNCHOFFER · new subscribers · renews monthly after the free month