Python script to copy from STD to your clipboard with OSC 52.
You simply pipe to it, then you can paste whatever you piped:
echo coucou_yopta | oscopy
# now you can paste "coucou_yopta" everywhereImportant
This works even if you're connected to a remote SSH server. The content will travel through SSH and arrive in your local system clipboard.
Attention though, the echo adds a trailing newline. You can strip it with oscopy -s:
echo precision | oscopy -s
# now you can paste "precision" knowing it won't add a newlineWhy not piping file contents?
cat ~/.ssh/id_rsa.pub | oscopy
# then paste your SSH pubkey on the website...If you want you can just pass your text as args, not piping anything:
oscopy Yes, I can do this.
# this makes "Yes, I can do this." magically appear in your clipboardInstall as an uv tool from this GitHub repo:
uv tool install git+https://github.com/hammerill/oscopyOr local dev install:
# in oscopy project folder
uv tool install -e .