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

@xynogen/pix-ssh

v0.5.6

Published

Pi tool — ssh_run: run remote commands over SSH with password/key auth and remote sudo

Readme

pix-ssh

Pi tool — ssh_run: run a command through a remote host's configured SSH shell, optionally through POSIX sudo.

[!IMPORTANT] Basic Windows cmd, Windows PowerShell, and pwsh commands may work through the configured SSH shell, but support is best-effort. Shell selection, complex quoting, PowerShell error/stream/encoding semantics, interactive prompts, and Windows administrator/UAC elevation are not covered. The agent should back away when correctness depends on those limits. sudo: true supports POSIX sudo only.

What it does

Registers the ssh_run tool — run a command through the configured SSH shell on a remote machine, behind the same permission dialog pix-sudo uses (shared overlay from @xynogen/pix-pretty).

  • Initial + privileged calls → Allow/Deny approval, 60-second auto-deny timeout.
  • Non-privileged calls → may auto-approve during the 15-minute per-host window, or in YOLO mode when no password is missing; each auto-approval emits a notification.

Output is truncated to 50 KB / 2000 lines. Non-interactive (RPC/JSON) mode blocks the tool immediately.

Parameters: action ("command" default · "file" · "info"), host as [user@]host[:port] (e.g. [email protected]:2222), command, optional sudo (run through POSIX sudo as root), optional reason.

action: "info" — SSH config, no connection

Lets the agent discover hosts without reading ~/.ssh/config itself. Read-only: no connection, no approval dialog, no password.

  • No host → lists configured host aliases from ~/.ssh/config and every file it pulls in via Include (glob + relative paths resolved OpenSSH-style, cycle-guarded). Wildcard-only patterns (Host *) are skipped. Each row shows alias → user@hostname:port plus via <ProxyJump> when set.
  • With host → runs ssh -G <host> and reports the effective HostName/User/Port/ProxyJump/IdentityFile for that target (alias resolution, Match, and Include all handled by OpenSSH). No packets are sent to the remote.

Authentication

  • SSH login — tries key/agent/existing-master auth first via a BatchMode=yes probe. If that succeeds, no login password is needed. If it fails, a masked overlay (● per character) collects the login password, fed to sshpass -e through the child's SSHPASS env var — never as an argv (no ps leak), never written to disk.
  • Remote sudo (sudo: true) — when the SSH connection is passwordless, ssh_run first probes sudo -n true; if the remote sudoers is NOPASSWD the overlay shows a plain Allow/Deny with no sudo prompt. Otherwise a separate masked prompt collects the remote sudo password, piped to the remote sudo -S -p '' on stdin, so it travels inside the encrypted SSH channel, not as an argv.

Both passwords are cached in-memory per host for the session (keyed by user@host:port), never persisted. A wrong login password drops the login cache; a wrong sudo password drops the sudo cache — the next call re-prompts.

Connection reuse

OpenSSH ControlMaster multiplexing keeps one authenticated connection per host alive for a short ControlPersist window, so repeat ssh_run calls to the same host skip re-auth. Host-key policy is accept-new and ConnectTimeout is 10s.

While the approval dialog is open, ssh_run holds the shared agent-state coordinator in blocked (via withAgentBlock from @xynogen/pix-runtime), so an away user in a herdr pane is pinged when a command is waiting on approval. /afk (pix-commands) denies ssh_run immediately; /yolo auto-approves it only when no password is missing (a password prompt can't be auto-typed).

Completed calls collapse after the configured Pix delay into a status row such as ✓ ssh [email protected] apt update · exit 0 · 12 lines. Configure the delay with collapse.delaySec and the per-tool toggle with collapse.tools.ssh in ~/.pi/agent/pix.json. Overlays are never collapsed, and passwords are never included in result metadata or render state.

Requirements

  • ssh (OpenSSH) on the local machine.
  • sshpass on the local machine — only needed for password-based SSH login. Key-based auth works without it.

Install

pi install npm:@xynogen/pix-ssh

Standalone and opt-in. @xynogen/pix-core does not bundle it. Remote execution over SSH is a networked, privileged capability.

Full distro

This package is part of Pix. The installer sets up Pi and the full distro. See Install for the notes for each OS.

# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.ps1 | iex

License

MIT. See LICENSE.