Use your iPhone as a trackpad and media remote for your Mac.
Mously is self-hosted on your Mac. There is no iPhone app to install, no account, no cloud service, and no analytics. Just open the paired address in Safari and control your Mac from your phone.
I wanted a simple solution to control my Mac from my iPhone. It should be fast, easy to set up, be able to do all the essential things and should not require an account or send anything through someone else's server. Mously turns your phone already in your hand into a trackpad, keyboard, app switcher, and media remote.
Mously requires macOS, Python 3.11+, and
uv.
To install Mously, simply run the following commands in your terminal:
uv tool install git+https://github.com/ericceg/mously.git
mouslyOn first launch, allow your terminal to control the Mac under System Settings
→ Privacy & Security → Accessibility, then restart Mously (use Control-C to stop it and run mously again).
Open the complete paired address printed in the terminal on an iPhone, typically
while both devices are connected to the same trusted Wi-Fi. Keep Mously running
while you use the remote; press Control-C to stop it.
It is also recommended to save the paired address to your iPhone's home screen for quick access. In Safari, tap the share button and select "Add to Home Screen".
Mously keeps the pairing token across restarts, so a saved home-screen app continues to work. To invalidate the old address and pair again, run:
mously --reset-pairingTo use a different port:
mously --port 9000- Move the mouse cursor with your finger
- Tap, double-click, right-click, scroll, and use native pinch-to-zoom gestures
- Control playback, volume, mute, and fullscreen mode
- Swipe to zoom in and out with the dedicated hold-to-zoom control
- Bring any open Mac app to the front
- Type text into the focused Mac app
On first launch, Mously creates a random pairing token and stores it in
~/Library/Application Support/Mously/pairing-token. Only a browser opened
with the complete paired address can connect. The same token is reused across
restarts so bookmarks and home-screen apps keep working; use
mously --reset-pairing to revoke it.
Important security note:
Traffic is not encrypted. Mously listens on all IPv4 interfaces (0.0.0.0)
and does not technically enforce LAN-only access. Anyone who can reach the port
and obtains the complete paired address can control your Mac. Use Mously only
on networks you trust, check your firewall and router exposure, do not share the
address, and stop Mously when you are finished.
Run directly from the repository:
uv run mouslyRun the tests:
uv run pytestGPL-2.0-only. See LICENSE.
The private macOS gesture-event serialization in mously/macos.py is adapted
from tl_CGEventCreateFromGesture in Calf Trail Software's
Touch project, copyright 2010 Calf Trail
Software, LLC. Touch is licensed under GPL-2.0-or-later; Mously exercises the
GPL version-selection option and distributes the adaptation under
GPL-2.0-only. See
Third-party notices for source and licensing
details.
