A cross-platform Node.js library for reading from and writing to the system clipboard.
clipboardy is a Node.js library that enables reading from and writing to the system clipboard programmatically. It solves the problem of inconsistent clipboard APIs across different operating systems by providing a unified interface for clipboard operations in Node.js applications, CLI tools, and Electron apps.
Node.js developers building cross-platform desktop applications, CLI tools, automation scripts, or Electron apps that require clipboard access.
Developers choose clipboardy for its robust cross-platform support, simple API, and automatic handling of platform-specific clipboard tools, eliminating the need to write custom clipboard logic for each operating system.
Access the system clipboard (copy/paste)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports macOS, Windows, Linux (including X11 and Wayland), OpenBSD, FreeBSD, Android with Termux, and modern browsers, eliminating the need for platform-specific code.
Offers both asynchronous Promise-based methods (write, read) and synchronous alternatives (writeSync, readSync) for non-browser environments, catering to different use cases.
Provides macOS-specific methods for reading and writing images to the clipboard, supporting formats like PNG, JPEG, HEIC, WebP, and GIF.
Intelligently uses native tools such as PowerShell on Windows and wl-clipboard on Wayland, with bundled binaries as backup, ensuring reliability across diverse setups.
Image clipboard operations are only available on macOS; on other platforms, methods like writeImages are no-ops or return empty arrays, reducing cross-platform utility.
Synchronous methods do not work in browsers due to Clipboard API constraints, forcing developers to use async-only approaches in web applications.
Does not function in headless Linux environments without a display server (X11 or Wayland), making it unsuitable for automation on servers or CI/CD pipelines.