Professional CLI tool for managing multiple GitHub identities with wizard-based profile creation and SSH key management
Project description
GitHub Switcher
Professional CLI for managing multiple GitHub identities with automated SSH key management and seamless profile switching
๐ What's New in v0.2.0
- ๐ Passphrase-Protected SSH Keys - Generate encrypted keys for enhanced security
- ๐ SSH Key Fingerprinting - SHA256 fingerprints for unique identification
- ๐ SSH Agent Integration - Intelligent detection and management
- ๐ก๏ธ Advanced Connection Testing - Comprehensive diagnostics with recovery guidance
- ๐ Enhanced Detection Command - Rich SSH environment analysis
- ๐ง Non-Destructive Operations - Preserve existing SSH setups
- ๐ Profile Metadata Tracking - Enhanced storage with security status
โจ Key Features
- ๐ Advanced SSH Management - Generate, import, fingerprint, and manage SSH keys with passphrase support
- โก Seamless Profile Switching - Switch Git identities in seconds with intelligent matching
- ๐ฏ Interactive Commands - Smart wizards with case-insensitive profile matching and rich feedback
- ๐ Intelligent SSH Detection - Auto-detect existing setup with deduplication and ssh-agent integration
- ๐ก๏ธ Enterprise Security - Passphrase-protected keys, ssh-agent integration, comprehensive connection testing
- ๐ Cross-Platform - Enhanced support for macOS, Linux, and Windows with improved configuration handling
- ๐ข Production-Ready - 320+ tests, 89%+ coverage, type-safe, professionally maintained
๐ฆ Installation
Recommended: UV (Modern & Fast)
UV is a modern, fast Python package and project manager written in Rust. It's 10-100x faster than pip and provides better dependency resolution.
First, install UV if you don't have it:
macOS:
brew install uv
Linux/WSL:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Alternative (any platform):
pip install uv
Then install GitHub Switcher:
uv tool install github-switcher
UV provides faster installation (10x+ faster), better dependency resolution, and isolated tool management
Standard: pip
pip install github-switcher
macOS/Linux: Homebrew
brew tap mostafagamil/github-switcher
brew install github-switcher
๐ง System Requirements
- Python 3.10+ - Modern Python runtime
- Git - Required for SSH operations and profile management
- macOS:
xcode-select --installorbrew install git - Windows: Git for Windows (includes Git Bash)
- Linux: Usually pre-installed (
sudo apt install gitif needed)
- macOS:
- SSH client - For secure GitHub connectivity (included with Git)
๐ Quick Start
# Verify installation
ghsw --version
# Create your first profile (interactive wizard)
ghsw create
# List all profiles
ghsw list
# Switch between profiles
ghsw switch work
ghsw switch personal
# Test SSH connection
ghsw test work
๐ป Interactive Commands
All commands support interactive mode when no arguments are provided:
# Interactive profile creation - detects existing SSH keys
ghsw create
# Interactive switching - shows numbered profile list
ghsw switch
# ๐ง Select a profile to switch to:
# 1. work - john@company.com ๐ข Active
# 2. personal - john@gmail.com โช Inactive
# ๐ฏ Enter profile number or name: 2
# Interactive profile management
ghsw delete # Choose from list
ghsw copy-key # Copy SSH public key to clipboard
ghsw test # Test GitHub connection
ghsw regenerate-key # Generate new SSH key
๐ Enhanced Security Features (v0.2.0)
Passphrase-Protected SSH Keys: Generate and manage encrypted SSH keys for enhanced security:
ghsw regenerate-key work
# ๐ Generate passphrase-protected key? [Y/n]: Y
# ๐ Enter passphrase for new SSH key: โขโขโขโขโขโขโขโข
# โ
New encrypted SSH key generated!
SSH Key Fingerprinting: Every key gets a unique SHA256 fingerprint for identification:
ghsw list
# ๐ GitHub Profiles:
# ๐ข work - john@company.com (Active)
# ๐ SSH: Protected โข SHA256:abc123def456... โข Ed25519
# โช personal - john@gmail.com
# ๐ SSH: Unprotected โข SHA256:def456abc123... โข Ed25519
SSH Agent Integration: Intelligent detection and management of loaded keys:
ghsw detect
# ๐ SSH Agent Status:
# โ
ssh-agent running (PID: 12345)
# ๐ 2/4 keys loaded in agent
# ๐ 1 passphrase-protected key requires unlock
๐ Advanced SSH Intelligence
GitHub Switcher provides enterprise-grade SSH key management with comprehensive analysis:
ghsw detect
# ๐ Analyzing SSH environment...
# ๐ SSH Key Analysis:
# ๐ Total keys found: 4
# โ
Ed25519 keys: 2 (recommended)
# ๐ Passphrase-protected: 1
# ๐ Unencrypted: 3
# ๐ท๏ธ Profile Associations:
# โ
work โ id_ed25519_work (SHA256:abc123...)
# โ
personal โ id_ed25519_personal (SHA256:def456...)
# ๐ SSH Agent Status:
# โ
ssh-agent running
# ๐ 2 keys loaded in agent
# ๐ GitHub Connectivity: โ
All connections optimal
Enterprise SSH Features (v0.2.0):
- ๐ Passphrase Protection - Generate and detect encrypted SSH keys for enhanced security
- ๐ Key Fingerprinting - SHA256 fingerprints for unique identification and deduplication
- ๐ SSH Agent Integration - Intelligent detection and management of ssh-agent loaded keys
- ๐ก๏ธ Advanced Connection Testing - Comprehensive diagnostics with specific error guidance and recovery suggestions
- ๐ง Non-Destructive Operations - Copy (don't move) existing keys, preserve original setup
- ๐ Profile Metadata Tracking - Enhanced profile storage with SSH key attributes and usage history
- ๐ ๏ธ Enhanced Detection Command - Rich SSH environment analysis with security insights and key metadata
๐ Command Reference
| Command | Description |
|---|---|
ghsw create [options] |
Create new profile with interactive wizard |
ghsw list |
Show all profiles with SSH security status and activity |
ghsw switch [profile] |
Switch to profile (interactive if no argument) |
ghsw current |
Display currently active profile |
ghsw delete [profile] |
Remove profile and clean up SSH keys |
ghsw copy-key [profile] |
Copy SSH public key to clipboard |
ghsw test [profile] |
Test SSH connection to GitHub |
ghsw regenerate-key [profile] |
Generate new SSH key with passphrase protection (v0.2.0) |
ghsw detect |
Comprehensive SSH environment analysis with security insights |
๐ข Enterprise Features
- ๐ Advanced Security (v0.2.0) - Passphrase-protected keys, SHA256 fingerprinting, ssh-agent integration, secure defaults
- Comprehensive Testing - 320+ tests with 89%+ coverage ensuring reliability across all platforms
- Intelligent Error Handling - Robust error recovery with specific guidance for SSH issues
- Cross-Platform Excellence - Automated testing on macOS, Linux, and Windows with platform optimizations
- Type Safety - Full type hints and static analysis validation with mypy
- Enterprise Documentation - Complete guides covering advanced SSH features and security practices
๐ Documentation
- Installation Guide - Comprehensive setup instructions
- Usage Guide - Complete feature documentation
- Advanced SSH Management - Comprehensive SSH key features including passphrase protection and ssh-agent integration
- API Reference - Programmatic usage
- Contributing - Development and contribution guidelines
- Security Policy - Vulnerability reporting and security practices
๐ค Support & Contributing
- Issues & Bug Reports - GitHub Issues
- Feature Requests - GitHub Discussions
- Contributing - See Contributing Guidelines
- Security - See Security Policy
๐ก Example Workflows
Development Teams
# Set up work and personal profiles
ghsw create --name work --fullname "John Doe" --email john@company.com
ghsw create --name personal --fullname "John Doe" --email john.personal@gmail.com
# Switch contexts quickly
ghsw switch work # Work on company projects
ghsw switch personal # Contribute to open source
Freelancers
# Manage multiple clients
ghsw create --name client-a --email john@client-a.com
ghsw create --name client-b --email john@client-b.com
ghsw create --name personal --email john@personal.com
# Quick client switching
ghsw switch client-a # Work on Client A projects
ghsw switch client-b # Switch to Client B work
๐ Quality Metrics
- Test Coverage - Enterprise-grade test suite with 320+ tests and 89%+ coverage
- Cross-Platform - Automated CI testing on macOS, Linux, Windows with performance optimization
- Type Safety - Full mypy validation with strict settings and comprehensive type coverage
- Code Quality - Linted with ruff, formatted consistently, maintained to professional standards
- Security (v0.2.0) - Passphrase-protected Ed25519 keys, SHA256 fingerprinting, ssh-agent integration, proper permissions
๐ Support the Project
If GitHub Switcher helps improve your workflow, consider supporting its development:
Your support helps maintain and enhance GitHub Switcher with new features and improvements!
๐ License
MIT License - see LICENSE for details.
Made with โค๏ธ for developers managing multiple GitHub identities
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file github_switcher-0.2.0.tar.gz.
File metadata
- Download URL: github_switcher-0.2.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a31bd37b60ecee5d6442f07155285b48d1fee7f7898349391e211522f1a258a9
|
|
| MD5 |
263a0c13301aa61dfcce6a4497637199
|
|
| BLAKE2b-256 |
285962c5b1cef57fa163dafac90b6f05bb8de9ed4d7d83b6e2f99a5f58fc7b71
|
File details
Details for the file github_switcher-0.2.0-py3-none-any.whl.
File metadata
- Download URL: github_switcher-0.2.0-py3-none-any.whl
- Upload date:
- Size: 34.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36a746aeb277cc0a56fb884879a184814081bd07d2c4e6c673a710fd0325addf
|
|
| MD5 |
eb9502d6dfcf464399c682a55f36fec6
|
|
| BLAKE2b-256 |
bd763aa4dbf40d3091c2e6aa948be8915e2dc712aa0f2c9a5b2a7cdaf0a9a2d0
|