Skip to main content

AnywhereInput

Control your Windows, Linux, or macOS PC from any browser. No app install, no account, no cloud dependency.

Run a Python server on your PC and control it from any browser - mouse, keyboard, scrolling, real-time screen capture, with zero-config tunnel support.


⚡ Quick Install

Windows

pip install anywhereinput
anywhereinput --tunnel cloudflare   # or: tailscale, pinggy, zrok2, local

Pre-requirement: Python 3.9+ from python.org — make sure to check "Add Python to PATH" during installation.

macOS

pip3 install anywhereinput
anywhereinput --tunnel cloudflare

Note: Grant "Screen Recording" access to Terminal in System Settings > Privacy & Security.

Linux (Recommended: pipx)

sudo apt install pipx && pipx ensurepath   # install pipx (one-time, Ubuntu/Debian)
pipx install anywhereinput                 # installs all deps automatically
anywhereinput --tunnel cloudflare

pipx keeps the install isolated from system Python — no dependency conflicts, no sudo pip.

Linux (System pip)

# Pre-reqs for Pillow JPEG support and pyautogui X11 capture
sudo apt install libjpeg-dev zlib1g-dev libxrandr-dev
pip install anywhereinput
anywhereinput --tunnel cloudflare

Headless / Server-Only Mode

The --app flag requires a desktop display (X11/Wayland/Windows GUI). For headless servers, run without it:

# Server mode — works over SSH on any Linux server
anywhereinput --tunnel cloudflare   # starts the HTTP server only
# Then access from any device that can reach the URL

💡 The --quiet flag silences console output while keeping file logging active — useful for systemd or background processes.


🖥️ Desktop Admin App (Optional)

pip install anywhereinput[app]    # includes PyQt6
anywhereinput --app               # visual GUI - no terminal needed

⚠️ Requires a desktop display (X11/Wayland on Linux, or native Windows/macOS). On headless servers, skip --app and use the CLI/token API instead:

anywhereinput --tunnel cloudflare   # server works fine without GUI

The desktop app lets you start/stop the server, pick tunnel providers, manage access tokens with IP allowlists, and monitor connected clients - all from a visual window.


Why AnywhereInput?

Tool The Friction
TeamViewer / Chrome Remote Desktop Account creation, bloated client, corporate telemetry
VNC / RDP Port forwarding, firewall rules, VPN setup
AnywhereInput pip install → paste link → control your PC

✨ Features

  • Mouse - move, click (left/right/middle), double-click, scroll
  • Keyboard - key press, text typing, hotkey combos (Ctrl+C, Ctrl+Alt+Del, etc.)
  • Screen Capture - real-time JPEG stream to browser, up to 120 FPS (adaptive)
  • Touchpad Gestures - two-finger scroll, long-press right click, tap-to-click
  • Screen Overlay Click - tap anywhere on the live stream to move the cursor there
  • Paint Mode - draw directly on screen from the browser
  • Multi-monitor - auto cursor tracking across all detected displays
  • Tunnels - Cloudflare (free, auto-download), Tailscale P2P, Pinggy.io SSH, Zrok2, or LAN-only
  • Security - per-token input permissions, IP allowlists (CIDR), blocked IPs, rate limiting, audit logging, auto-rotating tokens, connection request approval flow
  • Capture Modes - Balanced, Quality, Performance, Low Bandwidth presets (custom modes saveable)

🚀 Usage

Interactive Menu (Default)

anywhereinput
# Select tunnel provider from the menu

Direct Start with Tunnel

anywhereinput --tunnel cloudflare    # Fastest global access
anywhereinput --tunnel tailscale       # Peer-to-peer on your tailnet
anywhereinput --tunnel pinggy          # SSH tunnel, works behind firewalls
anywhereinput --tunnel zrok2           # Open source, zero-trust
anywhereinput --tunnel local           # Same WiFi/LAN only

Full Configuration

anywhereinput   --host 127.0.0.1   --port 8008   --fps 60   --quality 40   --scale 0.7   --monitor 1   --tunnel cloudflare
Flag Default Description
--host 127.0.0.1 Server bind address
--port 8008 HTTP/WebSocket port
--fps 120 Screen capture FPS (1–120)
--quality 40 JPEG quality (1–95, lower = faster encode)
--scale 0.7 Stream scale factor (0.1–1.0)
--low-bandwidth off Mobile data preset (15fps, q60, half scale)
--no-capture off Disable screen capture entirely
--monitor 0 Monitor index (0=auto-track, 1+=fixed)
--tunnel interactive Provider or local
--help-tunnels - Show tunnel provider quick help
-v, --verbose off DEBUG logging (repeat: -vv)
--quiet off Console silent, file only
--version - Show installed version

🔒 Security

  • Auto-generated 32-character access token on every server start
  • Per-token permissions - grant/restrict move, click, scroll, keyboard, screen_toggle, ping
  • IP allowlists per token - CIDR ranges and single-host support
  • Blocked IPs - block specific IPs from individual tokens via API or admin app
  • Rate limiting - per-IP limits on WebSocket auth, API, and token creation (localhost excluded)
  • Audit logging - JSON-lines rotating log for all security events (token/client/IP/connection changes)
  • Token rotation - press n + Enter or Ctrl+N to invalidate all previous tokens
  • Connection request approval - clients can request access; admins approve/decline from the server
  • HTTPS/WSS encryption when using any tunnel provider
  • Zero data stored on external servers

⚠️ The --app flag requires a desktop display (X11 on Linux, Windows GUI, or macOS). On headless servers, run without it — the server still works perfectly:

# Server mode only — no GUI needed
anywhereinput --tunnel cloudflare
# Access from any device that can reach the URL

📡 WebSocket API

Authenticate

{"type": "auth", "token": "***"}

Send 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": "screen_restart"}  # Force-rebuild capture stream (useful if frozen)
{"type": "ping"}

Receive 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}

HTTP Endpoints

Endpoint Description
GET /health Unauthenticated health/status check (uptime, clients, screen state)
GET /api/screen Screen dimensions
GET /api/engine Input engine + screen engine health
GET /api/monitors All monitors + current selection
POST /api/monitor/{index} Switch capture monitor
GET /api/tokens List tokens (masked values)
POST /api/tokens Create token with custom permissions
PATCH /api/tokens/{token} Update token name/permissions
DELETE /api/tokens/{token} Revoke a token
POST /api/clients/{client_id}/kick Kick a client + block their IP
GET /api/requests List pending connection requests (admin)
PATCH /api/requests/{id}/approve Approve a connection request (admin)
PATCH /api/requests/{id}/decline Decline a connection request (admin)

🧰 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 lag Reduce drag distance; try local network; lower --fps
Black cursor on capture Install mss; on Linux ensure X11 display is accessible
Blank screen stream Check server logs; try --no-capture; ensure Pillow is installed
Keyboard double-typing 50ms debounce active; check mobile keyboard autocorrect
Zrok2 "not enabled" Run zrok2 enable <TOKEN> or use zrok2_repair.py
Cloudflared missing Auto-downloads on first run; or install manually via winget/brew
Screen stream frozen Use screen_restart command to force-rebuild the capture stream
Python not found Install Python 3.9+ from python.org, ensure it's on PATH

📋 System Requirements

Component Minimum
Server OS Windows 10/11, Linux, macOS 12+
Python 3.9–3.14
Client Any modern browser with WebSocket + Pointer/Touch Events
Internet Required on both devices for remote tunnel access

📦 Dependencies Installed

Running pip install anywhereinput automatically installs these packages:

Package What It Does Pre-requisites
pyautogui Keyboard/mouse automation Linux: libx11-dev libxrandr-dev
aiohttp HTTP server + WebSocket None
requests Tunnel provider helpers None
qrcode[pil] QR code generation for sharing None
mss Screen capture (X11/Wayland/Win/mac) None
Pillow JPEG encoding for screen stream Linux: libjpeg-dev zlib1g-dev
(Optional) PyQt6 Desktop admin GUI (pip install anywhereinput[app]) Desktop display required

💡 On Ubuntu/Debian, the pipx method above handles all system dependencies correctly. The only pre-req is Python 3.9+.


🔗 Links


Built with ❤️ for developers who value simplicity over complexity.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anywhereinput-1.3.0.tar.gz (584.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anywhereinput-1.3.0-py3-none-any.whl (597.9 kB view details)

Uploaded Python 3

File details

Details for the file anywhereinput-1.3.0.tar.gz.

File metadata

  • Download URL: anywhereinput-1.3.0.tar.gz
  • Upload date:
  • Size: 584.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for anywhereinput-1.3.0.tar.gz
Algorithm Hash digest
SHA256 84431adaab4ee4c5f106fb0259c6775dade23cdddf3e1e509f3c6c02467de74f
MD5 11b5118be11725feef52177bf7c51bfe
BLAKE2b-256 d5ac5c9ba93f33d82bcc1a1bb1b9646114652499911b9b6af49ec8157e02e1ea

See more details on using hashes here.

File details

Details for the file anywhereinput-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: anywhereinput-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 597.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for anywhereinput-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cea4b4ad84d1fcb0abf6cf0e7817697696b34c9dc90214491007dc1e2a50589
MD5 2a8cefc501bbe5ff37456099ef19d023
BLAKE2b-256 a6408492c39527477696d376de35e5f1fa200a4efd21e0344e2bc4519874d7db

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.1

2 files

This release

1.3.0 This release

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page