I should soon be done with kicking Claude out of my personal MacBook to a local box. One of the first things I missed is the ability to paste screenshots with `⌃`` V`: the remote terminal doesn’t know about my clipboard.
I wanted my solution to look like this:
For the transport part, turns out Samuel Lawrentz had a similar need and published a CLI tool called clipssh: basically a Bash script that writes the image to a temporary file and copies it to the remote host. I didn’t want to install this with a package manager, so I just stuck the main script in .local/bin.
The second part is a shortcut in the Shortcuts app that comes into play after I’d already captured the screenshot: Shottr is now the frontmost app and pressing # expand the path so pngpaste (a dependency of clipssh) is there export PATH="/opt/homebrew/bin:$HOME/.local/bin:$PATH" export CLIPSSH_HOST="username@100.113.x.x" export CLIPSSH_REMOTE_DIR="/tmp/claude-image-clipboard" sleep 0.3 osascript -e 'tell application "System Events" to key code 53' sleep 0.3 clipssh
One thing left. 1Password kept prompting me to approve the SSH connection each time I invoked this, so I made the connection persist for 4 hours in `~/.ssh/config`:
Host 100.113.x.x ControlMaster auto ControlPath ~/.ssh/cm-%C ControlPersist 4h