Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A command line utility that allows read/write (i.e copy/paste) access to the system clipboard.
JavaScript Visual Basic
branch: experimental-f…

This branch is 3 commits ahead, 65 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
platform
README.markdown
index.js
package.json

README.markdown

node-copy-paste

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+.

The API

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:

git://github.com/xavi-/node-copy-paste.git

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

License

This project is released under The MIT License.

Something went wrong with that request. Please try again.