I made a tiny tool to paste local files into remote tmux AI agents

I made paste-to-tmux because I kept hitting the same dumb friction.

Most of my coding sessions are mosh + tmux into a remote Mac Mini or Ubuntu VM, with Codex / Claude Code / aider full-screen in one pane. When I wanted to hand the agent a local file or screenshot, I had to open another terminal, scp it over, then type the remote path back into the TUI.

paste-to-tmux is one bash file. It scps the file to the remote box, then uses tmux send-keys -l to type the absolute remote path straight into the target pane. Since it sends literal keys, it works even while the TUI owns the pane. Paths are shell-quoted so filenames cannot inject keystrokes.

It also grabs clipboard screenshots with pngpaste / osascript on macOS, or wl-paste / xclip on Linux.

Repo: https://github.com/kentaccn/paste-to-tmux

MIT, free, nothing installed on the remote.

This was very much a vibecoding project. I had the itch, knew tmux could probably do it, and built it in an afternoon with Codex and Claude Code doing most of the typing. The judgment was mine. The models were fast hands.

Anyone else have small "AI agent glue" tools like this that removed one annoying step from your setup?

Posted Jul 6, 2026, 1:22 PM UTC

10
Loading comments…