Cross-platform clipboard utility: stdin → clipboard, clipboard → stdout
clipx is a small, cross-platform command-line clipboard utility.
It gives you a single, consistent way to copy to and paste from the system clipboard — everywhere.
No more remembering pbcopy, pbpaste, xclip, wl-copy, PowerShell commands, or wondering what’s installed.
Every platform solved the clipboard differently:
- macOS:
pbcopy,pbpaste - Linux:
xclip,xsel,wl-copy,wl-paste - Windows:
clip(copy only, no paste)
That forces you to think every time.
clipx removes that friction.
Once installed, you can just do:
… | clipx
clipx -pAnd move on.
echo "hello world" | clipx
cat file.txt | clipxThis behavior is fully compatible with Windows’ built-in clip.
clipx -p
clipx --pasteUseful for redirecting directly into files:
clipx -p > newfile.cppOr piping:
clipx -p | sed 's/foo/bar/g'clipx -p > script.sh
chmod +x script.sh
git add script.sh
git commit -m "Add script"runai -t "Generate helper script" | clip
clip -p > helper.shNo editor. No mouse. No context switching.
clipx automatically selects the appropriate backend:
-
Windows
- Copy:
clip - Paste:
Get-Clipboard(PowerShell)
- Copy:
-
macOS
pbcopy,pbpaste
-
Linux
- Wayland:
wl-copy,wl-paste - X11:
xcliporxsel
- Wayland:
If no suitable backend is found, clipx prints a clear error message.
- ❌ No GUI
- ❌ No file copying
- ❌ No image handling (text only)
- ❌ No configuration
clipx is meant to be small, predictable, and composable.
Requirements:
- C++17 compiler
- CMake ≥ 3.10
cmake -S . -B build
cmake --build buildThe resulting binary is clipx.
- One command
- One name
- Same behavior everywhere
- Zero thinking required
If you stop noticing clipx, it’s doing its job.
David Joffe https://davidjoffe.github.io/
MIT
Copyright © 2026 David Joffe