Open Source Developer Tools 122 vues

CrossPaste Desktop: Real-Time Cross-Device Clipboard Sharing for Developers

B
Bright Coding
Auteur
CrossPaste Desktop: Real-Time Cross-Device Clipboard Sharing for Developers

CrossPaste Desktop: Real-Time Cross-Device Clipboard Sharing for Developers

Switching between a MacBook, a Windows workstation, and a Linux server is standard for many developers. Yet the clipboard—that basic, universal tool—stays stubbornly local. You copy a stack trace on one machine, switch to another, and reach for Ctrl+V only to find stale air. Cloud-based solutions exist, but they demand accounts, route data through remote servers, or lock features behind paywalls. CrossPaste Desktop addresses this gap with a LAN-only, serverless architecture that keeps clipboard history on your devices and under your control.

CrossPaste Desktop is an open-source, cross-platform pasteboard manager built in Kotlin. It targets developers, DevOps↗ Bright Coding Blog engineers, and technical professionals who work across multiple machines and need reliable, secure clipboard synchronization without surrendering data to third-party infrastructure. This article examines how it works, what it offers, and where it fits in your tooling landscape.

What is CrossPaste Desktop?

CrossPaste Desktop is a universal pasteboard application maintained by the CrossPaste organization on GitHub. The project holds 2,232 stars and 104 forks as of its last commit on July 14, 2026. It is written primarily in Kotlin and released under the GNU Affero General Public License v3.0 (AGPL-3.0)—a copyleft license that requires source code disclosure for network use, making it particularly suitable for security-conscious users who want to audit what runs on their machines.

The application uses Compose Multiplatform for its user interface, delivering a consistent experience across Windows, macOS, and Linux. Data persistence relies on SQLite, avoiding external database dependencies. The project maintains active CI/CD pipelines through GitHub Actions, with badges for main branch testing and release builds visible in the repository.

CrossPaste operates on a peer-to-peer, serverless model over local area networks. Devices auto-discover each other, establish encrypted connections, and synchronize clipboard content without a central relay. This design choice eliminates single points of failure and keeps latency low—critical for a tool meant to feel instantaneous.

The project also publishes a Chrome extension and exposes clipboard history through an MCP (Model Context Protocol) server, enabling integration with AI assistants like Claude. These extensions suggest the maintainers view CrossPaste not merely as a utility but as a platform for clipboard-centric workflows.

Key Features

Real-time synchronization sits at the core. Copy on one device; paste on another within seconds. The implementation avoids polling in favor of event-driven updates, reducing network overhead and battery drain on laptops.

Rich type support covers the formats developers actually use: plain text, URLs, HTML, RTF, images, files, and even color values. This matters when you're copying syntax-highlighted code from a browser, a hex color from a design tool, or a screenshot with embedded metadata.

End-to-end encryption uses asymmetric cryptography. Each device generates key pairs; clipboard data encrypts at the source and decrypts only at the intended destination. The README emphasizes this protects against eavesdropping on shared networks—a realistic threat in co-working spaces, coffee shops, or corporate environments with flat network topologies.

LAN-only, serverless operation means no cloud account, no subscription, and no external dependency beyond your local network. Data remains on-device; storage auto-manages through configurable cleanup policies. For teams handling sensitive IP or regulated data, this architecture simplifies compliance.

Built-in OCR extracts text from images locally. Screenshots, scanned documents, or photos of whiteboards become searchable, copyable text without leaving the device. The README explicitly notes no network calls occur during OCR processing.

MCP Server integration exposes clipboard history to AI assistants via the Model Context Protocol. This enables workflows like asking Claude to summarize a copied error log or refactor pasted code, with the assistant accessing context directly from CrossPaste's store.

Chrome extension extends synchronization to browser content. Copy from a web page on one device; paste into any application on another. The extension auto-discovers the desktop app, requiring no manual pairing configuration.

Use Cases

Multi-machine development workflows: A backend engineer running Linux servers, a MacBook for iOS testing, and a Windows machine for .NET work can maintain a single, unified clipboard. Copy a database connection string from a terminal on Linux; paste into a configuration file on Windows without intermediate files or chat messages.

Incident response and debugging: During outages, engineers often shuttle logs, trace IDs, and commands between monitoring dashboards, terminals, and communication tools. CrossPaste's real-time sync and rich type support preserve formatting when copying structured logs or HTML-formatted alerts.

Design and frontend collaboration: Copying a color value from Figma on macOS, pasting it into CSS on Linux, and sharing a screenshot with embedded OCR-extracted text to a documentation tool on Windows—all without breaking flow or losing precision.

Air-gapped or privacy-sensitive environments: Organizations with strict data residency requirements can deploy CrossPaste knowing clipboard history never transits external infrastructure. The AGPL-3.0 license further permits internal modifications with required source disclosure.

AI-assisted coding with MCP: Developers using Claude or compatible assistants can reference clipboard history as context without manual paste operations. Copy a failing test output, invoke the assistant, and request analysis—all through the MCP integration.

Installation & Setup

CrossPaste Desktop requires JDK-compatible tooling and uses the JetBrains Runtime (JBR) for optimal desktop integration. The build system is Gradle.

Clone the repository:

git clone https://github.com/CrossPaste/crosspaste-desktop.git

Navigate to the project directory and run:

cd crosspaste-desktop
./gradlew app:run

The first build downloads JBR and Gradle dependencies automatically. This may take several minutes depending on connection speed.

