Skip to content

smartlegionlab/smart-repository-manager-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

85 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Repository Manager CLI v1.0.6

A comprehensive command-line tool for managing GitHub repositories with advanced synchronization, and intelligent local repository management.


GitHub release (latest by date) GitHub top language GitHub GitHub stars GitHub forks


⚠️ Disclaimer

By using this software, you agree to the full disclaimer terms.

Summary: Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md


Overview

Smart Repository Manager CLI is a powerful tool that helps you:

  • Manage GitHub repositories locally with intelligent synchronization
  • Monitor repository health and status
  • Perform batch operations on multiple repositories
  • Maintain organized local storage structure

Core Features

1. System Check & Configuration

  • 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

2. GitHub Integration

  • 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

3. Repository Management

  • 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

4. Intelligent Synchronization

  • 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

5. Local Storage Management

  • Organized Structure: Automatic directory organization by user
  • Size Monitoring: Track storage usage
  • Cleanup Tools: Remove individual or all local repositories
  • Log Files Management: Cleanup of log files

Installation

Prerequisites

  • Python 3.8+
  • Git installed and configured
  • GitHub Personal Access Token (with repo scope)

Setup

# 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

Usage Guide

First Run

  1. Initial Checkup: The tool automatically runs a full system check
  2. Token Setup: Enter your GitHub Personal Access Token when prompted

Main Menu Options

1. User Information

  • View GitHub profile details
  • See repository statistics
  • Check account creation date

2. Token Information

  • View token scopes and limits
  • Monitor API rate limits
  • Check token creation date

3. Repository Management

  • List all repositories with status indicators
  • Search for specific repositories
  • View language statistics
  • Check individual repository status
  • Run repository health checks
  • Create repositories archive

4. Synchronization

  • 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

5. Storage Management

  • View storage usage statistics
  • Delete individual repositories
  • Clear all local repositories
  • Check storage information

6. System Information

  • View application configuration
  • Check system status
  • Review repository statistics

7. Restart

  • Perform complete system verification
  • Identify and fix issues
  • Generate detailed logs

8. Clean Temporary Files

  • Remove temporary files
  • Free up disk space

πŸ”§ Configuration

Directory Structure

~/smart_repository_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

Environment Setup

  1. GitHub Token: Create a token with repo scope at https://github.com/settings/tokens
  2. Git Configuration: Ensure user.name and user.email are set globally

Technical Details

Core Components

  • Models: Data structures for users, repositories, and tokens
  • Services: Business logic for GitHub, Git, network, and sync operations
  • CLI Interface: User-friendly command-line interface with menus and prompts
  • Validation: Comprehensive input validation and error handling

Error Handling

  • Automatic retry mechanisms for failed operations
  • Detailed error logging and reporting
  • Graceful degradation when features are unavailable
  • User-friendly error messages

Performance Features

  • Concurrent operations where possible
  • Caching of repository data
  • Progress tracking for long operations
  • Efficient memory usage

Use Case

For Developers

  • Keep local copies of all GitHub repositories synchronized
  • Quickly clone multiple repositories for new machine setup
  • Monitor repository health and fix issues automatically

Monitoring & Logging

Checkup Results

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

Real-time Status

  • Progress indicators for long operations
  • Immediate feedback for user actions
  • Status summaries after operations complete

Security Features

  • Token Security: GitHub tokens stored locally with appropriate permissions
  • Input Validation: All user input validated before processing
  • Error Handling: Sensitive information not exposed in error messages

Troubleshooting

Common Issues

  1. Token Authentication Failed

    • Verify token has correct scopes (repo)
    • Generate new token if expired
    • Check network connectivity to GitHub
  2. Repository Sync Fails

    • Verify repository permissions
    • Ensure sufficient disk space
  3. Network Issues

    • Run network check from system checkup
    • Verify DNS resolution
    • Check firewall settings

Getting Help

  • Review checkup result logs in ~/smart_repository_manager/<username>/logs/
  • Check error messages in the CLI interface
  • Verify GitHub token permissions

Performance Tips

  • 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

Updates & Maintenance

Regular Maintenance Tasks

  1. Run System Checkup: Weekly to ensure everything works
  2. Clean Temporary Files: Monthly or as needed
  3. Review Storage Usage: Periodically to manage disk space
  4. Update GitHub Token: Annually or when permissions change

Data Backup

  • Configuration files: ~/smart_repository_manager/config.json
  • User data: ~/smart_repository_manager/<username>/
  • Log files: ~/smart_repository_manager/<username>/logs/

Acknowledgments

  • GitHub API for repository access
  • Python community for excellent libraries
  • Contributors and testers: @aixandrolab

License

BSD 3-Clause License - See LICENSE file for details.

Copyright Β© 2026, Alexander Suvorov. All rights reserved.


Related Projects

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, 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.


Development Status

Active Development - This project is under active development. Features may change, and stability is not guaranteed. Not recommended for production use without thorough testing.

Support

For issues and questions, please check the GitHub repository:
https://github.com/smartlegionlab/smart-repository-manager-cli


Developer: Alexander Suvorov Contact: smartlegiondev@gmail.com


Screenshot

Smart Repository Manager Cli Logo

About

A comprehensive command-line tool for managing GitHub repositories with advanced synchronization, SSH configuration management, and intelligent local repository management.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages