Skip to content
chrisye96Public

About

Download any GitHub subdirectory as a zip — instantly. Paste a GitHub folder URL, get a .zip. No git clone, no setup. CLI: npx gitfold <url>. REST API available.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GitFold

Download any GitHub directory as a zip — instantly.

gitfold.cc · Docs · API


The Fastest Way

Change github.com → gitfold.cc in any GitHub tree URL and press Enter:

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

That's it. Your browser downloads the zip immediately.


Other Ways

Web UI — Paste a GitHub URL at gitfold.cc

API

curl -L "https://api.gitfold.cc/v1/download?url=https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev" \
     -o feature-dev.zip

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

CLI

npx gitfold.cc https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev
npx gitfold.cc <url> --format tar.gz
npx gitfold.cc <url> --info
npx gitfold.cc <url> --token ghp_xxxx

Project Structure

gitfold/
├── shared/          # URL parser & types (used by both web and worker)
├── web/             # Static frontend → gitfold.cc (Cloudflare Pages)
├── worker/          # REST API backend → api.gitfold.cc (Cloudflare Workers)
│   └── src/
│       ├── routes/  # api.ts, auth.ts, billing.ts
│       ├── services/# github, zip, tar, cache, auth, stripe, analytics, crypto, jwt
│       ├── middleware/ # security, session
│       └── db/      # D1 schema + migrations
├── docs/            # llms.txt, llms-full.txt
└── cli/             # npx gitfold.cc

Development

# Install dependencies
pnpm install

# Run worker API locally (port 8787)
pnpm dev:worker

# Serve frontend locally
pnpm dev:web

Copy worker/.dev.vars.example → worker/.dev.vars and fill in secrets:

GITHUB_TOKEN=ghp_...             # optional system token
STRIPE_SECRET_KEY=sk_test_...    # Phase 1
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PRO_PRICE_ID=price_...
STRIPE_POWER_PRICE_ID=price_...
GITHUB_CLIENT_ID=...             # Phase 2 OAuth
GITHUB_CLIENT_SECRET=...
JWT_SECRET=...                   # 32+ char random string
TOKEN_ENCRYPTION_KEY=...         # 64 hex chars (32 bytes)

Deployment

See plans/implementation-plan.md for full deployment steps. Quick reference:

# Create infrastructure
wrangler d1 create gitfold-db
wrangler r2 bucket create gitfold-cache

# Apply DB migrations
wrangler d1 migrations apply gitfold-db

# Set secrets
wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET
wrangler secret put JWT_SECRET
wrangler secret put TOKEN_ENCRYPTION_KEY

# Deploy
pnpm deploy:worker

AI Usage

GET https://gitfold.cc/llms.txt
GET https://gitfold.cc/llms-full.txt

GitFold is designed to be AI-friendly. See llms.txt for machine-readable docs.


License

MIT

About

Download any GitHub subdirectory as a zip — instantly. Paste a GitHub folder URL, get a .zip. No git clone, no setup. CLI: npx gitfold <url>. REST API available.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages