SHEET 03blog/shotpaste-one-clipboard-write/ REVISED 

One screenshot, three pastes: building shotpaste in Rust

How one clipboard write with three formats lets a single paste work in Slack, a JIRA upload and a terminal, and how to install shotpaste on any OS.

Published
Length
3 min read

shotpaste is a small Rust daemon that watches your screenshot folder and puts each new screenshot on the clipboard three ways at once: as image bytes, as a file and as a text path. One paste then works in Slack, in a JIRA upload field and in a terminal. This post covers why that works across apps, what differs between operating systems, and how to install it.

What goes wrong when you paste a screenshot?

The answer depends on where you paste. Chat apps like Slack, WhatsApp and Discord want the image itself. Upload fields and file pickers, JIRA’s included, want a file. Terminals, editors and coding agents like Claude Code and Cursor want a path they can open.

Your screenshot tool picks one of those for you. So you take the screenshot twice, or you open Explorer and drag the file in, or you paste, get nothing useful, and wonder which paste this particular app wanted.

One clipboard write, three formats

A clipboard doesn’t have to hold a single value. A program can put several representations of the same thing on it, and the app you paste into takes the one it understands. It’s the reason copying from a web page gives you formatted text in a word processor and plain text in a terminal.

shotpaste uses that for screenshots. When a new PNG appears in the watched folder, it writes:

Format Who reads it
Image bytes Slack, WhatsApp, Discord, image editors, browsers
File-drop list JIRA uploads, file pickers, file managers
Text path Terminals, editors, Markdown previews

They go in as one write. A clipboard write replaces whatever was on the clipboard before, so three separate writes would leave you with only the last format. With one write, the app you paste into sees all three and picks.

The daemon doesn’t touch the screenshot step at all. You keep your usual shortcut and your OS’s capture tool, and shotpaste reacts when the file lands. The flip side is that it only sees screenshots that are saved to disk.

Cross-platform notes

shotpaste runs on Windows, macOS and Linux as one static binary, and the differences between them are small.

You keep the shortcut you already use: Win+PrtScn on Windows, Cmd+Shift+3 on macOS, PrtScn on Linux. By default shotpaste watches your OS’s standard screenshot directory, and shotpaste watch takes another path if yours is somewhere else.

The installer puts the binary in ~/.cargo/bin on Linux and macOS, and in %CARGO_HOME%\bin or ~\.cargo\bin on Windows. shotpaste install then registers it to start at login on each OS, and shotpaste status tells you whether it’s running.

Install

On macOS or Linux:

curl -fsSL https://github.com/ebrahim-sameh/shotpaste/releases/latest/download/shotpaste-installer.sh | sh
shotpaste install

On Windows, in PowerShell:

irm https://github.com/ebrahim-sameh/shotpaste/releases/latest/download/shotpaste-installer.ps1 | iex
shotpaste install

The first line puts the binary on disk and the second registers it to start at login. If you’d rather read the install script before running it, curl -fsSL with the same URL prints it, and the releases page publishes the sha256 of every artifact.

With a Rust toolchain you can also build it from crates.io. It’s slower than the prebuilt installer because it compiles from source:

cargo install shotpaste
shotpaste install

Then take a screenshot and paste it somewhere.

The code is on GitHub under the MIT license, and the project page has the design trade-offs.

About the author

Software engineer and serial founder in Alexandria, Egypt, and CTO at Zaher.AI, a GEO and SEO agency serving MENA.

Console

Type help and press Enter.