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

@mckinleymedia/gitswitch

v2.0.0

Published

Professional Git profile manager with SSH key management for GitHub, GitLab, and Bitbucket

Downloads

8

Readme

gitswitch

A professional Git profile manager with SSH key management for GitHub, GitLab, and Bitbucket.

Features

  • 🔄 Quick switching between multiple Git profiles
  • 🔑 Automatic SSH key generation and management
  • 🔒 Secure storage of profile configurations
  • 🎯 Support for GitHub, GitLab, and Bitbucket
  • 📋 Profile listing with current status
  • ✏️ Easy profile editing and removal
  • 🔍 SSH connection testing
  • 📝 Interactive and command-line modes

Installation

npm install -g @mckinleymedia/gitswitch

Or using yarn:

yarn global add @mckinleymedia/gitswitch

Usage

Initialize GitSwitch

Set up your first Git profile:

gitswitch init

Add a New Profile

Add additional Git profiles:

gitswitch add

Switch Profiles

Switch to a different profile:

# Interactive mode (select from list)
gitswitch switch

# Direct switch
gitswitch switch work

# Using the short alias
gitswitch switch personal

List All Profiles

View all configured profiles:

gitswitch list

Edit an Profile

Modify profile details:

gitswitch edit <profile-name>

Remove an Profile

Delete an profile configuration:

gitswitch remove <profile-name>

Generate SSH Key

Create a new SSH key for an profile:

gitswitch ssh <profile-name>

Command Reference

Commands:
  init [options]                Initialize GitSwitch with your first profile
  add [options]                 Add a new Git profile
  switch [profile] [options]    Switch to a different Git profile
  list [options]                List all Git profiles
  edit <profile>                Edit an existing profile
  remove <profile>              Remove a Git profile
  ssh <profile> [options]       Generate new SSH key for an profile
  current                       Show current Git configuration
  help [command]                Display help for command

Options:
  -V, --version                 output the version number
  -h, --help                    display help for command

SSH Key Management

GitSwitch automatically manages SSH keys for your profiles:

  1. Key Generation: Creates Ed25519 SSH keys (most secure and efficient)
  2. Key Storage: Saves keys in ~/.ssh/ with proper permissions (600)
  3. Connection Testing: Automatically tests SSH connectivity when switching profiles
  4. Service URLs: Provides direct links to add your public keys to GitHub/GitLab/Bitbucket

Adding SSH Keys to Git Services

After generating an SSH key, add it to your Git service:

  • GitHub: https://github.com/settings/keys
  • GitLab: https://gitlab.com/-/profile/keys
  • Bitbucket: https://bitbucket.org/profile/settings/ssh-keys/

Configuration

GitSwitch stores its configuration in ~/.gitswitch.json. This file contains:

  • Profile names and emails
  • SSH key paths
  • Git service types
  • Profile metadata

Backup

GitSwitch automatically creates backups before destructive operations.

Security

  • SSH keys are stored with secure permissions (600)
  • No passwords or tokens are stored
  • All operations use native Git and SSH commands
  • SSH connections explicitly disable password authentication

Examples

Setting Up Multiple Work and Personal Profiles

# Initialize with personal profile
gitswitch init
# Enter: personal, John Doe, [email protected], GitHub

# Add work profile
gitswitch add
# Enter: work, John Doe, [email protected], GitLab

# Switch between profiles
gitswitch switch work
gitswitch switch personal

Managing SSH Keys

# Generate new SSH key for work profile
gitswitch ssh work

# The public key will be copied to clipboard
# Add it to your GitLab profile settings

Troubleshooting

SSH Connection Issues

If SSH connections fail:

  1. Ensure your SSH key is added to the Git service
  2. Check key permissions: ls -la ~/.ssh/
  3. Test connection manually: ssh -T [email protected]

Git Config Not Updating

Ensure you have proper permissions to modify Git config:

git config --global --list

Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Will McKinley - mckinleymedia

Repository

https://github.com/mckinleymedia/gitswitch