Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: experimental-f…
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (17 sloc) 1.19 KB


A command line utility that allows read/write (i.e copy/paste) access to the system clipboard. It does this by wrapping pbcopy/pbpaste (for OSX), xclip (for linux), and clip (for windows). Currently works with node.js v0.8+.


When require("node-copy-paste"), two Global functions are added:

  • copy(text): asynchronously replaces the current contents of the clip board with text. Takes either a string, array, object, or readable stream.
  • paste(): synchronously returns the current contents of the system clip board.

Getting node-copy-paste

The easiest way to get node-copy-paste is with npm:

npm install node-copy-paste

Alternatively you can clone this git repository:


Future plans

I'm hoping to add various fallbacks for instances when xclip or clip is not avaiable (see experimental-fallbacks branch). Also this library needs to be more thoroughly tested on windows.

Developed by

  • Xavi Ramirez


This project is released under The MIT License.

Jump to Line
Something went wrong with that request. Please try again.