Skip to content
lancekrogersPublic

About

Sync Clipboard Between macOS and linux machines

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

197 Commits

Folders and files

Repository files navigation

ClipSync logo

ClipSync

Your clipboard, everywhere.
Copy on one computer, paste on another. Text and images sync directly between
your Mac and Linux machines, from a terminal UI, a desktop app or the command line.

Latest release AUR package Homebrew tap Platforms: macOS and Linux License: MIT or Apache-2.0 Built with Festival

Install · Pair · Terminal UI · Desktop app · Docs

ClipSync terminal companion History on a Mac connected to an Arch Linux desktop named archdtop: images, a link and shell commands copied on either computer, with a sharp preview of the selected screenshot

clipsync tui on a Mac connected to an Arch Linux desktop: everything copied on either computer, in one history.

Note

Experimental. Text sync works between macOS and Arch Linux. Image sync, broader desktop coverage, and sleep/wake and login/logout recovery are still being validated. Install the same release on every computer.

Why ClipSync

Terminal first
clipsync tui shows your devices, your synced history with image previews, and settings, all from the keyboard.

Text and images
Copy text or a screenshot on one computer and paste it on the other.

No cloud, no account
Computers connect directly over your local network with mutually authenticated TLS 1.3.

Pair with a code
Show a six-digit code on one computer and type it on the other. No Tailscale or SSH needed, and finding a device never trusts it.

One shared history
Search it, copy an entry again, delete one or clear it all. Deletes apply on connected devices too.

Desktop app and CLI
A desktop app and scriptable commands drive the same background service.

Install

Each release has a macOS disk image for Apple Silicon and Linux archives for x86_64 and aarch64.

macOS

brew install --cask lancekrogers/tap/clipsync

This installs ClipSync.app, puts clipsync on your PATH and clears the download quarantine flag, so the app opens without a Gatekeeper prompt.

Without Homebrew

Open the disk image from the latest release and drag ClipSync to Applications. Release builds are not notarized by Apple, so macOS blocks the first launch: click Done, open System Settings → Privacy & Security and click Open Anyway. You only do this once. Or, before the first launch, run:

xattr -dr com.apple.quarantine /Applications/ClipSync.app

The command-line tool is inside the app at /Applications/ClipSync.app/Contents/MacOS/clipsync.

Arch Linux

Install clipsync-bin from the AUR with yay or any other AUR helper:

yay -S clipsync-bin

It installs the release binaries to /usr/bin and adds ClipSync to your app menu. Without an AUR helper:

git clone https://aur.archlinux.org/clipsync-bin.git
cd clipsync-bin
makepkg -si

Other Linux

Download the archive for your architecture from the latest release, then:

tar -xzf clipsync-<version>-linux-x86_64.tar.gz
cd clipsync-<version>-linux-x86_64
./install-user.sh

It installs clipsync and clipsync-desktop to ~/.local/bin and adds ClipSync to your app menu, without root. The archives need glibc 2.35 or newer and OpenSSL 3 (libssl3 on Debian and Ubuntu, openssl-3 on Arch Linux), so they run on Ubuntu 22.04, Debian 12 and current Arch Linux.

Check a download

In the folder that holds the download and SHA256SUMS:

shasum -a 256 -c SHA256SUMS --ignore-missing   # macOS
sha256sum -c SHA256SUMS --ignore-missing       # Linux

From source

With Rust 1.95 or newer, this installs clipsync with the terminal UI to ~/.cargo/bin:

cargo install --path . --locked --features tui   # or: just install

To build the desktop app too, run just companion-package and follow install from a local package.

Pair two computers

Run clipsync tui on both computers and finish setup. Then:

  1. On the first computer, press 2 for Devices, then e. A six-digit code appears.
  2. On the second computer, press 2, then f, pick the first computer and press Enter. Not listed? Press m and enter the address shown under the code.
  3. Type the code. Both computers now list each other under Authorized devices, and anything you copy on one shows up on the other.

Two ClipSync terminal companions side by side: Studio Mac shows a six-digit pairing code; Travel laptop finds it nearby, types the code, and both list each other under Authorized devices

Pairing two isolated fixtures. Re-record with just demo-tui-pairing (macOS).

Each code works once, and neither computer saves anything until the code is verified. Pairing uses TCP port 8485 and sync uses 8484. If a computer's firewall blocks them, as firewalld's default zone does on EndeavourOS, show the code on the other computer and type it on this one, or open both ports. See when pairing fails for every error message and its fix.

The terminal UI

clipsync tui has four sections: Overview, Devices, History and Settings. Switch with 1–4.

Key In History
↑ ↓ Select a copy
/ Search
c Copy it again
d / D Delete one, or clear all. Both ask first and apply on connected devices, like clipsync history delete and clear
p Pause or resume syncing
q Quit the TUI; syncing keeps running

Selecting an image shows a preview: sharp in terminals with Kitty or Sixel graphics, and drawn with colored characters elsewhere. Set CLIPSYNC_TUI_GRAPHICS=off to force the character preview, or NO_COLOR for grayscale.

ClipSync terminal companion: Overview with a connected device, Devices, History with an image preview, copying a line from another device, search, and pause

Overview, Devices and History against an isolated fixture. Re-record with just demo-tui (macOS).

The desktop app

The desktop app has the same four sections and pairs the same way. It can also check your setup, start or stop the background service, and pause syncing. On macOS, open ClipSync from Applications; on Linux, launch it from the app menu.

ClipSync desktop app on macOS: searchable clipboard history, a selected note, and the Copy text button ClipSync desktop Overview showing service status, Pause syncing, Sync current copy, and Open clipboard history controls
History Overview

Sample data in an isolated test setup.

How it works

  • A background service on each computer owns the clipboard. The terminal UI, desktop app and clipsync commands all talk to it, so closing them leaves syncing running.
  • Computers find each other with mDNS and connect directly over TCP with mutually authenticated TLS 1.3 and Ed25519 device identities. No cloud service is involved.
  • History contents are encrypted with AES-256-GCM; database metadata is not.

Read the security model, including what a stranger on the same network can and cannot do, and what syncs and its limits.

Documentation

Guide What's in it
Desktop app and TUI Local packages, pairing errors, upgrading, uninstalling
Command line and manual setup clipsync commands, SSH-key setup, background services, troubleshooting, history recovery
What syncs Supported clipboards, size limits, history retention
Security model Pairing, transport, encryption and their limits
Verification Isolated checks and release gates
Release checklist Cutting a release

Development

cargo +1.95.0 build --locked --workspace --features tui
./target/debug/clipsync tui
./target/debug/clipsync-desktop

just check          # formatting and Clippy
just test           # unit/integration tests; private named pasteboards on macOS
just test-desktop   # Docker: Linux suite plus two real X11 and two headless Wayland daemons

The desktop harness refuses to run outside its disposable container. It generates temporary identities and history stores and does not mount personal configuration or clipboard sockets. See repair validation for evidence and limits.

License

Dual licensed under MIT or Apache-2.0.

About

Sync Clipboard Between macOS and linux machines

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages