Skip to content

lenadweb/github-downloader

Repository files navigation

GitHub Directory Downloader

A browser extension that adds a Download button to GitHub — grab any folder, subdirectory, or single file as a ZIP archive without cloning the whole repository. Packaging happens locally in your browser.

License: MIT CI Manifest V3 Chrome & Opera

Manifest V3 · React 18 · TypeScript · Tailwind CSS

Features

  • Download any folder or subdirectory as a ZIP archive
  • Download individual files straight from the repository tree
  • Fast, local packaging in the browser — no external servers
  • Native-feeling UI: a Download button and one-click row icons in the file table
  • Private repository support via a GitHub Personal Access Token (PAT)
  • Token stored locally in chrome.storage.local, sent only to api.github.com
  • Matches GitHub's light and dark themes
  • Localized into 12 languages

Getting started

Requires Node.js (>= 20.9) and pnpm (corepack enable will pick the version from package.json).

pnpm install
pnpm dev          # watch build into ./dist

Then load the unpacked extension:

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Load unpacked → select the dist folder

Production builds

pnpm build          # one-off chrome build into ./dist
pnpm build:chrome   # bumps version, outputs release/build-chrome-<version>.zip
pnpm build:opera    # bumps version, outputs release/build-opera-<version>.zip

Checks

pnpm lint
pnpm typecheck
pnpm test
pnpm format

How it works

The extension has two entry points (webpack.config.js):

Entry Source Role
content src/content/ Injects the Download UI into GitHub repository pages
popup src/popup/ Toolbar popup for the access token and usage hints

When you trigger a download, the content script walks the directory via the GitHub API, fetches each file, and packs everything into a ZIP with JSZip — entirely client-side. For private repositories, an optional Personal Access Token is read from chrome.storage.local and sent only to api.github.com.

Privacy

The extension uses the storage permission to keep an optional token locally and a single host permission for https://api.github.com/*. No analytics, no third-party servers, no data leaves your browser except the GitHub API requests needed to fetch the files you ask for.

Contributing

See CONTRIBUTING.md for the development workflow, localization notes, and required checks.

License

MIT © lenadweb

About

Browser extension that adds a Download button to GitHub. Grab any folder, subdirectory, or file as a ZIP without cloning. Fast, fully local packaging with private-repo token support.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors