Skip to content

Seungwan98/OhMyTerminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OhMyTerminal 🖥️📲

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.

Swift Platform License

✨ Features

  • 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).

🛠️ Requirements

  • iOS Device: Running iOS 16.0 or later.
  • Mac:
    • macOS with Remote Login enabled.
    • iTerm2 installed and running.

⚙️ Mac Configuration (Important!)

To allow the app to control your Mac, you must configure the following settings:

1. Enable Remote Login (SSH)

  1. Go to System Settings > General > Sharing.
  2. Toggle Remote Login to On.
  3. Note the connection string (e.g., ssh user@192.168.1.5).

2. Grant Permissions

The app sends AppleScripts via SSH to control iTerm2. macOS requires explicit permission for this.

  1. Go to System Settings > Privacy & Security > Automation.
  2. Find sshd-keygen-wrapper (or sshd) in the list.
  3. 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.

3. Sleep Mode Settings

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.

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/seungwan/OhMyTerminal.git
    open OhMyTerminal.xcodeproj
  2. Add Dependencies: Open Xcode and ensure the following Swift Packages are added (File > Add Package Dependencies):

  3. Build & Run: Select your target (iPhone Simulator or Device) and hit Cmd + R.

📂 Project Structure

  • 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.

🤝 Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📜 License

Distributed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors