npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yukikisaku/pi-ssh-paste-image

v0.1.1

Published

Paste local clipboard text or images into Pi running over SSH.

Readme

pi-ssh-paste-image

Overview

Paste clipboard text, images, or selected local files from your local machine into Pi running on a remote Unix-like host over SSH. The package contains both a Pi extension and the pi-ssh-paste-image CLI.

Requirements

The local machine needs Node.js 20+ and an OpenSSH ssh client. On Linux, clipboard access uses wl-paste on Wayland or xclip/xsel on X11. On macOS, text uses pbpaste and images use pngpaste. On Windows, clipboard text uses PowerShell Get-Clipboard; image clipboard support is not currently implemented on Windows.

The remote machine needs Pi, a POSIX-compatible shell, rm, Unix-domain sockets, and an SSH server that permits stream-local forwarding. The normal ssh command creates a reverse Unix socket on the remote host. The remote socket is requested with mode 0600 through StreamLocalBindMask=0177.

On Linux and macOS, the local clipboard daemon listens on a Unix socket inside a private temporary directory. On Windows, it listens only on an ephemeral 127.0.0.1 TCP port because Node.js does not expose filesystem Unix sockets there. In both cases, requests also require a random per-session token. The daemon reads the clipboard only after you invoke /paste, /ssh-paste, or the configured shortcut.

Binary clipboard data is written on the remote machine. The default output directory is /tmp/pi-ssh-paste-image, created with mode 0700; saved files are created with mode 0600. Clipboard text is inserted directly into the Pi editor instead of being written to disk.

Installation

Install the CLI on the local machine:

npm install --global @yukikisaku/pi-ssh-paste-image

Install the Pi extension on the remote machine where Pi runs:

pi install npm:@yukikisaku/pi-ssh-paste-image

Usage

Check the local requirements first:

pi-ssh-paste-image doctor

Start Pi through the SSH wrapper:

pi-ssh-paste-image ssh user@host -- pi

The CLI starts the local clipboard daemon, creates a reverse socket on the remote host, exports the required PI_PASTE_* values for the remote Pi process, and removes the remote socket when the SSH session exits. While Pi is running, use /paste, /ssh-paste, or Alt+Shift+V to request the current local clipboard content.

Useful SSH options are --output-dir DIR, --max-bytes SIZE, --remote-socket PATH, and repeatable --ssh-option VALUE. The default transfer limit is 20 MiB. Additional SSH options are passed directly to the local ssh executable.

Configuration

Configure sshPasteImage in global Pi settings or in a trusted project's .pi/settings.json. Supported keys are shortcut, outputDir, socketPath, token, maxBytes, and timeoutMs.

Environment overrides use PI_PASTE_SOCK, PI_PASTE_TOKEN, PI_PASTE_OUTPUT_DIR, PI_PASTE_MAX_BYTES, and PI_PASTE_TIMEOUT_MS. The normal pi-ssh-paste-image ssh ... flow generates the socket path and random token automatically, so you normally do not need to set them yourself.

Uninstallation

Remove the local CLI:

npm uninstall --global @yukikisaku/pi-ssh-paste-image

Remove the remote Pi package:

pi uninstall npm:@yukikisaku/pi-ssh-paste-image

Remove package-specific Pi configuration if you no longer need it. Files previously saved in the configured output directory are not deleted automatically.

License

MIT © yuki-kisaku. See LICENSE.