clipboardy

Access the system clipboard (copy/paste)

Github stars Tracking Chart

clipboardy Build Status

Access the system clipboard (copy/paste)

Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD, Android with Termux.

Install

$ npm install clipboardy

Usage

const clipboardy = require('clipboardy');

clipboardy.writeSync('?');

clipboardy.readSync();
//=> '?'

API

clipboardy

.write(text)

Write (copy) to the clipboard asynchronously. Returns a Promise.

text

Type: string

The text to write to the clipboard.

.read()

Read (paste) from the clipboard asynchronously. Returns a Promise.

.writeSync(text)

Write (copy) to the clipboard synchronously.

text

Type: string

The text to write to the clipboard.

.readSync()

Read (paste) from the clipboard synchronously.

FAQ

Where can I find the source of the bundled binaries?

The Linux binary is just a bundled version of xsel. The source for the Windows binary can be found here.

Main metrics

Overview
Name With Ownersindresorhus/clipboardy
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2016-12-04 13:14:35
Pushed At2025-09-26 08:35:42
Last Commit At
Release Count22
Last Release Namev5.0.0 (Posted on 2025-09-26 17:35:21)
First Release Namev0.1.0 (Posted on 2016-12-04 14:45:00)
用户参与
Stargazers Count1.9k
Watchers Count13
Fork Count65
Commits Count71
Has Issues Enabled
Issues Count68
Issue Open Count15
Pull Requests Count24
Pull Requests Open Count1
Pull Requests Close Count8
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private