Share your mouse, keyboard, and screen between a Mac and a Windows laptop on the same network — like a free, self-hosted Barrier/Deskflow with optional extended display.
| Mode | Behavior |
|---|---|
| share | One mouse/keyboard moves across both machines. Move past the screen edge to control the other laptop. |
| extend | Same as share, plus streams the host screen to the client in fullscreen (second display experience). |
- Python 3.10+
- Both machines on the same Wi‑Fi or LAN
- Mac: grant Accessibility permission to Terminal (or your Python app)
System Settings → Privacy & Security → Accessibility - Windows: allow NeoShare through the firewall when prompted
On both Mac and Windows:
cd neoshare
python3 -m venv .venv
# Mac / Linux
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1
pip install -e .Usually your Mac:
neoshare host --mode share --position rightFor extended display mode:
neoshare host --mode extend --position rightNote the IP shown in the output (or run neoshare info).
Usually your Windows laptop:
neoshare client --peer-ip 192.168.1.42 --mode share --position rightOr let it auto-discover the host:
neoshare client --mode shareUse the same --mode and --position on both sides.
- Move the mouse to the right edge of the host screen (if
--position right) to control the client. - Move back across the left edge of the client to return to the host.
- Press Ctrl+C in either terminal to stop.
- In extend mode, press Esc on the client stream window to close the viewer.
neoshare info # local IP and screen size
neoshare discover # find peers on the network
neoshare host [options] # run as primary (mouse/keyboard machine)
neoshare client [options] # run as secondary machine| Flag | Default | Description |
|---|---|---|
--mode share|extend |
share | Input only, or input + screen stream |
--position right|left|above|below |
right | Client screen layout relative to host |
--port |
38472 | Control connection port |
--stream-port |
38473 | Screen stream port (extend mode) |
--fps |
20 | Stream frame rate |
--quality |
65 | JPEG quality (1–95) |
Mac terminal:
neoshare host --mode extend --position rightWindows PowerShell:
neoshare client --peer-ip <mac-ip> --mode extend --position right| Problem | Fix |
|---|---|
| Client can't connect | Same network, correct --peer-ip, firewall open on port 38472 |
| Mouse doesn't switch screens | Match --position on both machines; move firmly to the screen edge |
| Keyboard doesn't work on client | On Mac, enable Accessibility for Terminal/Python |
| Stream is laggy | Use Ethernet, lower --fps, or reduce --quality |
| No peers in discover | Start host first; some routers block broadcast — use --peer-ip |
┌─────────────────┐ TCP 38472 ┌─────────────────┐
│ HOST (Mac) │ ◄──── mouse/key/focus ───► │ CLIENT (Win) │
│ physical input │ │ injects input │
└────────┬────────┘ └────────┬────────┘
│ │
│ TCP 38473 (extend mode) │
└──────────── screen JPEG stream ───────────────►│
MIT