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

gssh

v0.1.3

Published

SSH + Git author profile manager

Readme

gssh - SSH + Git Author Profile Manager

A cross-platform Node.js CLI tool that manages multiple SSH keys and Git author profiles.

Features

  • Profile-based SSH key management: Switch between different SSH identities with a single command
  • Git author configuration: Automatically set Git user.name and user.email (global or local)
  • Auto-import existing keys: Automatically detects and offers to import existing SSH keys on first run
  • Public key display: Easily copy your public key to clipboard for GitHub/GitLab
  • Cross-platform: Works on macOS, Linux, and Windows (Node.js 18+)

Installation

From Source

cd gssh-node
npm install
npm run build

# Install globally (optional)
npm link

From npm

npm install -g gssh

Usage

List all profiles

gssh list

Create a new profile

gssh add myprofile
# Interactive wizard will prompt for Git author name, email, and generate SSH key

Switch to a profile

# Set Git config globally (default)
gssh use myprofile

# Set Git config locally (current repo only)
gssh use myprofile -l

Show current active profile

gssh current

Display public key

gssh pubkey
# Automatically copies to clipboard (macOS/Linux/Windows)

Remove a profile

gssh remove myprofile
# Safety checks prevent accidental deletion of active profile

Show menu (default)

gssh
# Shows menu, current profile, and public key

How It Works

Profile Storage

Profiles are stored in ~/.ssh/profiles/<profile-name>/:

~/.ssh/profiles/
├── work/
│   ├── id_ed25519          # Private key
│   ├── id_ed25519.pub      # Public key
│   └── git_author.txt      # Git author info
└── personal/
    ├── id_ed25519
    ├── id_ed25519.pub
    └── git_author.txt

Active Profile Tracking

Active profile is tracked using two methods:

  1. Marker file (preferred): ~/.ssh/git-ssh-active.txt
  2. Public key matching (fallback): Compares public keys in ~/.ssh/ with profile keys

Git Author Format

The git_author.txt file supports two formats:

Single line:

John Doe <[email protected]>

Two lines:

John Doe
[email protected]

Technical Details

Stack

  • TypeScript with ESM modules
  • commander - CLI parsing
  • chalk - Terminal colors
  • execa - Shell command execution
  • fast-glob - Directory traversal

Architecture

src/
├── index.ts           # Main entry point
├── cli.ts             # Commander.js setup
├── types.ts           # TypeScript interfaces
├── paths.ts           # Filesystem path management
├── git-author.ts      # Git config management
├── keypair.ts         # SSH key operations
├── utils/
│   ├── clipboard.ts   # Platform-specific clipboard
│   ├── prompts.ts     # Interactive prompts
│   ├── errors.ts      # Error handling
│   └── platform.ts    # Platform detection
└── commands/
    ├── list.ts        # List profiles
    ├── use.ts         # Switch profiles
    ├── add.ts         # Create profiles
    ├── remove.ts      # Delete profiles
    ├── current.ts     # Show active profile
    ├── pubkey.ts      # Display public key
    ├── import.ts      # Auto-import existing keys
    ├── menu.ts        # Default menu
    └── shared.ts      # Shared utilities

File Permissions

On Unix-like systems (macOS, Linux):

  • Private keys: chmod 600 (read-only by owner)
  • Public keys: chmod 644 (readable by all)

On Windows: Relies on NTFS permissions (not explicitly managed)

Clipboard Support

Platform-specific clipboard commands:

  • macOS: pbcopy
  • Windows: clip
  • Linux: xclip, xsel, wl-copy (tries multiple)

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode (development)
npm run dev

# Clean build artifacts
npm run clean

Differences from Rust Version

  • Uses Node.js native readline instead of external prompt libraries
  • Uses execa for shell commands instead of std::process::Command
  • Modular file structure vs single-file binary
  • Same CLI interface and functionality

Requirements

  • Node.js 18 or higher
  • ssh-keygen (for generating keys)
  • git (for setting config)

License

MIT