A modern, easy-to-use SSH key manager for Node.js. Easily create, switch between, and manage multiple SSH keys for different services (GitHub, GitLab, servers, etc.).
- 🔑 Create and manage multiple SSH keys
- 🔄 Easy switching between different SSH keys
- 📋 List all managed keys with clear visual indicators
- 🚀 Modern ES Modules implementation
- 🎨 Beautiful colored terminal output
- ✅ Fully tested with Jest
- 🔒 Secure key generation with 4096-bit RSA keys
本次更新均来自AI
- Node.js >= 18.0.0
npm install -g skm-node
Before first use, initialize skm-node:
skm init
This will create necessary directories and configuration files. If you have existing SSH keys, skm-node will detect them.
skm create <email> <name>
# Example:
skm create "john@example.com" github
This will:
- Create a new 4096-bit RSA key
- Store it with the given name
- Associate it with your email
skm ls
The current active key will be marked with a green arrow (→).
skm use <name>
# Example:
skm use github
This will activate the specified SSH key, making it the default key for SSH operations.
skm --help
Shows all available commands and their usage.
~/.skm/
- Base directory for skm-nodeconfig.json
- Configuration file<key-name>/
- Directory for each SSH keyid_rsa
- Private keyid_rsa.pub
- Public key
# Clone the repository
git clone https://github.com/liees/skm-node.git
cd skm-node
# Install dependencies
npm install
The project uses Jest for testing. All major functionality is covered by tests.
# Run all tests
npm test
# Run tests in watch mode (useful during development)
npm run test:watch
# Run tests with coverage report
npm run test:coverage
skm.js
- Main application file__tests__/
- Test filesinit.test.js
- Initialization testskey-management.test.js
- Key management tests
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -am 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Create a Pull Request
This project is licensed under the WTFPL - see the LICENSE file for details.
- Original author: liees
- Contributors: List of contributors
- Complete rewrite using modern JavaScript features
- Added ES Modules support
- Improved error handling and logging
- Added colored terminal output
- Added comprehensive test suite
- Upgraded to 4096-bit RSA keys for better security
- Added automatic directory creation
- Improved command-line interface