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 🙏

© 2025 – Pkg Stats / Ryan Hefner

use-multiple-gits

v1.1.2

Published

CLI tool to manage multiple git configurations (user.name, user.email, SSH keys) with easy switching between identities

Readme

use-multiple-gits

npm version License: MIT

A CLI tool to easily manage multiple git configurations (user.name, user.email, SSH keys) with simple switching commands. Perfect for developers who work with multiple Git identities (work, personal, different organizations).

🚀 Quick Start (3 Steps)

Step 1: Install & Setup

npm install -g use-multiple-gits && multiGit setup

Or use the automated script:

curl -fsSL https://raw.githubusercontent.com/narek941/use-multiple-gits/main/setup.sh | bash

Step 2: Add Your First Configuration

multiGit add work --generate-ssh-key

You'll be prompted for:

  • Display name (e.g., "Work")
  • Git user.name
  • Git user.email
  • SSH key filename (auto-generated if using --generate-ssh-key)

Step 3: Use It!

source ~/.zshrc  # Reload shell (or restart terminal)
use-work         # Switch to work configuration

That's it! 🎉

📖 Complete Example

# 1. Install and setup
npm install -g use-multiple-gits && multiGit setup

# 2. Add work configuration (with auto-generated SSH key)
multiGit add work --generate-ssh-key
# Enter: Work, John Doe, [email protected]

# 3. Add personal configuration
multiGit add personal --generate-ssh-key
# Enter: Personal, John Doe, [email protected]

# 4. Reload shell
source ~/.zshrc

# 5. Switch between identities
use-work      # Switch to work
use-personal  # Switch to personal

✨ Features

  • One-Command Setup: Automated installation and configuration
  • Auto SSH Key Generation: Creates SSH keys automatically
  • Simple Switching: use-work, use-personal, etc.
  • Shell Integration: Works with zsh, bash, PowerShell
  • Export/Import: Backup and restore configurations
  • Cross-Platform: macOS, Linux, Windows

📚 Commands

Setup

multiGit setup              # Automated setup (recommended)
multiGit init               # Manual initialization

Configuration Management

multiGit add <name>                    # Add new configuration
multiGit add <name> --generate-ssh-key # Add with auto-generated SSH key
multiGit list                           # List all configurations
multiGit remove <name>                  # Remove configuration

Advanced

multiGit export [file]                  # Export configurations
multiGit import <file>                  # Import configurations
multiGit set-local <name>               # Set config for current repo only

🔑 Adding SSH Keys to GitHub/GitLab

After creating a configuration, add the public key:

# Display your public key
cat ~/.ssh/id_ed25519_work.pub

# Copy and add to:
# GitHub: Settings → SSH and GPG keys → New SSH key
# GitLab: Preferences → SSH Keys → Add SSH Key

🛠️ Troubleshooting

Command Not Found

source ~/.zshrc  # Reload shell
# Or restart your terminal

SSH Key Issues

# Check key permissions
ls -la ~/.ssh/id_ed25519_*

# Fix permissions if needed
chmod 600 ~/.ssh/id_ed25519_*

📋 Requirements

  • Node.js >= 14.0.0
  • Git installed
  • macOS/Linux with zsh (or Windows with WSL/PowerShell)

📝 How It Works

  1. Creates scripts in ~/.bin/ that switch git configurations
  2. Adds aliases to your shell config (~/.zshrc)
  3. Automatically manages SSH keys for each identity
  4. Modifies global git config when switching

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT

👤 Author

Narek Kolyan - GitHub | Website

Created with ❤️ for developers who juggle multiple git identities.