Skip to main content

A command-line utility to synchronize clipboards across machines.

Project description

bounceboard

Bounceboard is a full featured clipboard synchronization tool that allows you to share clipboard content between multiple devices over a network.

Currently supports:

  • MacOS & Linux
  • Plain text
  • Images (PNG)
  • HTML
  • Rich Text
  • File support

Installation

Install from PyPI:

pip install bounceboard

Usage

The tool can run in either server or client mode:

Server Mode

bb server [-p PORT] [-k KEY]

Options:

  • -p, --port: Port to listen on (default: 4444)
  • -k, --key: Custom access key (default: auto-generated)

The server will display connection URLs with the access key when started.

Client Mode

bb client ws://<server_ip>:<port>/?key=<access_key>

Replace <server_ip>, <port>, and <access_key> with the connection details provided by the server.

Multiple clients can be connected to a server, changes from any client will propogate to all.

Additional Options

  • -v, --version: Show version and exit
  • -x, --xclip-alt: Enable xclip alternative text support (see Linux below)

How It Works

  • The server monitors its local clipboard for changes and broadcasts the new content to all connected clients.
  • The client also monitors its local clipboard for changes and sends the new content to the server.
  • Both the server and client update their local clipboard when they receive new content from the other side.
  • Multiple clients are supported and all kept in sync (server relays).

Platform Specifics

Linux

You'll need [xclip](https://github.com/astrand/xclip) installed (available on all major platforms). The current version (0.13) only supports setting one target type, so for compatibility any incoming HTML or RTF is downconverted to just STRING.

If you want rich text sync support you can use this PR and the bb -x ... flag to enable it.

Protocol

The WebSocket protocol uses a simple and efficient two-part message exchange:

  1. Header (JSON text message):
{
    "type": "mime/type",    // Content MIME type (e.g., "text/plain", "image/png")
    "size": 1234,          // Content size in bytes
    "hash": "sha256...",   // SHA-256 hash of the content
    "text": "optional"     // Optional plain text representation
}
  1. Binary message:
    • Contains the raw content bytes immediately following the header
    • Must be processed together with the preceding header

Supported MIME types:

  • text/plain: Plain text content
  • text/html: HTML content
  • text/rtf: Rich Text Format
  • image/png: PNG images
  • application/x-file: File transfer (includes filename in header's text field)

Protocol flow:

  1. Client connects with ?key=<access_key> query parameter
  2. Connection maintained with WebSocket ping/pong (5s interval)
  3. Both sides send header+content pairs when clipboard changes
  4. Both sides process incoming header+content pairs to update local clipboard

ChangeLog

  • v0.1.0: Initial release

License

This project is licensed under the MIT 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

bounceboard-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

bounceboard-0.1.0-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file bounceboard-0.1.0.tar.gz.

File metadata

  • Download URL: bounceboard-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for bounceboard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 23cfbecb8f303a2687b1b6692c113c3cd7de35e3b95034a838d58b4041b9c355
MD5 a66cbdf85a130869003e3fac0fefc120
BLAKE2b-256 3add2f1ce6aa85b2385204834bbe2eef4414b03ba89ddf18a0fd7a2a29e285b0

See more details on using hashes here.

File details

Details for the file bounceboard-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: bounceboard-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for bounceboard-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0844acc4548d23032771317d4af8ed66b2790d7f6e1fe06a4d909653bd2fe861
MD5 78fc737e1e9f6bde5eb968507e5f5ec0
BLAKE2b-256 2179360435ee9ca3b48717f9ac49657dc8ddc5ef93db51071e0c0e3810f50c9f

See more details on using hashes here.

Supported by

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