Clipboardy is a cross-platform JavaScript package for reading from and writing to the operating system clipboard. It provides asynchronous clipboard operations as well as synchronous methods where the platform supports them. Text copying and pasting works across macOS, Windows, Linux, OpenBSD, FreeBSD, Android through Termux, and modern browsers. Browser usage relies on the standard Clipboard API and therefore requires a secure context such as HTTPS. On macOS, the package also supports copying multiple image files, reading clipboard images into temporary files, and checking whether image data is present. Linux environments require an active X11 or Wayland display server rather than a headless session. The package provides one consistent interface across otherwise different operating-system clipboard implementations.
Features
- Cross-platform clipboard access
- Asynchronous text reading and writing
- Synchronous clipboard methods outside browsers
- Modern browser Clipboard API support
- macOS image clipboard operations
- Linux X11 and Wayland compatibility