Skip to content

rbnkr/snaphost

Repository files navigation

snaphost

Send Windows screenshots to any host, and get the destination-side file path back on your clipboard — ready to paste.

Take a screenshot the normal way (Win+Shift+S, Win+PrintScreen, …). snaphost notices the new image on the Windows clipboard, saves it to a configured destination, and replaces the clipboard contents with the path the file now lives at on that destination. Paste (Ctrl+V) into Claude Code, VS Code, a terminal — anything that wants a path.

Why this exists

AI agents that run in the terminal — in WSL or over SSH on a remote host — can't take a pasted screenshot. They work with files by path, and the image you just captured only exists on the Windows clipboard: there's no file on the host the agent runs on, so there's nothing to point it at. You end up saving the screenshot somewhere by hand, copying it across to the right machine, and typing out the path.

snaphost removes that friction. It materializes the screenshot as a real file on the host where your agent lives and hands you back that host-side path, ready to paste — so the agent can actually open it.

Build

# on any host with Go (Linux, macOS, …), build both Windows binaries — no Windows toolchain needed:
./build.sh        # -> dist/snaphost.exe (tray) and dist/snaphost-cli.exe (CLI)

# or a native build of the CLI for development/iteration:
go build -o dist/snaphost-cli ./cmd/snaphost-cli

Usage

Tray app (snaphost.exe):

snaphost.exe [config.json]

Runs in the notification area. Right-click to switch the active profile, Pause/Resume, open Configure…, or Quit. The tray icon's tooltip shows status and the last delivered file. Reads config.json from the working directory unless a path is given.

Headless CLI (snaphost-cli.exe) — for unattended/service use:

snaphost-cli validate            # check the config parses and profiles are valid
snaphost-cli run                 # start watching the clipboard (uses active_profile)
snaphost-cli run -profile remote # override which destination profile is active
snaphost-cli version

Configuration

Settings live in config.json (next to the binary; override with the CLI's -config <path> or the tray app's first argument). Each profile is one named destination, and active_profile picks the default. Two destination types are supported:

  • local-wsl — drop the file into a WSL distro's filesystem and hand back the Linux path, for pasting into a WSL session.
  • remote-ssh — SFTP the file to a remote host and hand back the path there, for pasting into an agent running over SSH on that host.

The easiest way to edit is the tray app's Configure… window: it adds/edits profiles, browses for SSH keys, toggles start-at-login, and opens pre-filled with a starter profile on first run. See config.example.json for every field.

About

Send Windows screenshots to WSL or a remote host over SSH, and get the destination-side file path back on your clipboard — ready to paste into a terminal AI agent.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors