How cmdvmd/common-clipboard works
Common Clipboard synchronizes Unicode text and images between Windows devices and iOS Shortcuts on a shared network. The Windows tray application is the central runtime: it checks connectivity, discovers or starts a server, polls for remote clipboard updates, and uploads local copies. The server exposes registration, timestamp, and clipboard endpoints; a device registry tracks peers and delivery state. The README documents the iOS Shortcut workflow, but its implementation is not in this tree, so that side is represented only as an external client.
Main entry points: server.py HTTP API · common_clipboard.py Tray Application · port_editor.py Port Editor · device_list.py Device Registry
Components 13
Windows Client
- Tray Application
src/common_clipboard.py - Clipboard Sync
src/common_clipboard.py - Server Discovery
src/common_clipboard.py - Tray Controls
src/common_clipboard.py - Port Editor
src/port_editor.py
Clipboard Server
- HTTP API
src/server.py - Server Process
src/server.py
Shared State
- Clipboard Data
src/server.py - Device Registry
src/device_list.py
Other components
- Device User
- iOS Shortcut
- Internet Connectivity
- NTP Service
Connections 18
- Device User → Tray Application: operates
README.md - Device User → iOS Shortcut: copies and pastes
README.md - Tray Application → Clipboard Sync: runs sync loop
src/common_clipboard.py - Tray Application → Internet Connectivity: checks connectivity
src/common_clipboard.py - Tray Application → Server Discovery: finds server
src/common_clipboard.py - Server Discovery → HTTP API: probes timestamp
src/common_clipboard.py - Server Discovery → HTTP API: registers device
src/common_clipboard.py - Tray Application → Server Process: starts server
src/common_clipboard.py - Server Process → HTTP API: runs Flask app
src/server.py - Clipboard Sync → HTTP API: uploads local copy
src/common_clipboard.py - Clipboard Sync → HTTP API: polls remote copy
src/common_clipboard.py - HTTP API → Clipboard Data: reads and writes
src/server.py - HTTP API → Device Registry: tracks peers
src/server.py - Tray Controls → Device Registry: lists connected devices
src/common_clipboard.py - Tray Controls → Port Editor: opens editor
src/common_clipboard.py - Port Editor → Tray Application: returns port
src/common_clipboard.py - Server Process → NTP Service: requests time
src/server.py - iOS Shortcut → HTTP API: exchanges clipboard
README.md