Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A utility to paste to pastebin from the command line.
tag: 0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Use pastebin from the commandline.


pastebin [-ch] [-f filename]

    -c  Copy the text that is pasted to the pastebin before copying the url.

    -f  Read from FILENAME instead of from STDIN

    -h  Print this help message

I find it useful to put the script where it is readily available, like so:

$ ln -s ~/path/to/script/ /usr/local/bin/pastebin

Obviously, replace path/to/script (and/or /usr/local/bin/) with the appropriate paths.

Use -c to copy the contents of what is being posted first. This is useful if you are using a clipboard manager that can handle multiple items, such as Jumpcut.

OS X Service

Under automator/, there is an OS X Automator workflow. This can aid in using the pastebin script from the OS X Services menu. Put this workflow into ~/Library/Services (create that directory if it does not already exist.) Then open the Keyboard Shortcut preferences and make sure "Paste to" is checked under the Services item. See the help file under automator/ for more instructions.

Something went wrong with that request. Please try again.