For the psychopaths who love archiving everything, the GitHub Ripper CLI tool
GitHub Repository Ripper is a powerful Python script that allows you to efficiently clone multiple GitHub repositories, including support for forked repositories, Git LFS. It's designed for users who need to backup everythings.
- Clone all or starred repositories of a specified GitHub user
- Support for authenticating with a GitHub token to bypass rate limits and access private repositories
- Option to clone original repositories of forks (sync mode)
- Git LFS support
- Multithreaded cloning for improved performance
- Detailed analytics of cloned repositories
- Progress bar for real-time feedback during cloning
-
Clone this repository:
git clone https://github.com/kaganisildak/gitripper cd gitripper
-
Install the required dependencies:
pip install requests tqdm
-
Ensure you have Git and Git LFS installed on your system if you plan to use LFS support.
Basic usage:
python rip.py <username> <all|starred> [options]
username
: The GitHub username whose repositories you want to cloneall|starred
: Whether to clone all repositories or only starred ones-d, --directory
: Directory to clone repositories into (default: current directory)--depth
: Depth of git clone (optional)--sync
: Enable sync mode to clone original repositories for forks--token
: GitHub personal access token for authentication--lfs
: Enable Git LFS support
-
Clone all repositories of a user:
python rip.py username all
-
Clone starred repositories with a specific clone depth:
python rip.py username starred --depth 1
-
Clone all repositories with sync mode and LFS support:
python rip.py username all --sync --lfs
Here are some potential enhancements for future development:
- Add support for upload rips to bucket storage/ftp/webdav etc.
- Add support for GitLab and Bitbucket repositories
- Implement incremental updates for previously cloned repositories
- Add options for filtering repositories based on criteria like language, stars, or last update date
- Improve error handling and retry mechanisms for network issues
- Implement automatic scheduling for periodic cloning and backups
Contributions are welcome! Please feel free to submit a Pull Request.