remoclip (remote clipboard) is a small tool for providing copy and paste clipboard functionality in the CLI - with a special emphasis on allowing access to your local machine's clipboard when connected to remote systems. The package provides two CLI scripts: remoclip_server and remoclip.
remoclip relies on the pyperclip package to interface with the local clipboard on Linux, Mac, and Windows.
See the full documentation at remoclip.newmatter.net.
Install with uv or pip:
Create a security token (optional but highly recommended):
Run the server:
In a new shell, access your local clipboard:
Add --strip (or -s) to remoclip copy when you want to remove trailing newline characters from the piped input before it reaches the clipboard.
Connect to a remote system:
Now, back on your local system, paste the contents of your clipboard somewhere. It should contain:
You can also use remoclip paste (or remoclip p) and remoclip copy (or remoclip c) locally, similar to the macOS pbcopy and pbpaste commands, and they will manipulate the local clipboard as expected (via interactions with the server).
If you want to avoid exposing a port on the remote system, Unix domain sockets are also supported:
Unfortunately, SSH does not automatically clean up the socket file when you disconnect your session. You'll need to delete it manually before you initiate a new connection with the same socket:
.png)


