OhMyTerminal is an iOS application designed to remotely control your Mac's iTerm2 from your iPhone. It allows you to run shell commands, execute AppleScripts, and manage server macros via a secure SSH connection.
- SSH Tunneling: Securely connect to your Mac via SSH (Password authentication supported).
- Macro Pad: Configurable grid of buttons to run common commands (e.g.,
git pull,npm start,docker-compose up). - iTerm2 Integration: Open new tabs, split panes, and control iTerm2 sessions using AppleScript over SSH.
- Server Management: Save and manage multiple Mac connection profiles.
- Terminal Emulator: Built-in terminal view for direct command interaction (powered by SwiftTerm).
- iOS Device: Running iOS 16.0 or later.
- Mac:
- macOS with Remote Login enabled.
- iTerm2 installed and running.
To allow the app to control your Mac, you must configure the following settings:
- Go to System Settings > General > Sharing.
- Toggle Remote Login to On.
- Note the connection string (e.g.,
ssh user@192.168.1.5).
The app sends AppleScripts via SSH to control iTerm2. macOS requires explicit permission for this.
- Go to System Settings > Privacy & Security > Automation.
- Find
sshd-keygen-wrapper(orsshd) in the list. - Ensure iTerm2 is checked under it.
- Note: If you don't see this entry, try running a "New Tab" macro from the app first. A popup will appear on your Mac asking for permission—click Allow.
SSH connections fail if the Mac is sleeping.
- Recommended: Use an app like Amphetamine to keep your Mac awake while working.
- Alternative: Go to Battery/Energy Saver settings and enable "Wake for network access" (Wake on LAN), though this works best when plugged into power.
-
Clone the repository:
git clone https://github.com/seungwan/OhMyTerminal.git open OhMyTerminal.xcodeproj
-
Add Dependencies: Open Xcode and ensure the following Swift Packages are added (File > Add Package Dependencies):
- SwiftTerm (Terminal Emulator)
- Citadel (SSH Client)
- KeychainAccess (Optional, for secure storage)
-
Build & Run: Select your target (iPhone Simulator or Device) and hit
Cmd + R.
- App: Entry point and Dependency Injection.
- Core: Networking (SSH), Models, and Error handling.
- Features:
Dashboard: Server list and management.RemoteControl: The main controller interface (Terminal & Macros).
- Utils: Constants and Extensions.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License.