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

sshya

v0.2.1

Published

This project is a command-line interface (CLI) tool named `sshya` for managing SSH connections.

Readme

Project: sshya

This project is a command-line interface (CLI) tool named sshya for managing SSH connections.

Core Functionality

  • Add, remove, update, and list SSH connection configurations (alias, user, host, port, key path).
  • Generate SSH command strings for saved connections.
  • Import and export connections from/to a JSON file.
  • A key feature is the fzf-based launcher that provides fast, keyboard-driven connection selection and execution using your system's SSH client.

Technology Stack

  • Runtime: Bun
  • Language: TypeScript
  • Dependencies:
    • commander: For command-line argument parsing.
    • inquirer: For interactive prompts.
    • chalk: for terminal string styling.
    • fuse.js: for fuzzy searching connections.
    • zod: for validating user input and imported data.

Implementation Details

The main application logic is in index.ts. The tool generates SSH command strings that are executed by your system's SSH client, providing a clean separation between connection management and actual SSH execution.

fzf-based launcher

You can enable a fast, keyboard-driven launcher for your saved connections using fzf.

Quick setup

  1. Ensure fzf is installed.

  2. Print the shell snippet:

    sshya fzf
    # or the aliases
    sshya instructions
    sshya install
  3. Copy the printed snippet into your ~/.zshrc or ~/.bashrc and reload your shell.

How it works

  • The function displays your connections via sshya list --oneline --names, showing:
    • alias, user@host (for display), and a third tab-separated column containing ssh-ready arguments.
  • After you pick an entry with fzf, it runs sshya print <alias> to obtain a single-line command string and then invokes your system ssh client.
  • Argument splitting is handled per-shell to avoid issues with flags and quoting:
    • zsh: ssh ${(z)command}
    • bash: read -r -a __args <<< "$command"; ssh "${__args[@]}"

This ensures flags like -p 2222 and identities like -i '/path/with spaces/key' are passed correctly to ssh.

Why system ssh?

When launching from fzf, we intentionally use your host ssh binary instead of the built-in connect helper to avoid TTY and ZLE interaction problems.

ZLE/TTY handling (zsh)

The snippet detaches the zsh line editor before starting ssh and restores it after:

  • Before ssh: zle -I
  • After ssh: zle -R -c

It also temporarily disables XON/XOFF flow control during selection (enables Ctrl-S) and restores your previous stty settings afterward.

Keybinding

The snippet includes an example zsh binding:

zle -N fzf_sshya
bindkey '^S' fzf_sshya

For bash, see the printed notes (example: bind -x with Ctrl-S), and ensure flow control is disabled (stty -ixon).

Troubleshooting

  • If typing doesn't work in the remote session, make sure you've reloaded your shell after updating the snippet (it uses zle -I, zle -R -c, and restores stty).
  • If the port or key path is ignored, ensure you're on the updated snippet which splits args correctly for zsh/bash and make sure sshya print <alias> outputs the expected -p/-i flags.