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

ssh-git

v0.0.10

Published

Node CLI used to generate and setup ssh keys for using multiple accounts github/gitlab/bitbucket accounts using ssh

Readme

ssh-git

Generate SSH keys and config for connecting to Github, Gitlab and Bitbucket accounts using SSH without sweating over your terminal 😅

How to install and run

npm install -g ssh-git (Installing globally)
ssh-git --generate (Running it)

or

npx ssh-git --generate (If you have npm 5.2+)(Recommended)

How it works

This CLI tries to automate this 6 step process which we always have to follow whenever we need to connect any new Github/Gitlab/Bitbucket account on our machine using SSH. This process involves typing several commands in your terminal in order to generate SSH key pair to be able to connect to your accounts.
And, trust me it is no fun to setup 😞

This Node CLI automates the above process by asking you couple of questions and based on it :

  • It helps you generate a ssh key
  • Adds the generated key info to ssh config file
  • Adds the generated key to ssh-agent and to MacOS keychain(only on MacOS) so you can use SSH for remote communication with your remote repository without needing passwords ever again. Phew!

How to use

Open your terminal and type below command.

ssh-git --generate

(Note: Steps mentioned below are for generating ssh key for single account at a time. You can follow this process any no. of times to connect to multiple different accounts on Github, Gitlab and Bitbucket on same machine.)

Once you enter the above command you will be then prompted with following questions. Based on your answers CLI will generate appropriate SSH keypair files:

Question #1:
? Please select hosting service account from below for which you are generating the ssh keys:
> github
> gitlab
> bitbucket

[Select anyone from the above.]

Question #2:
? Please enter your username associated with above selected account for which you are generating ssh keys:

[Enter your username]

Question #3:
? Please enter your email id associated with above selected account for which you are generating ssh keys:

[Enter your email id]

Question #4:
? For additional protection of the ssh key that would be generated in next step, we need to password protect the key. Please enter strong passphrase to use to protect the key.
(Note: Remember the passphrase you will enter below because you will be asked to enter the same passphrase in one more step after it)

[Enter passphrase for ssh key]

After answering above questions, the ssh key generation process would start with info you've provided in the answers.

After key is generated, it will be added to ssh-agent and OSX keychain(only in MacOS). For adding it to keychain or ssh-agent, you will be prompted for passphrase for the ssh key. This is done so you don't have to remember and input your ssh key passphrase again and again when using it.

Once everything is done. You should see the following output in your console. Just follow few steps suggested in output to start using those generated ssh key keys to communicate with our repo :)

ssh key and config generated successfully 🎉 and public key has been copied to your Clipboard.


Few steps you need to follow next to start using this ssh key:

1. Login into your <bitbucket/github/gitlab> account.
2. Go to Account Settings/Developer Settings page.
3. Look for ssh key in settings and add the key which is copied to your clipboard

Once you've added the key to your <bitbucket/github/gitlab.com> account by following the above steps, to start using this key when communicating with repository you need to update your repository's remote url and replace <bitbucket/github/gitlab.com> with <bitbucket/github/gitlab.com-<username>>

License

MIT