| Crates.io | fclipperr |
| lib.rs | fclipperr |
| version | 0.1.0 |
| created_at | 2025-10-30 14:54:49.897181+00 |
| updated_at | 2025-10-30 14:54:49.897181+00 |
| description | copy anything to clipboard with rust |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1908387 |
| size | 24,429 |
A cross-platform Rust command-line utility that reliably copies file contents to the system clipboard, working seamlessly in both local and remote (SSH) environments.
fclipperr <filename>cargo build --release
The binary will be available at target/release/fclipperr.
cargo install --path .
Copy a file's contents to clipboard:
fclipperr my_output.txt
Display help information:
fclipperr --help
When running locally, fclipperr uses native OS clipboard APIs via the arboard crate to copy content directly to your system clipboard.
When running over SSH, fclipperr detects the remote environment by checking for SSH-related environment variables (SSH_TTY, SSH_CONNECTION, SSH_CLIENT). It then uses the OSC 52 terminal escape sequence to transmit the content to your local machine's clipboard:
\x1b]52;c;{base64_encoded_content}\x07
This works with modern terminal emulators that support OSC 52, including:
set-clipboard on)0: Success - content copied to clipboard1: Failure - file not found, permission denied, or clipboard errorFor remote clipboard functionality, your terminal emulator must support OSC 52 escape sequences. Most modern terminals do, but you may need to enable it in your terminal's settings.
If using tmux, ensure clipboard support is enabled:
set -g set-clipboard on
fclipperr/
├── Cargo.toml # Package definition and dependencies
├── src/
│ ├── main.rs # Entry point, argument parsing, environment check
│ └── copy_handler.rs # Core logic module (local and remote copy)
└── README.md
arboard - Cross-platform clipboard librarybase64 - Base64 encoding for OSC 52 sequencesMIT OR Apache-2.0