Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leynier/gh-folder-download

A command line application (CLI) to download only a specific folder without downloading the full repository implemented with Python using Typer and GitHub API.
https://github.com/leynier/gh-folder-download

cli cli-app github-api github-download-tool github-downloader python rich typer typer-cli

Last synced: 17 days ago
JSON representation

A command line application (CLI) to download only a specific folder without downloading the full repository implemented with Python using Typer and GitHub API.

Awesome Lists containing this project

README

        

# GitHub Folder Downloader

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Version](https://img.shields.io/pypi/v/gh-folder-download?color=%2334D058&label=Version)](https://pypi.org/project/gh-folder-download)
[![Last commit](https://img.shields.io/github/last-commit/leynier/gh-folder-download.svg?style=flat)](https://github.com/leynier/gh-folder-download/commits)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/leynier/gh-folder-download)](https://github.com/leynier/gh-folder-download/commits)
[![Github Stars](https://img.shields.io/github/stars/leynier/gh-folder-download?style=flat&logo=github)](https://github.com/leynier/gh-folder-download/stargazers)
[![Github Forks](https://img.shields.io/github/forks/leynier/gh-folder-download?style=flat&logo=github)](https://github.com/leynier/gh-folder-download/network/members)
[![Github Watchers](https://img.shields.io/github/watchers/leynier/gh-folder-download?style=flat&logo=github)](https://github.com/leynier/gh-folder-download)
[![GitHub contributors](https://img.shields.io/github/contributors/leynier/gh-folder-download)](https://github.com/leynier/gh-folder-download/graphs/contributors)

A command line application (CLI) to download only a specific folder without downloading the full repository implemented with Python using Typer and GitHub API.

## Getting Started

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.

## Commands

```bash
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.
```

## GitHub Repository URL format

- `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.