Skip to content

Releases: peerhold/pastebridge

Release list

pastebridge

Choose a tag to compare

@peerhold peerhold released this 21 Sep 11:39
9ed54fa

What is pastebridge?

The error is on one screen. The answer is on another.

pastebridge is a two-lane shared clipboard for debugging across two devices you own on the same network. Terminal output goes up the log lane, and commands come back down the command lane, one per entry, each with its own copy button.

It's one binary for Linux, macOS, and Windows, on x86-64 and ARM. There is no account, no sign-in, and no server belonging to anyone else. Nothing you paste is written to disk, nothing is ever executed, and it makes no outbound requests.

How It Works in 3 Steps

  1. Run the binary: Run the single file on the machine with the problem. Your browser opens at http://127.0.0.1:8787/, or use -headless where there is no browser at all. You can also pipe output straight in, as in dmesg | pastebridge.
  2. Switch sharing on: A TLS listener starts on your local network and shows an address and a six-digit PIN. Sharing stays off until you ask for it, and off means no listener exists.
  3. Open it on the other device: Visit the address in any browser, accept the certificate warning once, and enter the PIN. Both devices now see both lanes.

The Loop It's For

If you're already in an SSH session where copy and paste work, you don't need this. pastebridge is for when the text is long and the two screens are different.

  1. Something breaks, and the output is long. A 200-line stack trace, a full journal, or a dmesg full of USB errors, on a screen where selecting it is slow or impossible: a phone SSH client, a VM console with no clipboard, or a monitor on another desk.
  2. You pipe or paste it into the log lane. It lands on the other device immediately, with its whitespace intact and its own copy button.
  3. You work the problem on the machine with a keyboard. Read it, search it, check the docs, ask a colleague, or paste it into a language model. pastebridge has no model, no API key, and no outbound connection. It is the wire between the two screens and has no opinion about what happens at either end.
  4. The command comes back and copies with one tap. One command per entry, because a long command is exactly the thing a phone can't select cleanly.

Core Features

  • Two Lanes, One Feed: Output and commands stay in separate columns instead of interleaving, and every command gets its own copy button.
  • Pipe It In: some-command | pastebridge sends output to the log lane without touching a clipboard, and -lane cmd sends it to the command lane instead.
  • Prompt Stripping: A leading $ or # is removed from every command line on the way in, so what you copy is the command and not somebody's prompt.
  • Readable Long Output: Entries longer than about nine lines are clipped with a Show all control, so one huge stack trace doesn't bury everything below it.
  • Memory Only: Entries live in the process, capped at the most recent 500 across both lanes, and disappear when it stops.
  • Zero Mobile Footprint: The other device only needs a browser. Nothing to install, no account, and no internet connection required.
  • Headless & Raspberry Pi Support: Run -headless -exit-on-idle 0 on a machine with no screen and pair from your phone or laptop.

Piping Output In

dmesg | ./pastebridge-linux-v1_1
journalctl -b -p err | ./pastebridge-linux-v1_1
echo 'sudo systemctl restart nginx' | ./pastebridge-linux-v1_1 -lane cmd

If a copy is already running on this machine, the piped text is handed to it over loopback and the pipe exits. If none is running, this run takes the text and serves it. Piped input is capped at 512 KB.

-exit-on-idle quits after five seconds with nothing attached by default, so when piping into a fresh headless start, add -exit-on-idle 0 or it will stop before you can pair.

If the running copy was started with -port, pass the same -port to the piped command, or it won't find the running copy.

Security Overview

Read this before you switch sharing on.

  • The Gate: Anyone who can reach the address can try the PIN. The six-digit PIN locks pairing after ten wrong guesses, and only the host can reset it.
  • Loopback Is the Host: Anything on this machine that reaches 127.0.0.1 counts as the host, with no PIN. That's how the pipe works, and it means any local process or user can read, send to, and clear both lanes.
  • Full Access: A paired device is not read-only. It can send to and clear both lanes, exactly as the host can.
  • Encryption: The certificate is self-signed, so your browser warns you once. It defeats passive listening on the network, but not someone already positioned between your two devices.
  • What You Paste: Terminal output can contain tokens, connection strings, hostnames, paths, and environment variables. Nothing is redacted, so look before you send.
  • Commands Are Just Text: Nothing runs, inspects, parses, or validates what arrives in either lane. The absence of a warning is not an assurance. You are the execution step, in your own terminal.
  • Lifespan: Pairing expires after 12 hours. Switching sharing off ends every paired session, and turning it back on means pairing again.

Quick Start

Download, check the hash, unpack, run.

Linux x86-64

curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-linux-v1_1.tar.gz && \
curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-linux-v1_1.tar.gz.sha256 && \
sha256sum -c pastebridge-linux-v1_1.tar.gz.sha256 && \
tar -xzf pastebridge-linux-v1_1.tar.gz && \
chmod +x pastebridge-linux-v1_1 && \
./pastebridge-linux-v1_1

macOS Apple silicon

curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-mac-v1_1.tar.gz && \
curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-mac-v1_1.tar.gz.sha256 && \
shasum -a 256 -c pastebridge-mac-v1_1.tar.gz.sha256 && \
tar -xzf pastebridge-mac-v1_1.tar.gz && \
(xattr -dr com.apple.quarantine pastebridge-mac-v1_1 2>/dev/null || true) && \
chmod +x pastebridge-mac-v1_1 && \
./pastebridge-mac-v1_1

macOS Intel

curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-mac-intel-v1_1.tar.gz && \
curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-mac-intel-v1_1.tar.gz.sha256 && \
shasum -a 256 -c pastebridge-mac-intel-v1_1.tar.gz.sha256 && \
tar -xzf pastebridge-mac-intel-v1_1.tar.gz && \
(xattr -dr com.apple.quarantine pastebridge-mac-intel-v1_1 2>/dev/null || true) && \
chmod +x pastebridge-mac-intel-v1_1 && \
./pastebridge-mac-intel-v1_1

Which Mac file? Apple menu → About This Mac. Any M-series chip (M1 or later) is Apple silicon; anything named Intel takes the Intel file. The Intel build also runs on Apple silicon through Rosetta, but the Apple silicon build will not start on an Intel Mac.

The xattr line clears macOS's download quarantine flag, without which the unsigned binary is refused. It runs only after the checksum passes, and does nothing if the flag isn't set.


Windows x86-64 · PowerShell

curl.exe -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-v1_1.zip
curl.exe -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-v1_1.zip.sha256
$want = (Get-Content pastebridge-v1_1.zip.sha256 -Raw).Trim().Split(' ')[0].ToLower()
$got  = (Get-FileHash pastebridge-v1_1.zip -Algorithm SHA256).Hash.ToLower()
if ($got -eq $want) { Expand-Archive pastebridge-v1_1.zip -DestinationPath . -Force; .\pastebridge-v1_1.exe } else { Write-Error 'Checksum failed' }

After the first run, you can also start it by double-clicking pastebridge-v1_1.exe.


Windows on ARM Snapdragon · PowerShell

curl.exe -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-arm64-snapdragon-v1_1.zip
curl.exe -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-arm64-snapdragon-v1_1.zip.sha256
$want = (Get-Content pastebridge-arm64-snapdragon-v1_1.zip.sha256 -Raw).Trim().Split(' ')[0].ToLower()
$got  = (Get-FileHash pastebridge-arm64-snapdragon-v1_1.zip -Algorithm SHA256).Hash.ToLower()
if ($got -eq $want) { Expand-Archive pastebridge-arm64-snapdragon-v1_1.zip -DestinationPath . -Force; .\pastebridge-arm64-snapdragon-v1_1.exe } else { Write-Error 'Checksum failed' }

After the first run, you can also start it by double-clicking pastebridge-arm64-snapdragon-v1_1.exe.


Raspberry Pi OS 64-bit · Headless (Shared to Phone)

curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-linux-arm64-pios-modern-v1_1.tar.gz && \
curl -fLO https://github.com/PeerHold/pastebridge/releases/download/v1.1/pastebridge-linux-arm64-pios-modern-v1_1.tar.gz.sha256 && \
sha256sum -c pastebridge-linux-arm64-pios-modern-v1_1.tar.gz.sha256 && \
tar -xzf pastebridge-linux-arm64-pios-modern-v1_1.tar.gz && \
chmod +x pastebridge-linux-arm64-pios-modern-v1_1 && \
./pastebridge-linux-arm64-pios-modern-v1_1 -headless -exit-on-idle 0

-headless skips the local browser and switches sharing on at startup, printing the address and PIN to the terminal. Open that address on your phone and enter the PIN. -exit-on-idle 0 keeps it from quitting before you pair.


All archives and their SHA-256 files are on the Releases page. Check the hash before you unpack.