Transfer files/folders via clipboard
Project description
clipcp
Transfer files and folders between machines via a shared clipboard — no network configuration, no open ports, no SSH. Works anywhere your clipboard is shared (e.g. a remote desktop session, a VM with clipboard integration, or a KVM switch).
Install
pip install clipcp
Usage
Manual mode (ENTER-driven)
Sender:
clipcp <file_or_folder>
Receiver:
clipcp
You copy each chunk to clipboard and press ENTER to advance. Works with any shared clipboard.
Auto mode (fully hands-free)
Both sides poll the clipboard and handshake automatically — no interaction needed once started.
Receiver (start first):
clipcp --auto [--dest DIR] [--timeout S]
Sender:
clipcp <file_or_folder> --auto [--chunk-size KB] [--timeout S]
Git sync mode
Synchronise a git repository between two machines. Only the missing commits are transferred (as an encrypted git bundle). Merging is done on the server side.
Server (the authoritative repo):
clipcp . --git [--yes]
Client (the repo to sync into):
clipcp --git [--dest DIR]
Both sides run simultaneously. The handshake proceeds automatically:
- Server announces its HEAD hash.
- Client replies with its HEAD hash.
- If server is ahead — server sends a bundle of missing commits to client.
- If client is ahead or histories diverged — server negotiates a common base with the client, then the client sends a bundle to the server which merges it in.
Merge conflicts
If both sides modified the same files, the merge is aborted and the conflicting ref is left at refs/clipcp/incoming. Resolve manually on the server:
git merge refs/clipcp/incoming
# edit conflicting files, remove <<<<<<< markers
git add <resolved files>
git commit
Or take one side entirely:
git merge -X ours refs/clipcp/incoming # keep server version
git merge -X theirs refs/clipcp/incoming # keep incoming version
Options
| Flag | Description |
|---|---|
--yes / -y |
Skip the confirmation prompt before sending chunks |
Options
| Flag | Default | Description |
|---|---|---|
--auto |
on | Auto handshake mode (--no-auto for manual ENTER-driven) |
--git |
off | Git sync mode |
--chunk-size KB |
64 | Max size of each clipboard chunk |
--dest DIR |
. |
Destination directory (receiver / git client) |
--timeout S |
60 | Seconds to wait for each step |
--skip PATTERN |
— | Skip files matching pattern (e.g. --skip .git *.pyc) |
--yes / -y |
off | Skip confirmation prompt (git mode) |
--resume [ID] |
— | Resume an interrupted transfer |
--extract [ID] |
— | Extract a fully-received transfer from saved state |
--clear [ID|all] |
— | Clear saved transfer state |
--list |
— | List all saved transfers |
Password / Encryption
All data is AES-256-GCM encrypted. You will be prompted for a password on both sides, or set it via environment variable to skip the prompt:
export CLIPCP_PASSWORD=mysecretpassword
How it works
clipcp compresses the target (tar.gz), encrypts it (AES-256-GCM with PBKDF2 key derivation), base64-encodes the result, and splits it into clipboard-sized chunks.
In auto mode, the receiver writes a CLIPCP_READY signal to the clipboard. The sender detects it, writes chunk 1, and the receiver ACKs each chunk until all are received and a CLIPCP_DONE signal is written. The sender then exits.
In git mode, instead of a tar archive a git bundle is transferred — only the commits the other side is missing. Both sides first exchange HEAD hashes to determine direction and negotiate a common base. The bundle is encrypted the same way as regular transfers.
Requirements
- Python 3.10+
- A shared clipboard between sender and receiver (e.g. RDP, VNC, VM clipboard integration)
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 clipcp-0.4.0.tar.gz.
File metadata
- Download URL: clipcp-0.4.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aa887fc2e74a391ce809876a860233f92c12f7491e1fbdd14509e02d7d8571f
|
|
| MD5 |
6c1c2d7b9adae160b20ac53007c64f0c
|
|
| BLAKE2b-256 |
2bb870f83697f1fb67fee915c9d8154fe4c0f857a0722714aeac8e68c7f9bf3a
|
File details
Details for the file clipcp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: clipcp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93c0d6d604041ce3e9ae0c0082313cfe43341c8119f9b58cff9b3a59e0ac31d1
|
|
| MD5 |
178e392a692fcbddc34dc86412a46daf
|
|
| BLAKE2b-256 |
fc7a79f3b4953adb720b52e8954aca59ac867845c19d0541f97a6476241fd8c1
|