Skip to content

Majkey25/DownloadGithubDir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DownloadGithubDir

Release License Stars Forks Issues PRs Last Commit GitHub Pages

DownloadGithubDir is a fast, client-side tool that lets users download a specific folder from any GitHub repository as a ZIP file. It runs entirely in the browser (no backend), so it is safe to host on GitHub Pages and simple to operate.

Table of contents

Highlights

  • Download any GitHub folder by URL or by owner/repo/path.
  • Optional branch/tag and GitHub token support (rate limits + private repos).
  • Parallel file fetch, JSZip packaging, live progress, cancel support.
  • Responsive UI, sample shortcuts, and no application backend.
  • GitHub Pages workflow included for one-click hosting.

How it works

  1. The browser calls GitHub's Git Trees API to list the complete selected folder.
  2. Each file is fetched in parallel and assembled in memory.
  3. JSZip packages everything into a ZIP and triggers a download.

Quick start

python -m http.server 8000
# open http://localhost:8000

Usage

  1. Paste a GitHub folder URL or owner/repo/path (e.g. octocat/Hello-World/docs).
  2. Optional: add a branch or tag.
  3. Optional: add a GitHub token for higher rate limits or private repos.
  4. Click Download ZIP and monitor progress.

Deploy to GitHub Pages

  1. Push this repo to GitHub on the main branch.
  2. In GitHub → Settings → Pages, set Source to GitHub Actions.
  3. The workflow in .github/workflows/pages.yml deploys automatically on each push.

Configuration

  • Branch/Tag: Override the default branch to download a specific release or tag.
  • Token: Provide a fine-scoped Personal Access Token if you see 403 or need private access.

Security & privacy

  • Tokens are sent only to GitHub API URLs and are never stored.
  • The app is static and runs entirely on the client.

Limits

  • Hard cap of 4,000 files and 250 MiB per ZIP to bound browser memory use.
  • Truncated GitHub trees and folders containing submodules are refused instead of producing partial ZIPs.
  • If you hit 403 or API limits, add a token or narrow the folder.

Tech stack

  • Vanilla JS + Fetch API
  • JSZip + FileSaver
  • Static HTML/CSS with no build step

Release

Contributing

  1. Fork the repo and create a feature branch.
  2. Keep changes small and focused.
  3. Open a pull request with a clear description.

License

MIT

About

Simple client-side tool to download any GitHub repository folder as a ZIP, with support for branches, personal access tokens, live progress, canceling, and one-click deployment on GitHub Pages.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors