Remote control your PC from any browser.
Project description
AnywhereInput
Control your Windows, Linux, or macOS PC from any browser. No app install, no account, no cloud dependency.
AnywhereInput is a lightweight open-source remote control tool. Run a Python server on your PC and control it from any browser — no app or account needed. It supports mouse, keyboard, scrolling, real-time screen capture, and zero-config tunnel support with 5 providers plus a local-only mode.
Why AnywhereInput?
Every remote control tool forces you through friction:
| Tool | Friction |
|---|---|
| TeamViewer / Chrome Remote Desktop | Account creation, bloated client, corporate telemetry |
| VNC / RDP | Port forwarding, firewall rules, VPN setup |
| Dedicated apps | App store, permissions, updates |
AnywhereInput does none of that. Open a browser, paste a link, control your PC. The server is yours. The connection is direct. The client is the web.
Quick Start
Windows (Recommended)
scripts\windows\setup.bat
scripts\windows\run.bat
Linux / macOS
chmod +x scripts/unix/setup.sh scripts/unix/run.sh
./scripts/unix/setup.sh
./scripts/unix/run.sh
pip — install from PyPI (any platform)
pip install anywhereinput
anywhereinput
anywhereinput --tunnel cloudflare
anywhereinput --tunnel local
anywhereinput --help-tunnels
Ubuntu (recommended): pipx install from PyPI
sudo apt update
sudo apt install -y pipx
pipx ensurepath
# Open a new terminal, then install and run
pipx install anywhereinput
anywhereinput --tunnel cloudflare
Package on PyPI: https://pypi.org/project/anywhereinput/
Important Notes
- See docs/IMPORTANT.md for critical security, tunnel, and troubleshooting notes.
- See IMPORTANT.md in the repository root for quick operator guidance before first run.
- Client monitor selection supports all detected displays from the monitor dropdown (including Auto mode).
Tunnel Providers
| Provider | Cost | Account | Setup | Notes |
|---|---|---|---|---|
| Cloudflare Tunnel | Free | ❌ No | Auto-downloaded | Fastest globally, random URL per session |
| Tailscale | Free | ✅ Yes (free) | Install + log in once | Peer-to-peer via tailnet IP — both devices on same tailnet |
| Pinggy.io | Free | ❌ No | Uses SSH client | 60 min session timeout, works behind firewalls |
| Zrok2 | Free (5 GB/day) | ✅ Yes | Manual install | Open source, zero-trust architecture |
| ngrok | Free tier | ✅ Yes | Download + config | Reliable, large ecosystem, session limits on free |
Local-only mode is also available via --tunnel local (no tunnel process, same WiFi/LAN).
Features at a Glance
Control
- Mouse — Move, click (left/right), double-click, scroll
- Keyboard — Single keys, hotkey combos (Ctrl+C, Ctrl+Alt+Del, etc.)
- Screen Capture — Real-time JPEG stream from server to browser
- Screen Overlay Click — Tap anywhere on the live screen to move cursor there
- Touchpad Gestures — Two-finger scroll, long-press right click, tap-to-click
Settings
- Adjustable mouse sensitivity (0.3x – 3.0x)
- FPS counter overlay
- Stream quality & scale control
- Screen capture toggle
- Live engine recovery status banner during capture interruptions
Performance
- ~60 Hz mouse updates
- Configurable screen stream FPS (1–120), JPEG quality (1–95), scale (0.1–1.0)
- Multi-monitor support with auto cursor tracking across monitors
Architecture
┌─────────────────+─────────────────────────────────┐
│ │ │
│ Your Device │ Your PC │
│ (Any Browser) │ (Python Server) │
│ │ - aiohttp HTTP/WS │
│ Screen Stream ├──────►| - MSS/PIL capture │
│ <─────────────+------►| - pyautogui input │
│ │ └─────────────────────────┘
└─────────────────+─────────────────────────────────┘
│
▼
+─────────────────+
│ Tunnel Provider │ (Optional, for remote)
│ Cloudflare / │
│ Tailscale / │
│ Pinggy / │
│ Zrok2 / ngrok │
└─────────────────+
CLI Options
| Flag | Default | Description |
|---|---|---|
--host HOST |
127.0.0.1 |
Server host bind address |
--port PORT |
8008 |
Server port |
--fps FPS |
120 |
Screen capture FPS (1–120) |
--quality Q |
85 |
JPEG quality (1–95) |
--scale F |
1.0 |
Screen scale factor (0.1–1.0) |
--no-capture |
— | Disable screen capture entirely |
--monitor N |
0 |
Monitor to capture (0=auto, 1+=fixed) |
--tunnel P |
interactive menu | Tunnel provider: cloudflare, tailscale, pinggy, zrok2, ngrok, local |
--help-tunnels |
— | Show tunnel provider quick help and exit |
--version |
— | Show installed version and exit |
Example:
anywhereinput --fps 15 --quality 75 --scale 0.7 --tunnel cloudflare
How It Works
- Run the server on your PC (
anywhereinput,run.sh, orrun.bat) - Select your tunnel provider from the menu
- Open a browser on any device (phone, tablet, laptop)
- Paste the URL displayed in the terminal
- Enter the access token and tap Connect
- Use the touchpad to control your PC, or tap the screen stream to move the cursor
Client Controls
| Action | How |
|---|---|
| Move cursor | Drag on the touchpad area |
| Left click | Tap touchpad or tap Left Click button |
| Right click | Long-press touchpad (600ms) or Right Click button |
| Double click | Double Click button |
| Scroll | Two-finger drag, or Scroll Up/Down buttons |
| Keyboard | Tap Keyboard, type text, send |
| Hotkeys | Pre-mapped: Ctrl+A through Ctrl+F, Ctrl+Alt+Del |
| Center mouse | Tap Center button |
| Screen overlay click | Tap anywhere on the live screen stream |
WebSocket API
Authentication
Connect to /ws and send:
{"type": "auth", "token": "***"}
Commands
{"type": "move", "mode": "relative", "dx": 10, "dy": 15}
{"type": "move", "mode": "absolute", "dx": 0.5, "dy": 0.5}
{"type": "click", "button": "left", "clicks": 1}
{"type": "scroll", "amount": 15}
{"type": "key", "key": "enter"}
{"type": "hotkey", "keys": ["ctrl", "c"]}
{"type": "screen_toggle", "enabled": true}
{"type": "ping"}
Server Events
{"type": "screen", "data": "<base64-jpeg>"}
{"type": "screen_status", "status": "rebuilding", "message": "Reconnecting to display..."}
{"error": "capture_error", "message": "Input engine is recovering.", "recovering": true}
{"error": "capture_engine_offline", "message": "Input engine is offline. Retry shortly."}
HTTP Endpoints
| Endpoint | Description |
|---|---|
GET /api/screen |
Returns screen dimensions |
GET /api/engine |
Returns input engine health plus screen_engine state |
GET /api/monitors |
Returns all monitor info + current selection |
POST /api/monitor/{index} |
Switch capture monitor |
Access Methods
Local Network (same WiFi)
No tunnel needed. Just open your browser and navigate to:
http://<your-pc-ip>:8008
Remote Access
Use any supported tunnel provider above for secure remote access from anywhere.
Security
⚠️ Designed for personal/trusted use. Not hardened for production.
- ✅ Auto-generated 32-char token on each server start
- ✅ Token rotation via Ctrl+N or
n+ Enter - ✅ HTTPS/WSS encryption when using any tunnel provider
- ✅ No data stored on external servers
- ❌ Single token per session
- ❌ No rate limiting
- ❌ No IP whitelist
- ❌ No logging/monitoring
For enterprise-grade security, add a reverse proxy with OAuth or mTLS.
System Requirements
| Component | Minimum |
|---|---|
| Server OS | Windows 10/11, Linux, macOS |
| Python | 3.9+ |
| Client | Any browser with WebSocket + Pointer Events + Touch Events |
| Internet | Required on both devices for remote access |
Dependencies
Runtime dependencies are pinned to exact versions in pyproject.toml for reproducible installs.
pyautogui==0.9.54
aiohttp==3.13.4
requests==2.32.5
qrcode[pil]==8.2
mss==10.1.0
Pillow==11.3.0
pyyaml==6.0.2
Packaging note
If new dependencies are required, add them to pyproject.toml (this project does not use a runtime requirements.txt workflow).
Potential optional dependencies (defer until needed):
pydirectinput==1.0.4 # Optional, for DirectInput fallback
pywin32==312; platform_system=="Windows" # For Windows session APIs
Troubleshooting
| Problem | Fix |
|---|---|
| Tunnel URL not showing | Check internet; verify provider status; try another provider |
| Can't connect from device | Check firewall allows port 8008; test http://localhost:8008 on PC first |
| Connection timeout | Verify both devices have internet; check tunnel provider status |
| Mouse moving too slow / lag | Check network latency; reduce drag distance; try local network |
| Screen capture shows black cursor | Install mss; on Linux, ensure X11 display is accessible |
| Screen stream is blank | Check server logs; try --no-capture; ensure Pillow is installed |
| Keyboard double-typing | Client uses 50ms debounce; check mobile keyboard autocorrect |
| Zrok2 "not enabled" error | Run zrok2 enable <TOKEN> or use zrok2_repair.py |
| Cloudflared not found | Auto-downloads on first run; if fails, install manually: winget install --id Cloudflare.cloudflared (Windows) or brew install cloudflared (macOS) |
| Python not found | Install Python 3.9+ from python.org, ensure it's on PATH |
Getting Started Guide
Cloudflare Tunnel
- Run
run.bat/./run.shand select Cloudflare Tunnel - The launcher auto-downloads cloudflared if not found
- Wait 10–20 seconds for the tunnel to establish
- Copy the URL (
https://xxx.trycloudflare.com)
Tailscale
- Install Tailscale on both PC and device
- Log in to the same account on both devices
- Run
run.bat/./run.shand select Tailscale - Your PC displays its Tailnet IP — connect from any other tailnet device
Pinggy.io
- Ensure you have an SSH client installed:
- Windows: Enable OpenSSH Client in Settings > Apps > Optional Features
- Linux:
sudo apt-get install openssh-client - macOS: Built-in
- Run
run.bat/./run.shand select Pinggy - If prompted for a password, press ENTER (blank password)
- Copy the URL (
https://xxx.a.free.pinggy.link)
Zrok2
- Download zrok from github.com/openziti/zrok/releases
- Run
zrok inviteto create an account (one-time) - Run
zrok2 enable <TOKEN>(get token from zrok.io dashboard) - Run
run.bat/./run.shand select Zrok2
ngrok
- Download ngrok from ngrok.com/download
- Sign up at dashboard.ngrok.com/signup
- Get your auth token from your authtoken page
- Run
run.bat/./run.shand select ngrok
Roadmap
- ✅ Unified tunnel launcher (5 providers)
- ✅ Tailscale peer-to-peer support
- ✅ Auto-download cloudflared binary on all platforms
- ✅ Zrok2 environment check and auto-enable
- ✅ Pinggy SSH tunnel with URL parsing
- ✅ Terminal QR code generation
- ❌ Android/iOS companion app
- ❌ Video streaming mode
- ❌ File transfer over tunnel
- ❌ Enterprise SSO integration
Contributing
See CONTRIBUTING.md for details.
License
MIT License — See LICENSE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anywhereinput-1.1.6.tar.gz.
File metadata
- Download URL: anywhereinput-1.1.6.tar.gz
- Upload date:
- Size: 52.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55a5d3a5871c6cec1592f813572e4728804baa493f39f43508e339340003c356
|
|
| MD5 |
1aceeae84592d5280c94a2963ec78939
|
|
| BLAKE2b-256 |
85f3a378f2972fc269dae9e880f0f6df85a16d8440aaa389d65a3d5b58a31323
|
File details
Details for the file anywhereinput-1.1.6-py3-none-any.whl.
File metadata
- Download URL: anywhereinput-1.1.6-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e50949f55cdbf4b7ebdf28f35da0df00db1c8ed91d7acf0d30e7359c2859fe1
|
|
| MD5 |
1539570bea9b85796f9668c51550b440
|
|
| BLAKE2b-256 |
6677b9ccdb0152955d70117665db9f513221899c438994e4a363fc8665d274b4
|