| 1 | # GitHub Folder Downloader |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | `gh-downloader` is a command-line tool that allows you to download a specific folder or an entire repository from GitHub without cloning the full repository history. |
| 6 | |
| 7 | ## Installation |
| 8 | |
| 9 | To install the tool, use the following command: |
| 10 | |
| 11 | ```bash |
| 12 | pip install . |
| 13 | ``` |
| 14 | |
| 15 | Alternatively, you can install it directly from GitHub: |
| 16 | |
| 17 | ```bash |
| 18 | pip install git+https://github.com/huncholane/gh-downloader.git |
| 19 | ``` |
| 20 | |
| 21 | ## Usage |
| 22 | |
| 23 | To download a folder or an entire repository, use: |
| 24 | |
| 25 | ```bash |
| 26 | gh-downloader <GitHub_URL> |
| 27 | ``` |
| 28 | |
| 29 | ### Examples |
| 30 | |
| 31 | #### Download an entire repository: |
| 32 | |
| 33 | ```bash |
| 34 | gh-downloader https://github.com/user/repo |
| 35 | ``` |
| 36 | |
| 37 | #### Download a specific folder from a repository: |
| 38 | |
| 39 | ```bash |
| 40 | gh-downloader https://github.com/user/repo/tree/main/folder_name |
| 41 | ``` |
| 42 | |
| 43 | ## Features |
| 44 | |
| 45 | - Downloads only the required folder or the whole repository. |
| 46 | - Uses a temporary directory to clone before extracting. |
| 47 | - Removes the `.git` directory after cloning to keep it clean. |
| 48 | - Supports merging into an existing folder. |
| 49 | |
| 50 | ## Dependencies |
| 51 | |
| 52 | - Python 3.x |
| 53 | - `requests` |
| 54 | |
| 55 | ## Contributing |
| 56 | |
| 57 | Feel free to submit issues or pull requests to improve `gh-downloader`. |
| 58 | |
| 59 | ## License |
| 60 | |
| 61 | This project is licensed under the MIT License. |