A comprehensive command-line tool for managing GitHub repositories with advanced synchronization, SSH configuration management, and intelligent local repository management.
Smart Repository Manager CLI is a powerful tool that helps you:
- Manage GitHub repositories locally with intelligent synchronization
- Configure and validate SSH for secure Git operations
- Monitor repository health and status
- Perform batch operations on multiple repositories
- Maintain organized local storage structure
- Full System Checkup: Comprehensive 8-step verification process
- Directory Structure Management: Automatic creation of organized user directories
- Configuration Management: Persistent user and token storage
- Network Validation: Internet connectivity and DNS resolution checks
- Token Management: Secure storage and validation of GitHub Personal Access Tokens
- User Authentication: Multi-user support with active user switching
- Repository Discovery: Fetch all user repositories (public, private, forked, archived)
- API Rate Limit Monitoring: Real-time GitHub API usage tracking
- SSH Validation: Comprehensive SSH setup verification
- Key Generation: Support for multiple key types (ED25519, RSA, ECDSA, DSA)
- Configuration Management: Automatic SSH config creation and validation
- Connection Testing: Verify SSH connectivity to GitHub
- Permission Fixing: Automatic repair of SSH file permissions
- Repository Listing: View all repositories with filtering options
- Search Functionality: Find repositories by name
- Language Statistics: Analyze repository language distribution
- Health Checking: Verify local repository integrity
- Storage Management: Monitor and manage local repository storage
- Smart Sync: Automatic detection of needed operations (clone/update/repair)
- Batch Operations: Process multiple repositories simultaneously
- Update Detection: Identify repositories needing updates
- Auto-Repair: Automatic fixing of broken repositories
- Progress Tracking: Real-time sync progress and statistics
- Organized Structure: Automatic directory organization by user
- Size Monitoring: Track storage usage
- Cleanup Tools: Remove individual or all local repositories
- Temporary File Management: Automatic cleanup of temporary files
- Python 3.8+
- Git installed and configured
- GitHub Personal Access Token (with repo scope)
# Clone the repository
git clone https://github.com/smartlegionlab/smart_repository_manager_cli.git
# Install dependencies
pip install -r requirements.txt
# Run the CLI
python app.py- Initial Checkup: The tool automatically runs a full system check
- Token Setup: Enter your GitHub Personal Access Token when prompted
- SSH Configuration: Follow prompts to set up SSH if not configured
- View GitHub profile details
- See repository statistics
- Check account creation date
- View token scopes and limits
- Monitor API rate limits
- Check token creation date
- List all repositories with status indicators
- Search for specific repositories
- View language statistics
- Check individual repository status
- Run repository health checks
- Sync All: Clone missing and update existing repositories
- Update Needed Only: Only update repositories with new commits
- Clone Missing Only: Only clone repositories not present locally
- Sync with Repair: Fix broken repositories while syncing
- Check SSH setup status
- Generate new SSH keys
- View existing SSH keys
- Fix SSH permissions
- Add GitHub to known_hosts
- Create SSH configuration
- Test SSH connection
- View detailed SSH information
- View storage usage statistics
- Delete individual repositories
- Clear all local repositories
- Check storage information
- View application configuration
- Check system status
- Review repository statistics
- Monitor SSH status
- Perform complete system verification
- Identify and fix issues
- Generate detailed logs
- Remove temporary files
- Free up disk space
~/smart_repo_manager/
βββ config.json # Application configuration
βββ username/ # User-specific directories
β βββ repositories/ # Local repository clones
β βββ archives/ # Backup archives
β βββ logs/ # Operation logs
β βββ backups/ # Manual backups
β βββ temp/ # Temporary files (auto-cleaned)
βββ checkup_results_*.json # Checkup result logs
- GitHub Token: Create a token with
reposcope at https://github.com/settings/tokens - SSH Keys: Generate SSH keys if not already present
- Git Configuration: Ensure
user.nameanduser.emailare set globally
- Models: Data structures for users, repositories, tokens, and SSH configurations
- Services: Business logic for GitHub, Git, SSH, network, and sync operations
- CLI Interface: User-friendly command-line interface with menus and prompts
- Validation: Comprehensive input validation and error handling
- Automatic retry mechanisms for failed operations
- Detailed error logging and reporting
- Graceful degradation when features are unavailable
- User-friendly error messages
- Concurrent operations where possible
- Caching of repository data
- Progress tracking for long operations
- Efficient memory usage
- Keep local copies of all GitHub repositories synchronized
- Quickly clone multiple repositories for new machine setup
- Monitor repository health and fix issues automatically
- Manage SSH configurations across multiple machines
Detailed JSON logs are saved for each system checkup, including:
- Timestamp and duration
- Success/failure status of each step
- Configuration details
- Error messages and recommendations
- Progress indicators for long operations
- Immediate feedback for user actions
- Status summaries after operations complete
- Token Security: GitHub tokens stored locally with appropriate permissions
- SSH Security: Proper file permissions enforced for SSH keys
- Input Validation: All user input validated before processing
- Error Handling: Sensitive information not exposed in error messages
-
SSH Connection Failed
- Run SSH check from the SSH menu
- Generate new SSH key if needed
- Add SSH key to GitHub account
-
Token Authentication Failed
- Verify token has correct scopes (repo)
- Generate new token if expired
- Check network connectivity to GitHub
-
Repository Sync Fails
- Check SSH configuration
- Verify repository permissions
- Ensure sufficient disk space
-
Network Issues
- Run network check from system checkup
- Verify DNS resolution
- Check firewall settings
- Review checkup result logs in
~/smart_repo_manager/<username>/logs/ - Check error messages in the CLI interface
- Verify GitHub token permissions
- Ensure SSH keys are added to GitHub
- Run regular checkups to identify issues early
- Use "Update Needed Only" for frequent syncs
- Clean temporary files periodically
- Monitor storage usage to prevent disk space issues
- Generate SSH keys with appropriate types (ED25519 recommended)
- Run System Checkup: Weekly to ensure everything works
- Clean Temporary Files: Monthly or as needed
- Review Storage Usage: Periodically to manage disk space
- Update GitHub Token: Annually or when permissions change
- Configuration files:
~/smart_repo_manager/config.json - User data:
~/smart_repo_manager/<username>/ - Log files:
~/smart_repo_manager/<username>/logs/
- GitHub API for repository access
- Python community for excellent libraries
- Contributors and testers: @aixandrolab
BSD 3-Clause License - See LICENSE file for details.
Copyright Β© 2025, Alexander Suvorov. All rights reserved.
This core library powers two complete implementations:
A Python library for managing Git repositories with intelligent synchronization, SSH configuration validation, and GitHub integration.
A desktop graphical user interface that offers visual management of repositories, SSH configuration, and synchronization tasks. Built for users who prefer point-and-click interaction.
Both implementations use this core library as their engine, ensuring consistent behavior and feature parity across interfaces.
Important: This software is provided "as-is" without any warranties or guarantees. The developers are not responsible for:
- Data loss or corruption
- Repository damage or unintended modifications
- Security breaches or token exposure
- Network issues or connectivity problems
- Any other direct or indirect damages
Use at your own risk. Always maintain backups of your repositories and tokens. This project is in active development and may contain bugs or incomplete features.
For issues and questions, please check the GitHub repository:
https://github.com/smartlegionlab/smart-repository-manager-cli
Developer: Alexander Suvorov Contact: smartlegiondev@gmail.com
