A beautiful CLI to download files, folders, or entire repositories from GitHub URLs.
npm install -g gitload-cliOr run directly with npx:
npx gitload-cli <github-url>gitload <url> [options]
Arguments:
url GitHub URL (repo root, folder, or file)
Options:
-z, --zip <path> Save as ZIP file at the specified path
-o, --output <dir> Output directory (default: folder named after URL path)
-t, --token <token> GitHub personal access token (for private repos)
--gh Use token from gh CLI (requires gh auth login)
--no-color Disable colored output
-V, --version Output version number
-h, --help Display help
gitload https://github.com/user/repo
# Creates ./repo/ foldergitload https://github.com/user/repo/tree/main/src
# Creates ./src/ foldergitload https://github.com/user/repo/blob/main/README.md
# Creates ./README.mdgitload https://github.com/user/repo -z ./repo.zipgitload https://github.com/user/repo/tree/main/src -o ./my-source
# Creates ./my-source/ foldergitload https://github.com/user/repo/tree/main/src -o .
# Downloads directly to current folder# Using gh CLI (if you have gh installed and logged in)
gitload https://github.com/user/private-repo --gh
# Using the --token flag
gitload https://github.com/user/private-repo --token ghp_xxxx
# Or using the GITHUB_TOKEN environment variable
export GITHUB_TOKEN=ghp_xxxx
gitload https://github.com/user/private-repoToken priority (highest to lowest):
--tokenflagGITHUB_TOKENenvironment variable--ghflag (usesgh auth token)
- 📁 Download entire repositories, folders, or single files
- 🗜️ Create ZIP archives with the
--zipoption - 🎨 Beautiful progress display with colors and progress bars
- 🔐 Support for private repositories via GitHub tokens
- ⚡ Efficient file discovery using GitHub's Git Trees API
| Variable | Description |
|---|---|
GITHUB_TOKEN |
GitHub personal access token (alternative to --token) |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Runtime error (network, file system, etc.) |
| 2 | Invalid usage (bad URL, missing arguments) |
MIT