gitload-cli
v1.1.3
Published
Download files, folders, or entire repos from GitHub URLs
Downloads
115
Readme
gitload 🦦
A beautiful CLI to download files, folders, or entire repositories from GitHub URLs.
Use with AI agents
Give your AI coding agent the gitload skill so it can download files from GitHub on your behalf:
npx skills add waldekmastykarz/gitloadOnce installed, ask your agent to "download files from GitHub", "fetch a folder from a repo", or "grab code from GitHub" and it will handle the rest.
Installation
npm install -g gitload-cliOr run directly with npx:
npx gitload-cli <github-url>Usage
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 helpExamples
Download an entire repository
gitload https://github.com/user/repo
# Creates ./repo/ folderDownload a specific folder
gitload https://github.com/user/repo/tree/main/src
# Creates ./src/ folderDownload a single file
gitload https://github.com/user/repo/blob/main/README.md
# Creates ./README.mdDownload as a ZIP file
gitload https://github.com/user/repo -z ./repo.zipDownload to a custom directory
gitload https://github.com/user/repo/tree/main/src -o ./my-source
# Creates ./my-source/ folderDownload contents flat to current directory
gitload https://github.com/user/repo/tree/main/src -o .
# Downloads directly to current folderDownload a private repository
# 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-repoAuthentication
Token priority (highest to lowest):
--tokenflagGITHUB_TOKENenvironment variable--ghflag (usesgh auth token)
Features
- 📁 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
Environment Variables
| Variable | Description |
|----------|-------------|
| GITHUB_TOKEN | GitHub personal access token (alternative to --token) |
Exit Codes
| Code | Meaning | |------|---------| | 0 | Success | | 1 | Runtime error (network, file system, etc.) | | 2 | Invalid usage (bad URL, missing arguments) |
License
MIT
