GitFold Documentation

Download any GitHub subdirectory as a zip — no git clone, no login required.

Quick start

Three steps, 30 seconds:

  1. Find a GitHub directory you want, e.g.
    https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev
  2. Go to gitfold.cc and paste the URL.
  3. Click Download — your browser saves the zip.
Even faster: Just replace github.com with gitfold.cc in your browser's URL bar and press Enter. The download starts immediately.

Web UI

The main page at gitfold.cc accepts any GitHub tree URL.

Supported URL formats:

https://github.com/owner/repo/tree/branch/path/to/dir
https://github.com/owner/repo/tree/branch          (entire repo root)
github.com/owner/repo/tree/branch/path             (no https:// is fine)

Optional: GitHub Token

Without a token, the GitHub API allows 60 requests/hour per IP. That's enough for most casual use. If you hit the limit, or need to access private repos, add a Personal Access Token (PAT):

  1. Click ⚙ Settings at the bottom of the tool card.
  2. Paste your token (read-only public_repo scope is sufficient).
  3. The token is stored in your browser's localStorage — never sent to our servers.

Generate a token ↗

URL trick

Replace github.com with gitfold.cc in any GitHub tree URL:

Before: https://github.com/anthropics/claude-code/tree/main/plugins
After:  https://gitfold.cc/anthropics/claude-code/tree/main/plugins

Press Enter — the download begins immediately without any extra clicks.

Bookmarklet

Drag the button below to your browser's bookmarks bar. Then, on any GitHub directory page, click the bookmark to trigger an instant download.

GitFold

⬆ Drag this button to your bookmarks bar. One click = instant download on any GitHub tree page.

Note: This is a bookmarklet — a tiny piece of JavaScript saved as a bookmark. It works in Chrome, Firefox, Edge, and Safari. No extension required.

Any GitFold URL is a permanent, shareable download link. After downloading, click ⎘ Copy link to get the link. Anyone who opens it will immediately get the zip download.

https://gitfold.cc/anthropics/claude-code/tree/main/plugins/feature-dev

This link format mirrors GitHub's tree URL — just with a different domain.

API reference

Base URL: https://api.gitfold.cc

Authentication

Two ways to authenticate:

X-GitHub-Token: ghp_your_token_here

Both methods raise the GitHub API rate limit from 60 to 5,000 requests/hour and unlock the 200-file limit (Token tier).

Download a directory

GET /v1/download
ParameterTypeDescription
urlstring (required)URL-encoded GitHub tree URL
formatstring (optional)zip (default) or tar.gz / tgz

Returns: application/zip or application/gzip stream. Full-repo URLs (no path) return a 302 redirect to GitHub's archive CDN.

# Download a subdirectory as zip
curl -L "https://api.gitfold.cc/v1/download?url=https%3A%2F%2Fgithub.com%2Fanthropics%2Fclaude-code%2Ftree%2Fmain%2Fplugins%2Ffeature-dev" \
     -o feature-dev.zip

# Download as tar.gz
curl -L "https://api.gitfold.cc/v1/download?url=...&format=tar.gz" -o archive.tar.gz

# With GitHub token (higher rate limit)
curl -L -H "X-GitHub-Token: ghp_xxxx" \
     "https://api.gitfold.cc/v1/download?url=..." \
     -o feature-dev.zip

Get directory info (no download)

GET /v1/info
ParameterTypeDescription
urlstring (required)URL-encoded GitHub tree URL

Returns JSON:

{
  "provider": "github",
  "owner": "anthropics",
  "repo": "claude-code",
  "branch": "main",
  "path": "plugins/feature-dev",
  "fileCount": 5,
  "totalSize": 12840,
  "files": [
    { "path": "plugins/feature-dev/README.md", "size": 1204 },
    { "path": "plugins/feature-dev/prompt.md", "size": 11636 }
  ]
}

Tier limits

TierMax filesHow to unlock
Free50Default
Token200GitHub PAT header or sign in with GitHub
Pro1,000Subscribe
Power5,000Subscribe

Error responses

StatusCodeMeaning
400INVALID_URLURL is not a valid GitHub tree URL, or path is empty
404NOT_FOUNDRepository, branch, or path does not exist
413TOO_MANY_FILESDirectory exceeds tier file-count limit
413TOO_LARGEDirectory exceeds 100 MB size limit
429RATE_LIMITEDGitHub API rate limit exceeded
502GITHUB_ERRORGitHub API returned an unexpected error
// All errors follow this format:
{
  "code": "TOO_MANY_FILES",
  "message": "Directory contains 132 files (limit: 50).",
  "hint": "Upgrade your plan for higher limits, or try a smaller subdirectory."
}

CLI

# No install needed — run with npx
npx gitfold https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev

# Options
npx gitfold <url> --output archive.zip   # custom output path
npx gitfold <url> --format tar.gz        # download as tar.gz
npx gitfold <url> --info                 # show file list without downloading
npx gitfold <url> --token ghp_xxxx      # use GitHub token

Library

Use GitFold programmatically in Node.js:

npm install gitfold
# or: npx gitfold <url>
import { snip, info } from 'gitfold'

// Download a directory as a zip Buffer
const zip = await snip('https://github.com/owner/repo/tree/main/path')

// Get metadata without downloading
const meta = await info('https://github.com/owner/repo/tree/main/path')
// → { fileCount: 12, totalSize: 45200, files: [...] }

AI usage

GitFold is designed to be AI-friendly. The machine-readable docs are at:

Example: tell Claude or ChatGPT:

"Download the plugins/feature-dev directory from
https://github.com/anthropics/claude-code
Use the GitFold API at https://gitfold.cc/llms.txt"

FAQ

Why is the download slow?

For web UI downloads, your browser fetches each file individually from raw.githubusercontent.com, then zips them locally. Large directories (100+ files) take longer. For best performance, use the API endpoint which streams a pre-built zip.

Can I download private repositories?

Yes — sign in with GitHub (click the top-right corner). GitFold securely stores your OAuth token (AES-256-GCM encrypted) and uses it automatically when you download. No manual copy-paste of tokens required.

I hit the GitHub rate limit. What do I do?

Add a GitHub Personal Access Token in the Settings panel (⚙). A token increases your limit from 60 to 5,000 requests/hour. Generate one here ↗

Is there a file size limit?

All tiers share a 100 MB maximum per request. File count limits vary by tier: 50 (Free), 200 (Token / signed in with GitHub), 1,000 (Pro), 5,000 (Power). See pricing to upgrade. For very large directories, use git sparse-checkout instead.

Can I self-host GitFold?

Yes. GitFold is open source (MIT) and runs on Cloudflare Workers + Pages. See the GitHub repo for setup instructions. The hosted version at gitfold.cc includes optimizations like caching and priority processing that are not part of the open-source release.

Is my GitHub token safe?

PAT (manually pasted): stored in your browser's localStorage only — never sent to our servers.
OAuth (Sign in with GitHub): your token is encrypted with AES-256-GCM before being stored in our database. It is only decrypted server-side to make GitHub API requests on your behalf, and is never returned to the client.