If you encounter connection reset errors during dependency resolution:

FAILURE: Build failed with an exception.

* What went wrong:
java.net.SocketException: Connection reset
> java.net.SocketException: Connection reset

Configure a proxy in gradle.properties:

systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost

Adjust values to match your proxy configuration. The nonProxyHosts pattern prevents unnecessary proxying for internal repositories.

Prebuilt binaries are available from the official download page; version 2.1.6 is current as of repository documentation.

Real Code Examples

The README provides explicit build commands for development and extension work.

Advertisement

Running the Desktop Application

./gradlew app:run

This is the standard development entry point. It compiles the Kotlin sources, bundles resources, and launches the Compose Multiplatform desktop window. The JBR download on first run ensures consistent rendering and input handling across platforms.

Building the Chrome Extension

./gradlew :web:build

This task requires Node.js >= 18. The npmInstall task fetches JavaScript↗ Bright Coding Blog dependencies automatically. Output lands in web/dist/ as an unpacked extension.

For iterative extension development:

# Fast Vite dev loop
npm run dev

Run inside the web/ directory. After changes, reload the extension at chrome://extensions/ with Developer mode enabled.

The extension depends on a Kotlin/JS core library:

./gradlew :core:jsBrowserProductionLibraryDistribution

Run this whenever modifying core/ sources. It is also executed as part of :web:build.

Loading the Extension in Chrome

  1. Navigate to chrome://extensions/
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked
  4. Select the web/dist/ directory

The extension auto-discovers CrossPaste desktop running on localhost, establishing clipboard sync without manual pairing.

Advanced Usage & Best Practices

Storage management: Enable auto-cleanup in preferences to prevent unbounded SQLite growth. For developers copying large images or binary files frequently, aggressive retention policies keep disk usage predictable.

Network segmentation: CrossPaste's LAN discovery works best on flat networks. VLANs or aggressive client isolation may block peer detection. Consider this when deploying in corporate environments with micro-segmentation.

MCP security: The MCP server exposes clipboard history to local AI assistants. Ensure only trusted processes can access this endpoint, as clipboard content may contain credentials, tokens, or proprietary code.

Extension isolation: The Chrome extension runs with the permissions of standard browser extensions. Review what pages it can access, and disable if your threat model excludes browser-clipboard bridges.

Build reproducibility: Pin the JBR version in Gradle configuration for team consistency. The default first-run download may vary; explicit versioning prevents "works on my machine" discrepancies.

Comparison with Alternatives

Tool Architecture Cross-Platform Open Source Encryption Offline/LAN
CrossPaste Desktop P2P, serverless Mac/Win/Linux Yes (AGPL-3.0) Asymmetric E2EE Native
Pastebot (Tapbots) Cloud relay macOS/iOS only No TLS to server No
1Clipboard Cloud sync Mac/Win/Linux No TLS to server No
Synergy/Barrier Input sharing Mac/Win/Linux Yes (GPL) None by default LAN

Pastebot offers superior macOS/iOS integration but requires cloud infrastructure and lacks Linux support. 1Clipboard provides similar cross-platform reach but depends on centralized sync with undisclosed server-side handling. Synergy/Barrier shares input devices rather than clipboard history as a primary function; clipboard transfer is a secondary feature without dedicated encryption.

CrossPaste trades cloud convenience for architectural control. Users prioritizing seamless mobile sync may prefer alternatives; those requiring data sovereignty, auditability, or LAN-only operation gain clear advantages.

FAQ

Does CrossPaste work without internet access? Yes. Discovery and synchronization operate entirely over local networks. No external servers are contacted.

What license governs use? AGPL-3.0. Commercial use is permitted; network deployment requires source code availability to users.

Can I contribute to development? Yes. The repository accepts code contributions, translations, issue reports, and financial support via GitHub Sponsors.

Does OCR require GPU acceleration? The README specifies local processing without network calls; hardware acceleration details are not documented.

Is there a mobile app? Not currently. The Chrome extension provides partial mobile-browser integration; native iOS/Android clients are not listed in the roadmap.

How do devices authenticate each other? Asymmetric encryption secures data in transit. Specific key exchange mechanisms are not detailed in the README.

What happens when devices are on different subnets? Auto-discovery may fail across VLANs or routed networks. The README does not document manual peer configuration as a fallback.

Conclusion

CrossPaste Desktop fills a specific niche: developers and technical professionals who need reliable, encrypted, cross-platform clipboard synchronization without cloud dependency. Its Kotlin/Compose Multiplatform stack, SQLite persistence, and LAN-only architecture reflect pragmatic engineering choices for privacy-conscious users.

The project is actively maintained, with version 2.1.6 available and a roadmap including command-line mode and plugin extensibility. The AGPL-3.0 license ensures community contributions remain open, though organizations should verify compliance requirements for internal deployment.

For multi-machine developers, incident responders, or teams in regulated environments, CrossPaste offers a credible alternative to cloud-reliant clipboard managers. The MCP server and Chrome extension indicate evolving platform ambitions beyond basic sync.

Explore the source, download builds, or contribute at https://github.com/CrossPaste/crosspaste-desktop. For related reading on cross-platform development with Kotlin, see [INTERNAL_LINK: Kotlin Multiplatform tooling].

Advertisement

Commentaires 0

Aucun commentaire pour l'instant. Soyez le premier à réagir !

Laisser un commentaire

Advertisement