bruno 736c9024f3 feat: clip-sync v1.0 — daemon de sync clipboard bidirectional en Go
- Daemon Go ~150 lignes, zéro dépendance hors stdlib + toml
- Watch clipboard local (poll 500ms, hash-based dedup)
- Serveur HTTP POST /clip pour réception des pairs
- Anti-boucle d'écho (lastHash + host+TS filtering)
- Cross-platform: Linux (xclip/wl-paste), macOS, Windows
- Configuration TOML statique des pairs
- install.sh one-liner multi-OS
- ARCHITECTURE.md + ROADMAP.md + README.md
2026-08-08 12:02:58 -04:00

clip-sync

Clipboard bidirectional sync daemon for LAN. One binary, zero deps. Copy on one machine → paste on another. Automatic, instant.

One-liner install

curl -sSL https://git.dracodev.net/Projets/clip-sync/raw/branch/main/install.sh | bash

This detects your OS, downloads the right binary, and creates a default config.

Quick start

  1. Install on every machine with the one-liner above
  2. Edit ~/.config/clip-sync/peers.toml — add all your machines
  3. Run clip-sync (or set up as a service)
clip-sync
# 2026/08/08 clip-sync: deepin listening on :9137, 3 peers
# 2026/08/08 recv: vivobook → 42 chars

Config

# ~/.config/clip-sync/peers.toml
listen = ":9137"

[peers]
deepin    = "192.168.30.101:9137"
vivobook  = "192.168.20.161:9137"
openclaw1 = "192.168.30.27:9137"

Service (optional)

Linux (systemd --user)

mkdir -p ~/.config/systemd/user
curl -sSL https://git.dracodev.net/Projets/clip-sync/raw/branch/main/clip-sync.service -o ~/.config/systemd/user/clip-sync.service
systemctl --user enable --now clip-sync

Windows (nssm)

nssm install clip-sync C:\Users\bruno\bin\clip-sync.exe
nssm set clip-sync AppDirectory C:\Users\bruno\.config\clip-sync
nssm start clip-sync

How it works

┌──────────────┐   POST /clip   ┌──────────────┐
│  deepin      │◄──────────────►│  vivobook    │
│  :9137       │   {text, ts}   │  :9137       │
│              │                │              │
│  poll 500ms  │                │  poll 500ms  │
│  xclip -o    │                │  Get-Clip    │
└──────────────┘                └──────────────┘

See ARCHITECTURE.md for details.

Build from source

git clone https://git.dracodev.net/Projets/clip-sync.git
cd clip-sync
go build -o clip-sync .

# cross-compile
GOOS=windows GOARCH=amd64 go build -o clip-sync.exe .
GOOS=darwin  GOARCH=amd64 go build -o clip-sync-darwin .
S
Description
Clipboard bidirectional sync daemon — Go, zero-deps, cross-platform. One binary, one config, one command.
Readme MIT
155 KiB
2026-08-08 22:18:23 -04:00
Languages
Go 88%
Shell 4.8%
PowerShell 3.6%
Makefile 3.6%