Skip to main content

remoclip

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.

Documentation

See the full documentation at remoclip.newmatter.net.

Quick Start

Install with uv or pip:

$ uv tool install remoclip
# alternative:
# pip install remoclip

Create a security token (optional but highly recommended):

TOKEN=$(python3 -c "import secrets; print(secrets.token_hex(32))")
echo "security_token: $TOKEN" > ~/.remoclip.yaml 

Run the server:

$ remoclip_server

In a new shell, access your local clipboard:

$ echo Hello from remoclip. | remoclip copy
Hello from remoclip.
$ remoclip paste
Hello from remoclip.

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:

# first copy the config file so the remote client uses the security token
$ scp ~/.remoclip.yaml user@myremotehost:~
# remoclip's default port is 35612
$ ssh -R 35612:127.0.0.1:35612 user@myremotehost
user@myremotehost$ uv tool install remoclip
user@myremotehost$ remoclip paste
Hello from remoclip.
user@myremotehost$ echo Hello from $(hostname) | remoclip copy
Hello from myremotehost

Now, back on your local system, paste the contents of your clipboard somewhere. It should contain:

Hello from myremotehost

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:

$ echo "Hello from my local machine." | remoclip copy
Hello from my local machine.
$ ssh -R /tmp/remoclip.sock:127.0.0.1:35612 user@myremotehost
user@myremotehost$ echo -e "\nclient:\n\tsocket: /tmp/remoclip.sock" >> ~/.remoclip.yaml
user@myremotehost$ remoclip paste
Hello from my local machine.

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:

$ ssh user@myremote rm /tmp/remoclip-user.sock
$ ssh -R /tmp/remoclip-user.sock:127.0.0.1:35612 user@myremotehost

Metadata

Release files for remoclip 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remoclip 1.0.0
File Size Uploaded
remoclip-1.0.0.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remoclip 1.0.0
File Interpreter ABI Platform
remoclip-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.9 kB

Release files / remoclip-1.0.0.tar.gz

Download URL remoclip-1.0.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
40c49f7bfef9c503bca4b954ba3afb9674a0312b5172097b67a93b1d5868a9a3
BLAKE2b-256 checksum
How to use checksums
3c453b33bffdebef2f7b7257235b837a8fb442ad3a628cbc80fc7e8a52160d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2025.

Transparency log

Release files / remoclip-1.0.0-py3-none-any.whl

Download URL remoclip-1.0.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
556e0d083d13fbb8d13a6e388741bc31a5f9dcaefe8b48b3b455113acaabc0b5
BLAKE2b-256 checksum
How to use checksums
8ca7bfe53184ad557fe03db940ec12769c88d4759da80079557adb8667941ef4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page