Remote clipboard server and client CLI tools.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remoclip-1.0.0.tar.gz.
File metadata
- Download URL: remoclip-1.0.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40c49f7bfef9c503bca4b954ba3afb9674a0312b5172097b67a93b1d5868a9a3
|
|
| MD5 |
4b745f7b42f2bad08f73306a2b86e1d8
|
|
| BLAKE2b-256 |
3c453b33bffdebef2f7b7257235b837a8fb442ad3a628cbc80fc7e8a52160d5e
|
Provenance
The following attestation bundles were made for remoclip-1.0.0.tar.gz:
Publisher:
publish-pypi.yaml on jeffjjohnston/remoclip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remoclip-1.0.0.tar.gz -
Subject digest:
40c49f7bfef9c503bca4b954ba3afb9674a0312b5172097b67a93b1d5868a9a3 - Sigstore transparency entry: 618868507
- Sigstore integration time:
-
Permalink:
jeffjjohnston/remoclip@895ea9ffdd3ce0b0335bf68e8e11e38e4fa8e48a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jeffjjohnston
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yaml@895ea9ffdd3ce0b0335bf68e8e11e38e4fa8e48a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file remoclip-1.0.0-py3-none-any.whl.
File metadata
- Download URL: remoclip-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
556e0d083d13fbb8d13a6e388741bc31a5f9dcaefe8b48b3b455113acaabc0b5
|
|
| MD5 |
e1ac5199ea7b996ef68a85302db2cd11
|
|
| BLAKE2b-256 |
8ca7bfe53184ad557fe03db940ec12769c88d4759da80079557adb8667941ef4
|
Provenance
The following attestation bundles were made for remoclip-1.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yaml on jeffjjohnston/remoclip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remoclip-1.0.0-py3-none-any.whl -
Subject digest:
556e0d083d13fbb8d13a6e388741bc31a5f9dcaefe8b48b3b455113acaabc0b5 - Sigstore transparency entry: 618868551
- Sigstore integration time:
-
Permalink:
jeffjjohnston/remoclip@895ea9ffdd3ce0b0335bf68e8e11e38e4fa8e48a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jeffjjohnston
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yaml@895ea9ffdd3ce0b0335bf68e8e11e38e4fa8e48a -
Trigger Event:
workflow_dispatch
-
Statement type: