#git-repository #repository #git #clone #mirror #recursion #thread

app repo-hoarder

A tool to mass clone repositories from Codeberg

2 stable releases

Uses new Rust 2024

1.1.0 May 27, 2025
1.0.0 May 4, 2025

#102 in Development tools

Download history 116/week @ 2025-05-01 20/week @ 2025-05-08 9/week @ 2025-05-15 102/week @ 2025-05-22 30/week @ 2025-05-29

165 downloads per month

MIT license

19KB
132 lines

Repo Hoarder

Repo Hoarder is a CLI tool designed to mass clone repositories from Codeberg or GitHub. It supports asynchronous cloning with multiple threads, making it efficient for downloading repositories from users or organizations.

Features

  • Clone all repositories from a Codeberg or GitHub user or organization (GitHub support via --github flag).
  • Multi-threaded cloning for improved performance.
  • Option to clone repositories recursively.
  • Customizable output directory for cloned repositories.

Installation

To use Repo Hoarder, you need to have Rust installed. If you don't have Rust installed, you can get it from rust-lang.org.

  1. Clone this repository:

    git clone https://github.com/ofluffydev/repo-hoarder.git
    cd repo-hoarder
    
  2. Build the project:

    cargo build --release
    
  3. The compiled binary will be available in the target/release directory:

    ./target/release/repo-hoarder --help
    

Usage

Run the tool with the following options:

repo-hoarder [OPTIONS] <TARGET>

Arguments

  • <TARGET>: The target user or organization on Codeberg or GitHub.

Options

  • -t, --threads <THREADS>: Number of threads to use (defaults to the number of CPU cores).
  • -o, --org: Specify if the target is an organization.
  • -r, --recursive: Clone repositories recursively.
  • -c, --clone-output <CLONE_OUTPUT>: Specify an output directory for cloned repositories.
  • --github: Clone from GitHub instead of Codeberg.

Examples

  1. Clone all repositories from a Codeberg user:

    repo-hoarder ofluffydev
    
  2. Clone all repositories from a GitHub user:

    repo-hoarder --github ofluffydev
    
  3. Clone all repositories from an organization with 8 threads:

    repo-hoarder -t 8 -o codeberg
    
  4. Clone all repositories recursively into a specific directory:

    repo-hoarder -r -c ./cloned-repos ofluffydev
    

License

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

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.

Acknowledgments

  • Codeberg for providing an open-source platform for hosting repositories.
  • The Rust community for their excellent libraries and tools.

Dependencies

~9–21MB
~275K SLoC