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

git-userhub

v3.1.1

Published

Switch Git accounts in one command. No config editing. No SSH key chaos.

Downloads

3,052

Readme


Note on the package name: This package is published as git-userhub on npm. After installation, the CLI command is git-user. The npm name is just the registry identifier — everything you run is git-user.


Install

npm install -g git-userhub

That's it. The git-user command is now available in your terminal.


The Problem It Solves

You have a work account, a personal account, maybe a freelance client or two. Every few weeks you push commits with the wrong email. Your personal address ends up in a client's repo history. Your work email leaks onto your public GitHub profile.

git-user fixes this permanently. Register your identities once, switch with one command.


Quick Start

# Register your identities (guided, takes ~2 minutes each)
git-user register   # name: work,     email: [email protected]
git-user register   # name: personal, email: [email protected]

# Switch between them instantly
git-user switch work
git-user switch personal

# See what's active
git-user current

# Create and switch in one step
git-user switch -c freelance [email protected]

What It Does on Switch

git-user switch work
        │
        ▼
  1. Reads "work" from ~/.git-users/config.json
  2. Sets ~/.gitconfig  →  user.name, user.email
  3. Sets ~/.gitconfig  →  core.sshCommand (your SSH key)
  4. Verifies SSH connection
  5. ✅ Done — under one second

Key Features

| Feature | Description | |---------|-------------| | 🔑 Identity switching | Name + email + SSH key as one atomic unit | | 🔐 SSH key management | Auto-generate ed25519 keys, bind existing keys, pubkey shows active key only | | 🔒 Temporary sessions | Use an identity on a shared machine — zero trace left behind | | 🛡️ Security audit | git-user security checks permissions and passphrase protection | | 🚀 HTTPS → SSH | git-user fix-remote converts remotes for passwordless push | | 🪝 Pre-commit hooks | Block commits if the wrong identity is active | | 📦 Export/import | Move all identities to a new machine, AES-256 encrypted | | 🖥️ TUI | Interactive menu for everything | | 🐚 Shell completions | bash, zsh, fish |


Temporary Sessions

Working on a borrowed machine? Don't want to leave SSH keys behind?

# Start a temporary session — nothing is saved permanently
git-user session start --temp alice [email protected] --ttl 2h

# When done — key files deleted, previous identity restored
git-user session stop

All Commands

register                    Create new identity (guided)
switch <name>               Switch to an identity
switch -c <name> [email]    Create and switch in one step
list                        Show all identities
current                     Show active identity
remove <name>               Delete an identity
edit <name> <email>         Update email
bind <name>                 Link an SSH key
pubkey                      Show public key of active identity
passphrase                  Add, change, or remove (--remove) passphrase for active identity
rekey <name>                Rotate SSH key
fix-remote                  Convert HTTPS remotes to SSH
session start [--ttl <d>]   Load SSH key into ssh-agent
session start --temp ...    Temporary session (nothing saved)
session stop                Unload key / end temp session
session status              Show agent status
security                    Audit all identities
export --all                Export encrypted bundle
import <file>               Import from bundle
doctor                      Full health check
tui                         Interactive menu
completion <shell>          Shell completions
hook install|uninstall      Pre-commit identity guard
--update                    Update to latest version
--version / -v              Show version

Aliases: lslist · swswitch · rmremove


What Gets Modified

~/.git-users/config.json     ← your identities (never auto-deleted)
~/.gitconfig                 ← updated on every switch
~/.ssh/git_<name>            ← private key (stays on your machine)
~/.ssh/git_tmp_<name>        ← temp session key (deleted on stop)

Your repositories are never touched.


Full Documentation

github.com/divyo-argha/git-user


License

MIT


GitHub

If git-user saved you from a wrong-account commit, consider giving it a ⭐