Download specific files from git repositories without cloning.
SITE Link
NPM Link
npm install -g gitdiggRequires Node.js 18+.
# Download a single file
gitdigg owner/repo README.md
# Download a directory
gitdigg owner/repo src/utils
# Download with glob patterns
gitdigg owner/repo "src/*.ts"
gitdigg owner/repo "**/*.md"
# Specify branch and output directory
gitdigg owner/repo --branch dev -o ./output src/
# Increase download concurrency
gitdigg owner/repo -c 10 src/
# Flatten directory structure
gitdigg owner/repo --flat src/utils/
# Interactive file browser
gitdigg owner/repo -i-b, --branch <branch> Branch, tag, or commit to download from
-o, --output <dir> Output directory (default: ".")
-i, --interactive Interactive mode - browse and select files
-c, --concurrency <n> Number of concurrent downloads (default: 5)
-t, --token <token> Authentication token for private repositories
--flat Download all files without preserving structure
-v, --verbose Verbose output
-q, --quiet Suppress output
--retries <n> Number of retries for failed downloads (default: 3)
| Key | Action |
|---|---|
↑ ↓ |
Navigate |
→ |
Expand directory |
← |
Collapse directory |
Space |
Toggle selection |
a |
Toggle select all |
e |
Toggle expand all |
/ |
Search |
Enter |
Download selected |
q / Esc |
Quit |
gitdigg https://github.com/owner/repo src/
gitdigg https://gitlab.com/owner/repo lib/For private repositories, use one of these methods:
gitdigg https://user:TOKEN@github.com/owner/repo README.md
gitdigg https://user:TOKEN@gitlab.com/owner/repo README.mdgitdigg owner/repo README.md --token YOUR_TOKEN# GitHub
export GITHUB_TOKEN=your_token
# or
export GH_TOKEN=your_token
# GitLab
export GITLAB_TOKEN=your_tokenCreate ~/.gitdigg.yaml for persistent settings:
concurrency: 8
retries: 3
outputDir: ./downloads
tokens:
github: your_github_token
gitlab: your_gitlab_tokenBuilt with ❤️ by Rishab


