A command line application (CLI) to download only a specific folder without downloading the full repository implemented with Python using Typer and GitHub API.
Install gh-folder-download
with:
pip install gh-folder-download
poetry add gh-folder-download
conda install gh-folder-download
- Any other way that allows you to install the package from PyPI.
Usage: gh-folder-download [OPTIONS]
Options:
--url TEXT Repository URL [required]
--output DIRECTORY Output folder [default: .]
--token TEXT GitHub token
--force / --no-force Remove existing output folder if it exists
[default: no-force]
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help Show this message and exit.
https://github.com/{user_or_organization}/{repository_name}
Download the full repository from the default branch.
https://github.com/{user_or_organization}/{repository_name}/tree/{branch}
Download the full repository from the specified branch.
https://github.com/{user_or_organization}/{repository_name}/tree/{branch}/{folder_path}
Download the specified folder from the specified branch.