| Crates.io | github-dl |
| lib.rs | github-dl |
| version | 0.1.0 |
| created_at | 2025-08-16 09:49:08.560322+00 |
| updated_at | 2025-08-16 09:49:08.560322+00 |
| description | CLI tool to download GitHub folders |
| homepage | https://github.com/pjankiewicz/github-dl |
| repository | https://github.com/pjankiewicz/github-dl |
| max_upload_size | |
| id | 1798206 |
| size | 70,030 |
A simple command-line tool to download a specific folder from a GitHub repository.
.env files for GitHub API token authentication.You can install github-dl directly from crates.io using Cargo:
cargo install github-dl
To download a folder, use the download command with the GitHub folder URL and an output directory.
github-dl download <GITHUB_URL> -o <OUTPUT_DIRECTORY>
Example:
github-dl download "https://github.com/rust-lang/book/tree/main/src/ch01-00-introduction" -o ./rust-book-intro
This will download the contents of the ch01-00-introduction folder into the ./rust-book-intro directory.
The tool creates a hidden .github-dl.json metadata file in the output directory. This allows you to easily refresh the folder's contents later.
To refresh all downloaded folders in the current directory (or a specified base directory), use the refresh command.
# Refresh folders in the current directory
github-dl refresh
# Refresh folders in a specific base directory
github-dl refresh --base-dir /path/to/projects
The refresh command will scan for .github-dl.json files recursively and update the contents of each folder from its original GitHub source.
You can control the number of parallel downloads using the -j or --jobs flag. The default is 5.
github-dl download <URL> -o <OUTPUT> -j 10
For private repositories or to avoid hitting GitHub's API rate limits, you can provide a personal access token.
Create a .env file in the directory where you run the command (or in any parent directory) with the following content:
GITHUB_TOKEN=your_personal_access_token_here
github-dl will automatically detect and use this token for all API requests.
This project is licensed under either of
at your option.