GKM
(Git Key Manager) is a simple shell-based tool to manage SSH keys. It allows users to list, switch, generate, and remove SSH keys conveniently via command-line operations.
- List SSH Keys: List all SSH keys in your
~/.ssh
folder with associated email and username. - Switch SSH Key: Easily switch between different SSH keys based on the index or username.
- Generate New SSH Key: Generate a new SSH key by providing a username and email.
- Remove SSH Key: Delete an existing SSH key based on its index in the list.
- Uninstall GKM: Completely remove the GKM script and all SSH keys from your system.
You can install gkm
directly from GitHub using the following command:
curl -sSL https://raw.githubusercontent.com/Velunce/gkm/main/install.sh | bash
This command will:
- Download and install
gkm.sh
into~/.gkm/
. - Add an alias
gkm
to your shell configuration (supports bash, zsh, etc.). - Make the
gkm
command immediately available for use.
Once gkm
is installed, you can use the following commands:
To list all SSH keys with their associated username and email:
gkm list
You can switch the active SSH key by specifying the index number or the username:
gkm use 1
or by username:
gkm use <username>
To generate a new SSH key, you will be prompted to input your username and email. You will then be asked to select the key type (rsa
, ed25519
, etc.):
gkm new
To remove an SSH key based on its index in the list:
gkm remove 2
To uninstall gkm
and remove all installed SSH keys from your system:
gkm uninstall
gkm
works on:
bash
zsh
- Other POSIX-compliant shells
It supports both Linux and macOS platforms.
Feel free to fork the repository and submit pull requests for improvements or additional features.
- Fork the project.
- Create your feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.