Skip to content

Fast, async Rust CLI for bulk GitHub repository backup. Sync repositories from users, starred repos, followers, or following accounts. Automatically detects existing repos (clone vs pull).

License

Notifications You must be signed in to change notification settings

ThalesMMS/GitHub-Replicant-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Replicant (Rust)

A high-performance, asynchronous CLI tool written in Rust to backup (clone or pull) all public repositories from a specific GitHub user.

Features

  • Async & Concurrent: Uses tokio and futures to perform multiple git operations simultaneously (cloning/pulling).
  • Smart Sync: Automatically detects if a repository exists to decide between git clone and git 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.

Installation

Ensure you have Rust and Cargo installed.

git clone https://github.com/ThalesMMS/GitHub-Replicant-rs.git
cd GitHub-Replicant-rs
cargo build --release

The binary will be available at target/release/github-Replicant-rs.

Usage

You can run the tool directly via cargo run or using the compiled binary.

Basic Usage

Backup all non-forked repositories for a user (e.g., torvalds):

cargo run -- torvalds

Starred Repositories

Backup all repositories a user has starred:

cargo run -- torvalds --stars

Repositories from Following

Backup repositories from every account a user follows:

cargo run -- torvalds --following

Repositories from Followers

Backup repositories from every account that follows the user:

cargo run -- torvalds --followers

Include Forks

To also backup forked repositories:

cargo run -- torvalds --include-forks

Adjust Concurrency

By default, the tool processes 8 repositories in parallel. You can adjust this with --concurrency (or -c):

cargo run -- torvalds -c 16

Output

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Fast, async Rust CLI for bulk GitHub repository backup. Sync repositories from users, starred repos, followers, or following accounts. Automatically detects existing repos (clone vs pull).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages