A high-performance, asynchronous CLI tool written in Rust to backup (clone or pull) all public repositories from a specific GitHub user.
- Async & Concurrent: Uses
tokioandfuturesto perform multiple git operations simultaneously (cloning/pulling). - Smart Sync: Automatically detects if a repository exists to decide between
git cloneandgit pull. - Filtration: Option to include or exclude forked repositories (excludes forks by default).
- Visual Feedback: Real-time progress bar using
indicatif. - Starred/Network Backup: Sync repositories you starred, from the accounts you follow, or from your followers.
Ensure you have Rust and Cargo installed.
git clone https://github.com/ThalesMMS/GitHub-Replicant-rs.git
cd GitHub-Replicant-rs
cargo build --releaseThe binary will be available at target/release/github-Replicant-rs.
You can run the tool directly via cargo run or using the compiled binary.
Backup all non-forked repositories for a user (e.g., torvalds):
cargo run -- torvaldsBackup all repositories a user has starred:
cargo run -- torvalds --starsBackup repositories from every account a user follows:
cargo run -- torvalds --followingBackup repositories from every account that follows the user:
cargo run -- torvalds --followersTo also backup forked repositories:
cargo run -- torvalds --include-forksBy default, the tool processes 8 repositories in parallel. You can adjust this with --concurrency (or -c):
cargo run -- torvalds -c 16Repositories are downloaded to an output/<username> directory within the project folder.
When cloning repositories that belong to other owners (e.g., starred repos or repos from followers/following), they are organized under a nested owner folder to avoid name collisions:
output/<username>/<owner>/<repo-name>
Repositories belonging to <username> stay in output/<username>/<repo-name> as before.
This project is licensed under the MIT License - see the LICENSE file for details.